Hi,
I build an image with Buildah and I can run a container with Podman based on this image
without any problems.
Now I need to run a container based on this image with Docker and it fails.
I get this error:
/usr/bin/docker-current: Error response from daemon: oci runtime error:
container_linux.go:235: starting container process caused "exec:
\"/bin/bash\": stat /bin/bash: no such file or directory".
Are there some incompatibility with Docker or do I need to add something when I build my
image to get this image running on a docker host?
Bellow you can find the script I used to build my image:
#!/bin/bash
# start new container from scratch
newcontainer=$(buildah from scratch)
scratchmnt=$(buildah mount ${newcontainer})
# install the packages
yum install --nogpgcheck --installroot ${scratchmnt} rpm bash coreutils ansible
shadow-utils --releasever 7 --setopt=tsflags=nodocs
--setopt=override_install_langs=en_US.utf8 -y
# Clean up yum cache
if [ -d "${scratchmnt}" ]; then
rm -rf "${scratchmnt}"/var/cache/yum
fi
#create user and group
buildah run ${newcontainer} groupadd -g 10000 somegroup
buildah run ${newcontainer} useradd -u 10200 -g somegroup someuser
# configure container label, entrypoint, default user and default working directory
buildah config --label name=el7-ansible ${newcontainer}
buildah config --cmd /bin/bash ${newcontainer}
buildah config --user someuser ${newcontainer}
buildah config --workingdir /etc/ansible ${newcontainer}
# commit the image
buildah unmount ${newcontainer}
buildah commit ${newcontainer} el7-ansible
#some cleanup
buildah rm ${newcontainer}