Added check if GID already exists

This commit is contained in:
Clemens Eyhoff 2024-03-12 10:53:48 +01:00 committed by GitHub
parent a3275adfd1
commit d3b03cbf6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,7 @@ RUN apt-get update && apt-get install -y \
supervisor curl jq jc borgbackup/bookworm-backports openssh-server rsyslog && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN groupadd -g ${GID} borgwarehouse && useradd -m -u ${UID} -g ${GID} borgwarehouse
RUN if ! getent group ${GID} ; then groupadd -g ${GID} borgwarehouse; fi && useradd -m -u ${UID} -g ${GID} borgwarehouse
RUN cp /etc/ssh/moduli /home/borgwarehouse/
@ -53,4 +53,4 @@ USER borgwarehouse
EXPOSE 3000 22
ENTRYPOINT ["./docker-bw-init.sh"]
ENTRYPOINT ["./docker-bw-init.sh"]