Skip to content

Commit

Permalink
docker: fix permissions for openshift
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonadoni committed Dec 19, 2023
1 parent 97b391f commit 026acaf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,14 @@ RUN apk update && \
COPY --from=build /code/_build /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Apply permissions needed by OpenShift
# See https://docs.okd.io/latest/openshift_images/create-images.html#use-uid_create-images
RUN touch /var/run/nginx.pid && \
chown :0 /var/run/nginx.pid && \
chmod g+rwx /var/run/nginx.pid && \
chown -R :0 /var/cache/nginx && \
chmod -R g+rwx /var/cache/nginx
USER 1001

EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 026acaf

Please sign in to comment.