Run the Docker container using the caller's UID/GID.

master
Pacman Ghost 3 years ago
parent db1469023b
commit 41c5d261af
  1. 4
      Dockerfile
  2. 2
      run-containers.sh

@ -44,6 +44,10 @@ RUN rm -f asl_articles/config/debug.cfg
# copy the alembic files (so that users can upgrade their database)
COPY alembic alembic
# NOTE: We set these so that we can update the database outside the container.
ENV UID=$DOCKER_UID
ENV GID=$DOCKER_GID
# launch the web server
EXPOSE 5000
ENV DBCONN undefined

@ -38,6 +38,8 @@ export AUTHOR_ALIASES=
export ENABLE_TESTS=
NO_BUILD=
export BUILD_NETWORK=
export DOCKER_UID=$(id -u)
export DOCKER_GID=$(id -g)
# parse the command-line arguments
if [ $# -eq 0 ]; then

Loading…
Cancel
Save