Skip to content

Commit

Permalink
docker compose: explicit set user in compose file to prevent permissi…
Browse files Browse the repository at this point in the history
…on errors

Signed-off-by: Stefan Seide <[email protected]>
  • Loading branch information
sseide committed Aug 18, 2024
1 parent 1d5cf78 commit 4eaed69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ in the output. The config test does not check if hostnames or ip addresses can b
More information can be found in the documentation at [docs/configuration.md](docs/configuration.md)
and [docs/connections.md](docs/connections.md).

*Remark: Errors on image startup with "permission denied" on config files might be caused due to
wrong runtime users running the image. "docker compose" in recent versions does not pick up the
user defined inside the Dockerfile and uses some other user, therefor it should be explicit set inside
the docker-compose.yml file as shown in the example file.*

## Environment Variables

These environment variables can be used starting Redis Commander as normal
Expand Down Expand Up @@ -292,8 +297,12 @@ services:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
user: redis
```
Attention - later version of compose do not honor the "USER" directive from the Dockerfile anymore,
user must be set explicit. Otherwise, "permission denied" errors are shown on startup.
### Without docker-compose
#### Simplest
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ services:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
user: redis

0 comments on commit 4eaed69

Please sign in to comment.