podman-container-systemd icon indicating copy to clipboard operation
podman-container-systemd copied to clipboard

does work with local container images

Open martinrm77 opened this issue 5 years ago • 11 comments

The forcing of container download makes it fail when the containers are build locally - it tries to download from localhost (because podman prefixes local builds with localhost).

changing force to false in the "running single container, ensure we have up to date container image" task does the trick for me.

martinrm77 avatar Nov 17 '20 09:11 martinrm77

Thanks for the info! This is easy addition if you'd want to contribute a PR. Adding variable to defaults with force -value, and then using it at image pull option.

ikke-t avatar Nov 18 '20 16:11 ikke-t

On the other hand, the whole image pull will soon change due the auto-update feature of podman. Then we don't need this step at all.

ikke-t avatar Nov 18 '20 16:11 ikke-t

Any update on this? I have the same requirement, and can contribute to the project more broadly via some documentation rather than code.

benblasco avatar Jan 28 '21 23:01 benblasco

Now that the podman has auto update, and I'm personally using it, I feel like this image pull could be removed altogether. How do people feel about it, would it break some workflow for anyone?

This issue would get fixed while doing so.

ikke-t avatar Jan 29 '21 15:01 ikke-t

Sounds good. out with it.

maybe a comment somewhere that you recommend using auto update?

martinrm77 avatar Feb 01 '21 16:02 martinrm77

Does this just amount to a documentation update to explain how to use local containers and specify the minimum podman version for the feature to work? Happy to help with documentation once I understand it a little better!

benblasco avatar Feb 05 '21 06:02 benblasco

Sorry to say but I have no use case for this, so perhaps one of you makes a PR so it gets done. I'm happy to merge it. Now that I think again about removing podman ansible module from pulling images, I recall it might break something. Someone had it due they needed to authenticate to registry. If that get's removed, make sure podman authenticates to registry if creds are given.

Change is really small anyhow.

ikke-t avatar Feb 05 '21 08:02 ikke-t

The fix is super simple:

To the tasks

  • "running single container, ensure we have up to date container image"
  • "seems we use several container images, ensure all are up to date"

add the following to the when condition list:

      - container_image_user is defined
      - container_image_password is defined

Ramblurr avatar Mar 22 '21 16:03 Ramblurr

@Ramblurr will you submit a PR?

benblasco avatar Mar 23 '21 13:03 benblasco

Diving into this again, I'm afraid my proposed fix will prevent pulling of public images when no user/pass is defined. Is that a problem?

Ramblurr avatar Apr 22 '22 12:04 Ramblurr

Yes, I'd say so. It needs to pull also if no user auth is required.

ikke-t avatar Apr 22 '22 12:04 ikke-t