Skip to content

Commit

Permalink
Merge pull request #240 from FabianWilms/make-frost-openshift-ready
Browse files Browse the repository at this point in the history
Fix folder permissions in docker for openshift deployment
  • Loading branch information
hylkevds authored Jun 29, 2020
2 parents 4e4af2f + d20101a commit 2803c0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions FROST-Server.HTTP/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ ARG WAR_FILE
COPY target/${WAR_FILE} ${CATALINA_HOME}/webapps/FROST-Server.war

RUN addgroup --system --gid 1000 tomcat \
&& adduser --system --uid 1000 --gid 1000 tomcat \
&& chown -R tomcat $CATALINA_HOME
&& adduser --system --uid 1000 --gid 1000 tomcat

# Fix Folder permissions for Openshift-Deployment (according to https://docs.openshift.com/container-platform/4.4/openshift_images/create-images.html#use-uid_create-images)
RUN chgrp -R 0 $CATALINA_HOME && \
chmod -R g=u $CATALINA_HOME

USER tomcat
7 changes: 5 additions & 2 deletions FROST-Server.MQTTP/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ ARG WAR_FILE
COPY target/${WAR_FILE} ${CATALINA_HOME}/webapps/FROST-Server.war

RUN addgroup --system --gid 1000 tomcat \
&& adduser --system --uid 1000 --gid 1000 tomcat \
&& chown -R tomcat $CATALINA_HOME
&& adduser --system --uid 1000 --gid 1000 tomcat

# Fix Folder permissions for Openshift-Deployment (according to https://docs.openshift.com/container-platform/4.4/openshift_images/create-images.html#use-uid_create-images)
RUN chgrp -R 0 $CATALINA_HOME && \
chmod -R g=u $CATALINA_HOME

USER tomcat

0 comments on commit 2803c0a

Please sign in to comment.