Skip to content
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

Cannot run bootc container on localhost - getting "connection refused" #86

Closed
zdohnal opened this issue Feb 11, 2025 · 8 comments
Closed

Comments

@zdohnal
Copy link

zdohnal commented Feb 11, 2025

Hi,

I'm a bootc newbie, following https://docs.fedoraproject.org/en-US/bootc/getting-started/ . I have following Containerfile:

FROM quay.io/fedora/fedora-bootc:41
RUN dnf -y install setup
RUN dnf -y install cups && dnf clean all

which I build by:

podman build -t localhost/zdohnal/cups:bootc bootc/cups

and then try to run by bootc:

$ podman machine init --rootful --now
$ podman-bootc run --filesystem=xfs localhost/zdohnal/cups:bootc

but the last command ends with error:

$ podman-bootc run --filesystem=xfs localhost/zdohnal/cups:bootc
Trying to pull localhost/zdohnal/cups:bootc...
Error: unable to install bootc image: failed to pull image: initializing source docker://localhost/zdohnal/cups:bootc: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused

Do you know what can be the issue? podman-machine, podman-bootc do not have any service to run, and podman service running does not have any effect.

OS: Fedora 41
Podman:

podman-5.3.2-1.fc41.x86_64
podman-machine-5.3.2-1.fc41.x86_64
podman-bootc-v0.1.1~123~g96bfc8f-1.20241210141826117469.main.123.96bfc8f.fc41.x86_64

Thank you in advance!

Zdenek

@zdohnal
Copy link
Author

zdohnal commented Feb 11, 2025

I have tried to install podman-docker package (due having docker in the URL in the error, so I thought it is issue of bad name), but no change.

@lulinqing

This comment has been minimized.

@zdohnal
Copy link
Author

zdohnal commented Feb 26, 2025

Sorr for not updating the issue - in the end (IMO) it is issue with documentation at https://docs.fedoraproject.org/en-US/bootc/getting-started/ . Based on the docs, it looks like podman-machine is needed only for running the bootc container, but that's not correct. You have to have podman-machine running before building bootc container, so the container gets built into the podman machine, not on your localhost. Then the bootc container was started correctly.

The tricky thing is that if you build locally once, you have to specify you want to build into podman machine instead of locally - you have to find out the podman machine name (do podman system connection list), and use that name for -c argument when running podman build. Switching the default connection did not work for some reason at first time, so we had to use -c <name> argument. The podman-bootc worked.

@zdohnal zdohnal closed this as completed Feb 26, 2025
@lulinqing
Copy link

lulinqing commented Feb 26, 2025

Thanks @zdohnal !

It confused me at first since podman build -c doesn't have connection argument and returned an error saying -c is for cpu-shares.
Then it hit me that --connection is an argument for podman so it have to be between "podman" and "build" like podman -c podman-machine-default-root build -t testing_image -f ./Containerfile

However, there is unexpected issue that all userspace packages specificed in Containerfile were installed as expected, but the kernel wasn't updated for some reason (unless converted to qcow2 image and started with qemu).

@vrothberg
Copy link
Member

Thanks for opening the issue!

We recently updated the README of podman-bootc to highlight how to run it on Linux. Shall we update the upstream getting started guide as well?

@lulinqing
Copy link

Thanks for opening the issue!

We recently updated the README of podman-bootc to highlight how to run it on Linux. Shall we update the upstream getting started guide as well?

Thanks!

BTW can we also simplify podman-bootc installation on RHEL (similar as on Fedora)?
It currently has quite some dependency issues with rhel+epel enabled.

@vrothberg
Copy link
Member

BTW can we also simplify podman-bootc installation on RHEL (similar as on Fedora)?

At the moment, the future of podman-bootc is not 100 percent clear. Over time, especially @cgwalters' mind has shifted a bit from podman-bootc to something closer to an SDK.

We want to look into it after summit.

@zdohnal
Copy link
Author

zdohnal commented Feb 26, 2025

@vrothberg I have created PR for Fedora guide https://gitlab.com/fedora/bootc/docs/-/merge_requests/92 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants