Merge pull request #77 from vrifox/add-userid-variable

Container: Add userid variable
This commit is contained in:
Jörg Reichert 2023-05-03 19:09:43 +02:00 committed by GitHub
commit 0e72ac66c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -1,2 +1,3 @@
USER_ID=1000 # Set if your user id is different (`id -u`)
APPLICATION_HOST=localhost APPLICATION_HOST=localhost
ESDATA=../esdata ESDATA=../esdata

View file

@ -18,7 +18,8 @@ RUN chmod +x docker-entrypoint.sh
RUN mkdir -p /home/srm/tmp RUN mkdir -p /home/srm/tmp
#COPY Gemfile.lock /home/srm/tmp/Gemfile.lock #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 --uid $USER_ID -g srm srm
RUN chown -R srm:srm /home/srm RUN chown -R srm:srm /home/srm
USER srm USER srm

View file

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