Skip to content

Commit 4eaed69

Browse files
committed
docker compose: explicit set user in compose file to prevent permission errors
Signed-off-by: Stefan Seide <account-github@seide.st>
1 parent 1d5cf78 commit 4eaed69

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ in the output. The config test does not check if hostnames or ip addresses can b
148148
More information can be found in the documentation at [docs/configuration.md](docs/configuration.md)
149149
and [docs/connections.md](docs/connections.md).
150150

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

153158
These environment variables can be used starting Redis Commander as normal
@@ -292,8 +297,12 @@ services:
292297
- REDIS_HOSTS=local:redis:6379
293298
ports:
294299
- "8081:8081"
300+
user: redis
295301
```
296302
303+
Attention - later version of compose do not honor the "USER" directive from the Dockerfile anymore,
304+
user must be set explicit. Otherwise, "permission denied" errors are shown on startup.
305+
297306
### Without docker-compose
298307
299308
#### Simplest

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ services:
1616
- REDIS_HOSTS=local:redis:6379
1717
ports:
1818
- "8081:8081"
19+
user: redis

0 commit comments

Comments
 (0)