I have the following in my dockerfile. (There is much more. but I have pasted the relevant part here)
RUN useradd jenkins
USER jenkins
# Maven settings
RUN mkdir ~/.m2
COPY settings.xml ~/.m2/settings.xml
The docker build goes through fine and when I run docker image, I see NO errors.
but I do not see .m2
directory created at /home/jenkins/.m2
in the host filesystem.
I also tried replacing ~
with /home/jenkins
and still I do not see .m2
being created.
what am I doing wrong?
Thanks
I tried something similar and got
your useradd is not enough to create /home/jenkins
I do for my user gg
This creates the directory of the user gg `