Closed artbegolli closed 3 years ago
@artbegolli thanks for the issue report. A couple quick questions. Can you include the the Dockerfile that you used? I notice the systemd warnings. Did you make changes to the cgroup_manager on this system?
Hey @TomSweeneyRedHat, thanks for the reply. The base image I used in this example is simply the quay.io/buildah/stable
base images with one of our tools also installed on it.
But for reference - here's the same issue running on quay.io/buildah/stable:latest
:
I'm totally unsure regarding the cgroups warning - this is the case even with running even the standard quay.io/buildah/stable:latest
image. Unless this could possibly be impacted by my Docker
runtime? AFAIK I've made no changes to any cgroup_manager?
@TomSweeneyRedHat Now that we have containers.conf patch we can set this in the buildah image, We can change the default to always use cgroup-manager==cgroupfs
Any additional thoughts on this @TomSweeneyRedHat?
Having the same issue with buildah-stable:v1.14.8 @ OpenShift 4.4.3. :(
However, without any warnings at all. There is just no image after the builda-bud build.
@glinkaf @artbegolli Are you still seeing this issue?
I have the same with latest buildah stable image, image is built but its not in the list of buildah images
I am also using vfs storage driver, because I am on K3s with containerd, so no clue how to add fuse device to each container there, documentation of containerd is not helping there.
buildah version 1.15.0 (image-spec 1.0.1-dev, runtime-spec 1.0.2-dev)
Seems like the problem is very easy to resolve - one needs to add --storage-driver vfs
also to images command (and all other commands) to make it work. Or rather set env var for this:
export STORAGE_DRIVER=vfs
buildah bud .
buildah images
@artbegolli does it work for you if you added storage-driver?
@Fodoj and @artbegolli sorry, a gazillion things at once and I've shuffled this off the radar. @Fodoj are you thinking we need to adjust the build process for the stable image or is the added option suitable? I'm a little hesitant to force the storage driver to one instance, but if it breaks out of the box otherwise.... @rhatdan thoughts?
After doing the research it seems that for “building in container”, especially “building in container running on Kubernetes”, vfs driver is way easier to use - and fuse in many cases is just way too much effort to enable (see my K3s + containerd example). Or at least that’s what many people do - fallback to vfs due to fuse requiring some host-level changes.
After doing the research it seems that for “building in container”, especially “building in container running on Kubernetes”, vfs driver is way easier to use - and fuse in many cases is just way too much effort to enable (see my K3s + containerd example). Or at least that’s what many people do - fallback to vfs due to fuse requiring some host-level changes.
This was my experience as well - although the performance implications of vfs are a bit discouraging.
@TomSweeneyRedHat It seems as though in order to use buildah successfully to build images in a container atm you need to dig through a number of issues to be able to do so (or have an in depth knowledge of fuse and linux filesystems). I reckon a quick win is just documenting the process somewhere.
This is not a bug in buildah, we plan on writing a series of blogs on running podman/buildah in a container, and including section on podman/buildah inside of kubernetes.
Description
I'm attempting to conduct a simple buildah build from within a container.
Running
buildah bud
appears to be executed successfully but once the build is complete the image is not being stored and neither are any individual layers. This is despite the build appearing to be completed successfully.Pulling an image from remote works as intended with the image being stored.
Steps to reproduce the issue: 1.
docker pull abegolli/ocib-buildah:latest
This pulls a simple example from https://github.com/artbegolli/buildah-noroot.docker run -it --security-opt seccomp:unconfined abegolli/ocib-buildah:latest
buildah bud --storage-driver vfs -t test-image:0.1.0 .
buildah images
Describe the results you received:
No built images will be present on the local image registry.
Describe the results you expected:
The successfully built image to be stored in the local image registry.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:Example terminal output from conducting a build:
Terminal output from conducting a pull storing the image successfully: