docker - Specifying the creation of a sudo user in a Dockerfile? -



docker - Specifying the creation of a sudo user in a Dockerfile? -

i want docker image have non-root user can perform root/sudo commands.

how specify in dockerfile?

i found out myself:

run useradd -m <username> run sudo usermod -a -g sudo <username> run echo "<username>:<password>"|chpasswd

docker

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -