Docker doesn't RUN command as USER
问题 I am new with Docker and I am having trouble writing my Dockerfile . The thing is that I created a user named jonas523 which I want to execute a shell command. So I put it in this Dockerfile and when I go inside my fresh container, I observe that the command was not used with the new user I created. I think I didn't understand the USER instruction provided by Docker : USER jonas523 RUN \ echo "JAVA_HOME=/usr/java/jdk1.7.0_45/bin" >> /home/jonas523/.bash_profile \ && echo "ANT_HOME=/opt/apache