diff --git a/README.md b/README.md index 4e6d5fc..148f1e5 100644 --- a/README.md +++ b/README.md @@ -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: ``` diff --git a/docker-compose.yaml b/docker-compose.yaml index 153b95a..8cef53a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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