ikke-t / podman-container-systemd

creates systemd files and creates containers using podman
118 stars 44 forks source link

does work with local container images #33

Open martinrm77 opened 3 years ago

martinrm77 commented 3 years ago

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.

ikke-t commented 3 years ago

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 commented 3 years ago

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.

benblasco commented 3 years ago

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

ikke-t commented 3 years ago

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.

martinrm77 commented 3 years ago

Sounds good. out with it.

maybe a comment somewhere that you recommend using auto update?

benblasco commented 3 years ago

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!

ikke-t commented 3 years ago

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.

Ramblurr commented 3 years ago

The fix is super simple:

To the tasks

add the following to the when condition list:

      - container_image_user is defined
      - container_image_password is defined
benblasco commented 3 years ago

@Ramblurr will you submit a PR?

Ramblurr commented 2 years ago

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?

ikke-t commented 2 years ago

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