docs(wiki): Docker updates for rootless container

pull/101/head
Robert Dailey 2 years ago
parent c0ef64bcbc
commit f2a86489be

@ -25,13 +25,12 @@ services:
image: ghcr.io/recyclarr/recyclarr image: ghcr.io/recyclarr/recyclarr
container_name: recyclarr container_name: recyclarr
init: true init: true
user: 1000:1000
networks: [recyclarr] networks: [recyclarr]
volumes: volumes:
- ./config:/config - ./config:/config
environment: environment:
- TZ=America/Santiago - TZ=America/Santiago
- PUID=$DOCKER_UID
- PGID=$DOCKER_GID
``` ```
Here is a breakdown of the above YAML: Here is a breakdown of the above YAML:
@ -52,7 +51,10 @@ Here is a breakdown of the above YAML:
run `docker compose down` or `docker compose stop`. Internally, this runs Recyclarr using run `docker compose down` or `docker compose stop`. Internally, this runs Recyclarr using
[tini](https://github.com/krallin/tini). Please visit that repo to understand the benefits in [tini](https://github.com/krallin/tini). Please visit that repo to understand the benefits in
detail, if you're interested. detail, if you're interested.
- Stuff under `environment` is documented in the Environment section below. - `user`<br>
Optional User and Group ID you want to run the container as. Recyclarr will run using this UID:GID
and any files it creates in your `/config` volume will also be owned by this user and group. The
default for this, if not specified, is `1000:1000`.
## Tags ## Tags
@ -92,21 +94,12 @@ value *stability* the most, you want the bottom row. If you value being on *the
- `TZ` (Default: `UTC`)<br> - `TZ` (Default: `UTC`)<br>
The time zone you want to use for Recyclarr's local time in the container. The time zone you want to use for Recyclarr's local time in the container.
- `PUID` (Default: `1000`)<br>
The UID for the internal non-root user in the container. Match this to a UID on your host system
if you're using a directory-mounted volume for `/config`.
- `PGID` (Default: `1000`)<br>
The GID for the internal non-root user's group in the container. Match this to a GID on your host
system if you're using a directory-mounted volume for `/config`.
## Modes ## Modes
The docker container can operate in one of two different ways, which are documented below. The docker container can operate in one of two different ways, which are documented below.
**TIP:** The first time you run Recyclarr in docker, it will automatically run the `create-config` **NOTE:** `recyclarr.yml` does not exist the first time you run the container. You will get an error
subcommand to create your `recyclarr.yml` file in the `/config` directory (in the container) if that until you either copy it manually into the volume or run `recyclarr create-config` manually.
file does not exist yet.
### Manual Mode ### Manual Mode
@ -144,9 +137,10 @@ I will not support any usage of `docker exec`, for now. It's far too error prone
mixed file permissions in Recyclarr's app data directory (the `/config` volume). Please use `docker mixed file permissions in Recyclarr's app data directory (the `/config` volume). Please use `docker
run --rm` instead (documented in the previous section). run --rm` instead (documented in the previous section).
When you run `docker exec` without the `--user` option, commands are executed as the internal root When you run `docker exec` without the `--user` option, commands are executed as the default
user. If you absolutely insist on using this command, ensure you specify a user & group that matches internal user, which is `1000:1000`. If you absolutely insist on using this command, ensure you
the `PUID` & `PGID` environment variables. specify the `--user` option using the same UID:GID that you use in `docker run` and that matches
your volume's file ownership.
### Cron Mode ### Cron Mode
@ -169,3 +163,13 @@ docker compose up -d
``` ```
This runs it without any subcommand or options, which will result in this mode being used. This runs it without any subcommand or options, which will result in this mode being used.
## Permission Issues
The `/config` volume is very sensitive to user changes in the container. For example, if you first
run the container using `user: 1000:1000` and then run a second time using `user: 1500:1500`, you
are likely to get errors. This is because files that Recyclarr creates are owned by the user & group
you specify. Not all files can be used by multiple users.
If you change your user and/or group IDs, it is your responsibility to update the permissions of
files in the `/config` volume so that they match.

Loading…
Cancel
Save