How to create and run docker container with new user other than root?
<p>I met a problem while using docker.
Now I have a ubuntu based docker container. And in the container ,the user id is root by default which is not my expectation, I suppose the user id is like <code>abc</code> which is another user account on the HOST OS running docker.
I have tried the following ways but all fail:</p>

<pre><code>su abc;
</code></pre>

<p>Then running <code>docker run xxx</code> to bring up a container, but login the container, the user in container is still <code>root</code>.</p>

<p>Then by adding the <code>-u</code> flag for docker run: like : </p>

<pre><code>docker run -t -i -u abc ubuntu /bin/bash
</code></pre>

<p>the the docker show errors <code>unable to find user abc</code></p>

<p>Can some one tell me how to fix it?</p>

<p>Or does docker support run a container in which the user is a specific one than the default <code>root</code>?</p>