- Sample scripts to highlight how easy it is to run an nginx container unprivileged
-
Use the
docker-default.sh
script to run an nginx container in its default run state -
You will see the webpage below running at localhost
-
In a separate command prompt use
docker-shell.sh
to login to the running container. Use thewhoami
command to see that you are running asroot
-
Close the
default-docker.sh
script and now rundocker-no-root.sh
to run the exact same container as aUSER
. -
The same webpage will be running at localhost
-
Once again use
docker-shell.sh
to login to the running container. Use thewhoami
command to see that you are a regular user!