File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,18 @@ ENV PIPELINES_URLS=${PIPELINES_URLS} \
5151# Copy the application code
5252COPY . .
5353
54+ # Fix write permissions for OpenShift / non-root users
55+ RUN set -eux; \
56+ for d in /app /root /.local /.cache; do \
57+ mkdir -p "$d" ; \
58+ done; \
59+ chgrp -R 0 /app /root /.local /.cache || true; \
60+ chmod -R g+rwX /app /root /.local /.cache || true; \
61+ find /app -type d -exec chmod g+s {} + || true; \
62+ find /root -type d -exec chmod g+s {} + || true; \
63+ find /.local -type d -exec chmod g+s {} + || true; \
64+ find /.cache -type d -exec chmod g+s {} + || true
65+
5466# Run a docker command if either PIPELINES_URLS or PIPELINES_REQUIREMENTS_PATH is not empty
5567RUN if [ -n "$PIPELINES_URLS" ] || [ -n "$PIPELINES_REQUIREMENTS_PATH" ]; then \
5668 echo "Running docker command with PIPELINES_URLS or PIPELINES_REQUIREMENTS_PATH" ; \
You can’t perform that action at this time.
0 commit comments