-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Auraboot] Can't find local Podman container #1631
Comments
I'm trying to see if the approach of mounting the podman socket as the docker socket inside an image works at all. This is what I see: # List local podman images (works)
~/tmp $ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/kairos/auroraboot latest d651acee6d20 2 weeks ago 1.17 GB
# List local podman images by mounting the podman socket as docker socket inside the auroraboot image (doesn't work)
~/tmp $ podman run --entrypoint "" -it -v /var/run/podman/podman.sock:/var/run/docker.sock:ro quay.io/kairos/auroraboot docker images
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json": dial unix /var/run/docker.sock: connect: permission denied
# List podman local image as root (works)
~/tmp $ sudo podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/busybox latest a416a98b71e2 6 days ago 4.5 MB
quay.io/kairos/auroraboot latest d651acee6d20 2 weeks ago 1.17 GB
docker.io/library/ubuntu latest 5a81c4b8502e 3 weeks ago 80.3 MB
# List local podman images as root by mounting the podman socket as docker socket inside the auroraboot image (works!)
~/tmp $ sudo podman run --entrypoint "" -it -v /var/run/podman/podman.sock:/var/run/docker.sock:ro quay.io/kairos/auroraboot docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 5a81c4b8502e 3 weeks ago 80.3MB
busybox latest a416a98b71e2 6 days ago 4.5MB
quay.io/kairos/auroraboot latest d651acee6d20 2 weeks ago 1.17GB This issue also seems a bit relevant: containers/podman#6015 (that's where I got the idea of running as root in the first place). I'm not sure if there is a simple way to fix it. If the issue I linked to is actually relevant, all the workarounds seems to involve becoming root in one way or another. |
For reference, this happens with a rootful container too. It doesn't have to be rootless |
In the description above, I can't tell if you are
Now, assuming you run this as root, the question is whether you run In other words, if you use the same user to:
you should be able to see your image inside the container. If you get to that point (with no auroraboot involved so far), I think auroraboot should also see the image. |
Sorry for the confusion @jimmykarily |
I created a script that reproduces the problem (runs fine on Arch):
The relevant output is this:
so docker sees the image as being there but auroraboot still tries to pull it. Maybe auroraboot is set to always-pull mode somehow? |
Running these inside the auroraboot container:
so it's luet that doesn't see the image |
luet is using this project to manipulate images: https://github.com/google/go-containerregistry but the "image not known" error seems to be coming from podman itself. I guess the way the library queries podman for an image is incompatible with podman (and would probably work with docker). Simply "masquerading" the podman socket as docker socket is probably not enough to fake it. If there is no specific reason to mix tools like this, I would say we can close this issue. There is not much we can do on this repo anyway. |
Thinking again, I guess the goal was never to mix tools but use podman instead of docker right? The mounting of podman socket inside auroraboot is just a "hack" to fool auroraboot. Rephrasing then: This is a feature request for auroraboot to support podman (with no hacks). I'll leave it open for discussion in the next planning. |
It turns out, the library we use wants to always have a registry. With some insight from @mudler we figured out a workaround:
You can prefix the image with |
Let's keep this open to document it. |
Auraboot can't find local images when using Podman (4.5.1).
I've verified that this works work Docker.
Podman installation
Auraboot issue
I've tried the following combinations
For reference, using
-v /var/run/podman/podman.sock:/var/run/docker.sock
works in Elemental-Toolkit when pulling local images withdocker://
The text was updated successfully, but these errors were encountered: