-
Issue DescriptionHi, I am trying to automate container image creation using Azure pipelines, Repo Name: BuildContainerPipeline
Describe the results you received
Pipeline Log:
Pipeline Log:
Describe the results you expected
podman info output (ran from my local fedora box)
I could not get able to resolve this issue or find alternative solution for my use case. Request the community to help me on this issue. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 26 replies
-
Full disclosure: I know basically nothing about Azure or it's pipelines. I also don't know much/anything about the YAML you posted. The errors you posted are very typical for trying to run containers inside containers. Bottom-line: They normally typically require a In any case, you said "trying to automate container image creation". This actually can possibly be done using the Anyway, one key thing is the top-level (host) environment needs to provide the
If you get an error like this, it's because the build container can't access
If you get an error during the image build regarding failure/permission-denied setting ownership on a file or directory: The build container's user-namespace isn't large enough. The typical default is 65536 ID's but some container images (debian/ubuntu specifically) try to use UID/GID 65535 (for apt?) which will fail. The only way to fix that that I'm aware of is to run the build container as root (ick!) or allocated more IDs to the user (on the host) in Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
This is almost always the sticking point. Note:
In terms of the host, it would be the
...ugg, if that's coming from the host, it's probably a show-stopper. I could be wrong (I don't know this environment), it might be possible to install it (from somewhere) and dang.
That's not needed if you use the buildah-image. They're for running rootless podman inside the (also rootless) podman image. For the buildah image there's not much point, it's just extra complication for not much actual benefit. In any case, assuming you can't use a different disk image for the host, you may be stuck. IMHO, this is why many/most cloud providers offer a dedicated container-image build service. It hides nearly all the container-in-container complications. The other folks you pinged may have an idea of how/if you can get around not having |
Beta Was this translation helpful? Give feedback.
-
Just had a thought...with the aim of getting you building in this environment quickly. There are non-container-engine build tools available. For example, google's Kaniko is fairly easy to use. They even make a container image for this purpose - though you can also just install/run kaniko directly as well. There are other tools too, I'm just not familiar with them. |
Beta Was this translation helpful? Give feedback.
-
Oh good, okay so that means it can work with docker + podman's seccomp, or just native podman.
Yeah, as I predicted. If you can't get the seccomp profile into ECS, I expect tools like Kaniko will have similarly abysmal performance. Leveraging some of the caching options can help, along with a carefully crafted Containerfile/Dockerfile. Otherwise, besides using a dedicated SaaS image-build service (which can have their own limitations), the only way to boost storage performance that I'm aware of is by using fuse-overlay (which you discovered isn't an option 😞) or some other more direct storage driver (also unlikely in this environment). Given all that you've been through with this, it may be worth taking a step back and examining the overall architecture WRT image builds and associated automation. Perhaps a pivot to gihub-workflows or gitlab-ci are possibilities (I know both of them to work w/ a fuse-overlay setup)? (BTW, I'm out on PTO for the next two weeks) |
Beta Was this translation helpful? Give feedback.
...okay, yep, this definitely works (thanks @nalind!).
Below I'm mimicking a pipeline environment through podman, so you can see I'm not granting any extra privileges or providing
/dev/fuse
. Just setting the required env. vars., and using the buildah image to execute the build command. I'm using the skopeo source because it's convenient, you don't actually need any volume mounts for this to work, just theContainerfile
(and any other necessary content):