Normally, docker containers are run using the user root. I'd like to use a different user, which is no problem using docker's USER directive. But this user should be able to use sudo inside the container. This command is missing. Here's a simple Dockerfile for this purpose: FROM ubuntu:12.04 RUN useradd docker && echo "docker:docker" | chpasswd RUN mkdir -p /home/docker && chown -R docker:docker /