title: Docker image build Error : unable to find user admin: no matching entries in passwd file
body: <p>here's how my Dockerfile look like :</p>
  <pre class="lang-sh prettyprint-override"><code>
  [root@centos7 ~]# cat Dockerfile
  # syntax=docker/dockerfile:1
  #use centos image
  FROM centos
  
  # Add none root user
  CMD  useradd admin &amp;&amp; echo &quot;admin:admin&quot; 
  CMD  chpasswd
  CMD  adduser admin sudo
  USER admin
  
  #install python git and gcc libs
  
  RUN sudo yum install python3 python3-devel git gcc sassc redhat-rpm-config libxslt-devel  \
      bzip2-devel openldap-devel libjpeg-devel freetype-devel
  
  </code></pre>
  <p>When I lunch the build of the image here's the error I encounter :</p>
  <pre class="lang-yaml prettyprint-override"><code>
  Step 6/24 : RUN sudo yum install python3 python3-devel git gcc sassc redhat-rpm-config libxslt-devel      bzip2-devel openldap-devel libjpeg-devel freetype-devel
   ---&gt; Running in 4d6c76160178
  unable to find user admin: no matching entries in passwd file
  
  
  </code></pre>
  <p>anyone has an idea/suggestion why the user entry in the passwd file is not found ?</p>