Public | Automated Build

Last pushed: 3 years ago
Short Description
Simple container to run something as a non-root user
Full Description

A simple Fedora based image that creates a non-root user and then uses sudo to run the main command.

This image is designed to be used as a base for other application specific images.

Environment variables :

  • useruid - the user id, default is 1000
  • usergid - the group id, defaults to the uid
  • username - the user name, default is noname
  • userhome - the home directory, default /home/${username}
  • usertype - the type of user, normal or system, default is normal

Example using your own uid :

docker run -it --rm \
    --env "useruid=$(id -u)" \

Example using your own uid, gid and name :

docker run -it --rm \
    --env "useruid=$(id -u)" \
    --env "usergid=$(id -g)" \
    --env "username=$(id -un)" \

Creating a system user with specific uid, gid, name and home :

docker run -it --rm \
    --env "useruid=91" \
    --env "usergid=91" \
    --env "usertype=system" \
    --env "username=tomcat" \
    --env "userhome=/usr/share/tomcat" \
Docker Pull Command
Source Repository