Skip to content

Commit 4d2ad78

Browse files
feat: configure container uid and gid
1 parent df985a5 commit 4d2ad78

5 files changed

Lines changed: 13 additions & 0 deletions

File tree

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ TRAEFIK_ACCESS_LOG=
6666
# Configure the log level for Traefik.
6767
# Possible values are "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL" and "PANIC". Default is "ERROR".
6868
TRAEFIK_LOG_LEVEL=
69+
# The default for traefik is to run in privileged mode.
70+
# If you want to run traefik non-privileged, use the following variable and the format [UID]:[GID] to set user and group of your choice.
71+
# Ensure that the user has access to docker.sock and traefik volumes defined in traefik/opencloud.yml
72+
#TRAEFIK_CONTAINER_UID_GID="1000:1000"
6973

7074

7175
## OpenCloud Settings ##
@@ -77,6 +81,11 @@ OC_DOCKER_IMAGE=opencloudeu/opencloud-rolling
7781
# The openCloud container version.
7882
# Defaults to "latest" and points to the latest stable tag.
7983
OC_DOCKER_TAG=
84+
# The default id used in opencloud containers is 1000 for user and group.
85+
# If you want to change the default, use the following variable and the format [UID]:[GID].
86+
# The change affects all containers with access to data volumes.
87+
# Ensure that the user has access to all volumes defined in docker-compose.yml
88+
#OC_CONTAINER_UID_GID="1000:1000"
8089
# Domain of openCloud, where you can find the frontend.
8190
# Defaults to "cloud.opencloud.test"
8291
OC_DOMAIN=

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44
image: ${OC_DOCKER_IMAGE:-opencloudeu/opencloud-rolling}:${OC_DOCKER_TAG:-latest}
55
# changelog: https://github.com/opencloud-eu/opencloud/tree/main/changelog
66
# release notes: https://docs.opencloud.eu/opencloud_release_notes.html
7+
user: ${OC_CONTAINER_UID_GID:-1000:1000}
78
networks:
89
opencloud-net:
910
entrypoint:

radicale/radicale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
- ./config/opencloud/proxy.yaml:/etc/opencloud/proxy.yaml
77
radicale:
88
image: ${RADICALE_DOCKER_IMAGE:-opencloudeu/radicale}:${RADICALE_DOCKER_TAG:-latest}
9+
user: ${OC_CONTAINER_UID_GID:-1000:1000}
910
networks:
1011
opencloud-net:
1112
logging:

traefik/opencloud.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ services:
1111
traefik:
1212
image: traefik:v3
1313
# release notes: https://github.com/traefik/traefik/releases
14+
user: ${TRAEFIK_CONTAINER_UID_GID:-0:0}
1415
networks:
1516
opencloud-net:
1617
aliases:

weboffice/collabora.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414

1515
collaboration:
1616
image: ${OC_DOCKER_IMAGE:-opencloudeu/opencloud-rolling}:${OC_DOCKER_TAG:-latest}
17+
user: ${OC_CONTAINER_UID_GID:-1000:1000}
1718
networks:
1819
opencloud-net:
1920
depends_on:

0 commit comments

Comments
 (0)