Closed thomassuedbroecker closed 4 years ago
@rhatdan I'm pretty sure we have a blog somewhere about builds in locked-down containers, but I can't seem to locate it. Would you happen to know where it lives?
@mheon @rhatdan I tried different resources, but I end up in all paths with the same problem you find here.
I think the recommendation for builds specifically is to use buildah
with the chroot
isolation. @nalind Do we have any documentation on that?
Not as such AFAIK, but the default images we provide set BUILDAH_ISOLATION to "chroot" in the environment and configure storage.conf to use the "overlay" driver with "mount_program=/usr/bin/fuse-overlayfs", which requires that the container be started with --device /dev/fuse
or an equivalent. Prior to fuse-overlayfs being an option, we were using the "vfs" driver, which doesn't require any special privileges.
@nalind hmm, that sounds a bit like the new error I get now.
I tried out using Fedora with my new Dockerfile Fedora.Dockerfile. I was hoping maybe that will solve the problem and I did same steps.
command:
podman build -t authors:v1 .
But that is the result: output:
Error: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph driver
@nalind @nalind @rhatdan Maybe you know it, where can I find a simple Dockerfile template with the right settings to build a container image, in which I can execute one of these commands?
podman build -t myimage:v1 .
or
buildah bud -t myimage:v1 .
Do you have a link to such Dockerfile? That would be awesome ...
I wrote an article on this last year:
https://developers.redhat.com/blog/2019/08/14/best-practices-for-running-buildah-in-a-container/
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Unable to build a container image with Podman inside a running Docker container
Steps to reproduce the issue:
Describe the results you received:
The build stops where the RUN commands inside the Dockerfile are starting.
Describe the results you expected:
The image should be builded.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.): Running Docker container with docker desktop community Version: 2.5.0.0 (49427) Channel: stable