Created
February 7, 2014 19:12
-
-
Save keeb-zz/8869702 to your computer and use it in GitHub Desktop.
Read/Writing as a different user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
» ~ docker run -u nobody -i -t ubuntu touch /tmp/test | |
» ~ | |
» ~ docker ps -l | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
b360de514896 ubuntu:12.04 touch /tmp/test 5 seconds ago Exit 0 distracted_torvalds | |
» ~ docker commit b360de514896 | |
73f2406aa2cd26d503992f9cfc8e28212bb0513f33094f74b34f4ed1e175c7bc | |
» ~ docker tag 73f2406aa2cd26d503992f9cfc8e28212bb0513f33094f74b34f4ed1e175c7bc nobody-test | |
» ~ docker run nobody-test ls -l /tmp | |
total 0 | |
-rw-r--r-- 1 nobody nogroup 0 Feb 7 19:11 test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment