Closed dove-young closed 5 years ago
And the command to build Nginx
from Dockerfile does not work yet.
podman run --privileged --network host -v /var/lib/containers:/var/lib/containers:rw -v /root/buildah/nginx:/tmp:Z buildah bud -f /tmp/Dockerfile -t nginx
no context directory or URL specified
To have it works on my system I must put the suffix .
on the command
podman run --privileged --network host -v /var/lib/containers:/var/lib/containers:rw -v /root/buildah/nginx:/tmp:Z buildah bud -f /tmp/Dockerfile -t nginx .
@dove-young thanks for raising the issue. @ipbabble this appears to be one of your blogs, can you PTAL?
This is really not a buildah bug, But a blog bug closing.
Description
Instructions in this blog does not work on CentOS 7
https://buildah.io/blogs/2018/03/01/building-buildah-container-image-for-kubernetes.html
Steps to reproduce the issue:
containerid=$(buildah from scratch)
scratchmnt=$(buildah mount $containerid)
yum install --nogpgcheck --installroot $scratchmnt --release 7 buildah --setopt install_weak_deps=false -y
yum clean all --installroot $scratchmnt --releasever 7
buildah config --entrypoint /usr/bin/buildah $containerid
buildah commit $containerid buildah
podman run localhost/buildah version
then hit error result.I can workaround this by change
--entrypoint /usr/bin/buildah
to--entrypoint '["/usr/bin/buildah"]'
in step 5.With
--entrypoint /usr/bin/buildah
parameter, the actual result created is as below and it does not work actually.And
/bin/sh -c /usr/bin/buildah version
does not work yet on my system. So I must change entrypoint to--entrypoint '["/usr/bin/buildah"]'
to get it work.Describe the results you received:
Describe the results you expected:
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: