-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
podman run seems to be trying to pull local images as if they don't exist and or are hosted at localhost. #12509
Comments
Thanks for reaching out. Any chance you can share a sequence of podman commands that lead to the issue? Cloning a git repo and analyzing everything is time costly. |
By the way, I am able to successfully setup everything using docker (not podman) on a different machine. So it is definitely a parity issue between them. Here are some relevant code snippets of how docker is used. Later docker run will work fine, but it doesn't with podman.
|
@bayeslearner, how are you running Podman? By aliasing docker=podman or by pointing the Docker client to the Podman socket? |
Not a problem with how podman is run. I'm using it for other docker-compose/docker related stuff. dnf install docker-compose podman-docker |
Thanks, @bayeslearner. This issue should already be fixed in the main branch by commit 5bdd571. Short-name normalization works very differently in Podman when compared to Docker. However, we recently made Podman behave like Docker on the Docker REST API. What happens is that the image is being tagged as The fix will be shipped with the next major release of Podman (i.e., 4.0 early next year). |
Note that in docker hub the tag 0.86 for that container image doesn't exist, being the dev branch. In the mean time, is there a work-around, given the snippet below?
|
@bayeslearner, a workaround would be to replace all image references on |
I did prefix everything with "docker.io" and the errors are still there. Upon further trial and error, I think the errors are due to various issues besides the tag's naming issue. Issue 1. rootful podman build and rootless podman run clash. podman won't find the image built for root.
Issue2. selinux volume mounting. After fixing Issue 1 and 2, I was able to run ansible inside the built container image.
However, I ran into the third issue: Issue3. ansible template can't move temp files into mount directory.
Any suggestions? From the perspective of container namespace, the folder inside the podman container is owned by root and ansible is run as root too. So why can't it write to that folder /data/settings? |
Yes, it is not possible to access the storage of other users. So
Both solutions look good to me.
I have two guesses: 1) try running without selinux or disable it temporarily just to be sure. 2) is there a symlink somewhere pointing to another destination as the reported one? |
Yeah, it seems to be selinux again. Thanks for the suggestion. Not sure how to fix it, except disable it. |
Did you try using |
NO, do not relabel content that is not private to the container. Relabeling ssh keys is a bad idea, since other confined objects on the host could break. Disable SELinux separation for the container if you are going to leak data like this inside. --security-opt label:disable You are basically giving the container the ability to attack every host with keys in ~/.ssh. Confining the container with SELinux is the least of your problems, if this is a hostile container. If a container broke out, you would definitely want SELinux to block access to these files.
|
That makes perfect sense, thanks @rhatdan ! |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
bug
Description
podman can't pull image from docker.io and built one locally, and preappends it with a "localhost" as repository. But later when podman run is executed, it tries to connect to "container registry localhost. "
Steps to reproduce the issue:
I used this git repository https://gitlab.com/NickBusey/HomelabOS
ran "make config" and it somehow decides to build (successfully) a local image.
Describe the results you received:
see above
Describe the results you expected:
podman should reuse local images and not try to ping a container registry called localhost
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:3.4.2
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? (https://github.com/containers/podman/blob/master/troubleshooting.md)
yes
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: