Run Docker container with another user

Simply add the option --user {{ user }} to change to another user when you start the Docker container.

docker run --user nobody ubuntu sleep 1000
Another way to enforce user security is to have it defined into Docker image itself at the time of creation:
$ cat Dockerfile
FROM ubuntu
USER nobody