added docker instructions

This commit is contained in:
2024-01-17 14:15:46 +01:00
parent 21ca5c626f
commit 0726b95fd4
2 changed files with 22 additions and 2 deletions

View File

@@ -94,6 +94,26 @@ installed - `make`.
To install after building either copy the binary or execute `sudo make install`.
### Using the docker image
A pre-built docker image is available, which you can use to test the
app without installing it. You need `docker-compose`. Copy the file
`docker-compose.yaml` to somewhere, cd to that directory and execute:
```shell
mkdir kleinanzeigen-backup
USER_ID=$(id -u) GROUP_ID=$(id -g) OUTDIR=./kleinanzeigen-backup docker-compose run kleingebaeck -u XXX -v
```
`USER_ID` and `GROUP_ID` needs to be specified so that you are the
owner of the created backups. The backup directory must exist prior to
the execution, otherwise docker will create it as root, then
kleingebaeck will fail.
You may of course also modify the `docker-compose.yaml` to suit your needs.
If you want to build the image yourself, use the supplied Dockerfile.
## Commandline options:
```

View File

@@ -6,14 +6,14 @@ services:
group_add:
- '${GROUP_ID}'
volumes:
- ./test/out:/backup
- ${OUTDIR}:/backup
command: chown -R ${USER_ID}:${USER_ID} /backup
kleingebaeck:
container_name: kleingebaeck
user: "${USER_ID}:${USER_ID}"
volumes:
- ./test/out:/backup
- ${OUTDIR}:/backup
working_dir: /backup
build: .
image: kleingebaeck:latest