docker/development: create and run as user matching executing user on host

v1-0-stable
Christian Merten 3 years ago
parent acf0fafb00
commit 6762ea1f2c
Signed by: christian.merten
GPG Key ID: D953D69721B948B3

@ -9,4 +9,12 @@ WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
ARG GID
ARG UID
ARG USER
RUN groupadd -g $GID $USER && useradd -g $GID -u $UID -m -d /app $USER
USER $USER
COPY ./docker /app/docker

@ -6,6 +6,10 @@ x-kompass:
build:
context: ./../../
dockerfile: docker/development/Dockerfile
args:
UID: ${UID}
GID: ${UID}
USER: ${USER}
env_file: docker.env
restart: always
depends_on:

@ -30,7 +30,7 @@ done
cd /app
if ! [ -f completed_initial_run ]; then
if ! [ -f /tmp/completed_initial_run ]; then
echo 'Initialising kompass master container'
python jdav_web/manage.py compilemessages --locale de
@ -38,7 +38,7 @@ if ! [ -f completed_initial_run ]; then
# python jdav_web/manage.py makemigrations
python jdav_web/manage.py migrate
touch completed_initial_run
touch /tmp/completed_initial_run
fi
cd jdav_web

Loading…
Cancel
Save