1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-11 16:32:59 +00:00

Configurable uid gid (#9)

* allow to specify uid and gid for kopano
* Set default value of GID/UID to keep compatibility with existing containers
This commit is contained in:
h44z
2020-01-29 20:46:27 +01:00
committed by GitHub
parent 7bbdfecb0e
commit d0735ebd08
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -8,6 +8,9 @@ ARG KOPANO_CORE_VERSION=newest
ARG KOPANO_REPOSITORY_FLAGS="trusted=yes"
ARG RELEASE_KEY_DOWNLOAD=0
ARG KOPANO_UID=999
ARG KOPANO_GID=999
ENV \
BASE_VERSION=1.3.0 \
DEBUG="" \
@@ -47,6 +50,10 @@ RUN apt-get update && \
curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \
fi
# Create kopano user and group
RUN groupadd --system --gid ${KOPANO_GID} kopano
RUN useradd --system --shell /usr/sbin/nologin --home /var/lib/kopano --gid ${KOPANO_GID} --uid ${KOPANO_UID} kopano
ENV DOCKERIZE_VERSION v0.11.0
RUN curl -sfL https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-"$(uname -s)"-"$(uname -m)" \
| install /dev/stdin /usr/local/bin/dockerize && \