add userid variable

Add a variable for the userid and use 1000 as default.
This commit is contained in:
Vri 🌈 2023-05-02 14:51:13 +02:00
parent 2a39a2d454
commit 1a8d823a17
Signed by: vrifox
GPG key ID: D40098E5B60B2197
2 changed files with 6 additions and 2 deletions

View file

@ -18,7 +18,8 @@ RUN chmod +x docker-entrypoint.sh
RUN mkdir -p /home/srm/tmp
#COPY Gemfile.lock /home/srm/tmp/Gemfile.lock
RUN groupadd -r srm && useradd -r -g srm srm
ARG USER_ID=1000
RUN groupadd srm && useradd -D --uid $USER_ID -g srm srm
RUN chown -R srm:srm /home/srm
USER srm

View file

@ -2,7 +2,10 @@ version: "3.7"
services:
web:
user: srm
build: .
build:
context: .
args:
- USER_ID=1000
volumes:
- .:/app
ports: