fix: uid/gid in docker

This commit is contained in:
Ravinou 2023-10-05 21:21:55 +02:00
parent 6db2364ca3
commit 55a33d627d
No known key found for this signature in database
GPG key ID: EEEE670C40F6A4D7
2 changed files with 4 additions and 8 deletions

View file

@ -9,12 +9,9 @@ RUN echo "borgwarehouse ALL=(ALL) NOPASSWD: /usr/sbin/service ssh restart" >> /e
RUN echo "borgwarehouse ALL=(ALL) NOPASSWD: /usr/sbin/service cron restart" >> /etc/sudoers
ARG UID=1001
ARG GID=1001
RUN groupadd borgwarehouse
RUN groupadd -g ${GID} borgwarehouse
RUN useradd -m -u ${UID} -g ${GID} borgwarehouse
RUN useradd -m -g borgwarehouse borgwarehouse
RUN cp /etc/ssh/sshd_config /etc/ssh/moduli /home/borgwarehouse/

View file

@ -1,6 +1,8 @@
version: '3'
services:
borgwarehouse:
# UID:GID must match the user and group ID of the host folders and must be >= 1001
user: '1001:1001'
build:
context: .
dockerfile: Dockerfile
@ -9,9 +11,6 @@ services:
- '3000:3000'
- '2222:22'
environment:
# UID and GID are the user and group id of the user running the container
- UID=1001
- GID=1001
- NEXTAUTH_URL=https://your.domain.com
- NEXTAUTH_SECRET=your-secret
- CRONJOB_KEY=your-other-secret