Skip to content

Commit

Permalink
Fix default config file owners in container image
Browse files Browse the repository at this point in the history
The Dockerfile has been updated to ensure that the instance
files (including the default config files) in the container
image are owned by pkiuser:root so that they can be accessed
properly at runtime.
  • Loading branch information
edewata committed Jun 4, 2024
1 parent c11fab8 commit 92d6b50
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ RUN cp -r /conf /var/lib/pki/pki-tomcat/conf.default

# Grant the root group the full access to PKI server files
# https://www.openshift.com/blog/jupyter-on-openshift-part-6-running-as-an-assigned-user-id
RUN chgrp -Rf root /var/lib/pki/pki-tomcat
RUN chown -Rf pkiuser:root /var/lib/pki/pki-tomcat
RUN chmod -Rf g+rw /var/lib/pki/pki-tomcat

VOLUME [ "/certs", "/conf", "/logs" ]
Expand Down Expand Up @@ -206,7 +206,7 @@ RUN cp -r /conf/* /var/lib/pki/pki-tomcat/conf.default

# Grant the root group the full access to PKI server files
# https://www.openshift.com/blog/jupyter-on-openshift-part-6-running-as-an-assigned-user-id
RUN chgrp -Rf root /var/lib/pki/pki-tomcat
RUN chown -Rf pkiuser:root /var/lib/pki/pki-tomcat
RUN chmod -Rf g+rw /var/lib/pki/pki-tomcat

CMD [ "/usr/share/pki/ca/bin/pki-ca-run" ]
Expand Down Expand Up @@ -237,7 +237,7 @@ RUN cp -r /conf/* /var/lib/pki/pki-tomcat/conf.default

# Grant the root group the full access to PKI server files
# https://www.openshift.com/blog/jupyter-on-openshift-part-6-running-as-an-assigned-user-id
RUN chgrp -Rf root /var/lib/pki/pki-tomcat
RUN chown -Rf pkiuser:root /var/lib/pki/pki-tomcat
RUN chmod -Rf g+rw /var/lib/pki/pki-tomcat

CMD [ "/usr/share/pki/kra/bin/pki-kra-run" ]
Expand Down Expand Up @@ -268,7 +268,7 @@ RUN cp -r /conf/* /var/lib/pki/pki-tomcat/conf.default

# Grant the root group the full access to PKI server files
# https://www.openshift.com/blog/jupyter-on-openshift-part-6-running-as-an-assigned-user-id
RUN chgrp -Rf root /var/lib/pki/pki-tomcat
RUN chown -Rf pkiuser:root /var/lib/pki/pki-tomcat
RUN chmod -Rf g+rw /var/lib/pki/pki-tomcat

CMD [ "/usr/share/pki/ocsp/bin/pki-ocsp-run" ]
Expand Down Expand Up @@ -317,7 +317,7 @@ RUN cp -r /conf/* /var/lib/pki/pki-tomcat/conf.default

# Grant the root group the full access to PKI ACME files
# https://www.openshift.com/blog/jupyter-on-openshift-part-6-running-as-an-assigned-user-id
RUN chgrp -Rf root /var/lib/pki/pki-tomcat
RUN chown -Rf pkiuser:root /var/lib/pki/pki-tomcat
RUN chmod -Rf g+rw /var/lib/pki/pki-tomcat

VOLUME [ \
Expand Down

0 comments on commit 92d6b50

Please sign in to comment.