Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FROM jenkins/jenkins:2.60.3
USER root
# test directory is a mounted volume
RUN mkdir /root/test
VOLUME /root/test
COPY files /root/test
RUN ls -l /root/test
RUN chown -R jenkins:jenkins /root/test
RUN ls -l /root/test
# test 2 is not, chown is retained
RUN mkdir /root/test2
COPY files /root/test2
RUN ls -l /root/test2
RUN chown -R jenkins:jenkins /root/test2
RUN ls -l /root/test2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment