Docker Files as User
Sometimes being root inside a docker container is a pain especially when mounting files and having to create and modify files inside the container. So what is an easy way around this issue? Well docker allows you to launch a container and become the UID and GID you pass in: $ docker run --rm -ti --user (id -u $USER):(id -g $USER) ubuntu:16.04 groups: cannot find name for group ID 1000 I have no name!@f8b2e4f05d4e:/$ Though this approach works it means you can’t setup a bashrc or special completion tools as they are not configured for new users that do not have a home directory. ...