A few weeks ago I’ve created a customized docker Ubuntu (14.04) image with some ansible and Galaxy Roles.
The main idea was to share my ansible tools with others.
the image was built and exported on a Ubuntu machine.
One my collegues has a Centos 7 VM with docker
centos-release-7-5.1804.el7.centos.2.x86_64
docker version
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:06:25 2017
OS/Arch: linux/amd64
Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.12)
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:06:25 2017
OS/Arch: linux/amd64
Experimental: false
We’ve been able to import the image.
Creating the container using the “docker run -it --name ansiblecontainer -v /usr/playbooks:/playbooks -e TZ=“Europe/Paris” -u root 76619dba82ae”
will give me this type of output:
“docker: Error response from daemon: No command specified.”
I noticed the container was created after even with some error.
but It’s not possible To start the container : “docker start 60cf9ff092c7” will give me
“Error response from daemon: linux spec user: unable to find user root: no matching entries in passwd file
Error: failed to start containers: 60cf9ff092c7”
If your image does not have a default command set to run on startup (in your Dockerfile) you have to provide one yourself on the command line. You could add ‘/bin/bash’ and try.
"docker: Error response from daemon: linux spec user: unable to find user root: no matching entries in passwd file. "
and will create the docker container
[root@xxxxx ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5a91eeba4afd 76619dba82ae “/bin/bash” 7 seconds ago Created ansibletest
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused “exec: “cat”: executable file not found in $PATH”.