/docker-sudo-ubuntu

Ubuntu docker image with non-root user

Primary LanguageDockerfile

Ubuntu sudo image

This image add a docker user with no password to Ubuntu official docker image. Sudo command is installed and configured to be used with this user.

This image can be used for development and test but not in production.

Supported tags and Dockerfile links

Usage

For example you can use this image to test a bash script who use sudo :

$ echo 'sudo apt-get update && sudo apt-get install -y htop' > htop_install.sh \
&& chmod +x htop_install.sh
$ docker run -it --rm -v $(pwd)/htop_install.sh:/home/docker/htop_install.sh \
langouste/ubuntu-sudo:latest /bin/sh -c "./htop_install.sh && htop"

Another use case example is with Testinfra for Test Driven Infrastructure (TDI) developments.

Reference

Github repository: langouste/docker-sudo-ubuntu