Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Increase write access to /conf and /data within docker container for …
Browse files Browse the repository at this point in the history
…GID=0

This permits the container to be started in systems like OpenShift which do not
permit UID=0 by default.

VOLUME in Dockerfile-worker is removed as it inherits from the one in Dockerfile
  • Loading branch information
michaelkaye committed Nov 25, 2021
1 parent 608d538 commit e18ce18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 8 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ COPY --from=builder /install /usr/local
COPY ./docker/start.py /start.py
COPY ./docker/conf /conf

RUN mkdir /data

# Set permissions for GID=0 to be able to interact with /conf and /data
# Allows container to be deployed in OpenShift without UID 0
# https://docs.openshift.com/container-platform/4.7/openshift_images/create-images.html#images-create-guide-openshift_create-images
RUN chgrp -R 0 /conf /data && \
chmod -R g+rw /conf /data

VOLUME ["/data"]

EXPOSE 8008/tcp 8009/tcp 8448/tcp
Expand Down
3 changes: 0 additions & 3 deletions docker/Dockerfile-workers
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ COPY ./docker/conf-workers/* /conf/
# Expose nginx listener port
EXPOSE 8080/tcp

# Volume for user-editable config files, logs etc.
VOLUME ["/data"]

# A script to read environment variables and create the necessary
# files to run the desired worker configuration. Will start supervisord.
COPY ./docker/configure_workers_and_start.py /configure_workers_and_start.py
Expand Down

0 comments on commit e18ce18

Please sign in to comment.