diff --git a/Dockerfile b/Dockerfile index db39d8f..bbbb41b 100755 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 06b3059..7a71c09 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,10 @@ version: "3.7" services: web: user: srm - build: . + build: + context: . + args: + - USER_ID=1000 volumes: - .:/app ports: