title: What is a clean way to add a user in Docker with sudo priviledges?
body: <p>I am trying to understand how to properly add non-root users in docker and give them sudo privileges. Let's say my current Ubuntu 18.04 system has janedoe as a sudo user. I want to create a docker image where I want to add janedoe as a non-root user who can have sudo privileges when needed. Since I new to this Linux system as well as Docker, I typically would appreciate someone explaining through an example how to do this.</p>
  <p>The thing that I understand is that whenever I issue the command &quot;USER janedoe&quot; in the Dockerfile, many commands after that line cannot be executed by janedoe's privileges. I would assume we have to add janedoe to a sudo &quot;group&quot; when building the container similar to what we do when an admin adds a new user to the system.</p>
  <p>I have been trying to look for some demo Dockerfile explaining the example but couldn't find it.</p>