here's how my Dockerfile look like :
[root@centos7 ~]# cat Dockerfile# syntax=docker/dockerfile:1#use centos imageFROM centos# Add none root userCMD useradd admin && echo "admin:admin" CMD chpasswdCMD adduser admin sudoUSER admin#install python git and gcc libsRUN sudo yum install python3 python3-devel git gcc sassc redhat-rpm-config libxslt-devel \ bzip2-devel openldap-devel libjpeg-devel freetype-devel
When I lunch the build of the image here's the error I encounter :
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 ---> Running in 4d6c76160178unable to find user admin: no matching entries in passwd file
anyone has an idea/suggestion why the user entry in the passwd file is not found ?