-
Notifications
You must be signed in to change notification settings - Fork 881
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
[Feature Request] Support for Podman #1060
Comments
Looks like podman has a docker-compatible REST api, so should be working out of the box as far as I can tell. I haven't tried it myself though: https://podman.io/blogs/2020/07/01/rest-versioning.html |
if podman service is running, this should work:
|
Update; it sort of worked when I tried it:
Not really sure what is going on here. It checks the watchtower image and concludes that |
The cause of the error above is: containers/podman#9803 (Finding 4)
By patching these two in the new config I were able to successfully recreate a podman container: // pkg/container/client.go:214
hostConfig.Ulimits = nil
name = name[1:] Log output from successful run
This still leaves the issue of it always trying to update the containers though:
|
Found the cause of the image always being treated as "stale":
Podman doesn't return the image ID in the container inspect result, giving the image "name" instead.
So, overall, this could be implemented, but would require a special flag for "podman mode". |
+1 I'm considering transitioning future systems to use Podman and would like to see these edge cases worked out. |
feel free to join in on the efforts 👍🏽 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Note that podman has something like watchtower built-in: https://docs.podman.io/en/latest/markdown/podman-auto-update.1.html |
I see one needs to create a systemd unit for the container needed to be auto-updated. If I were to have all my containers auto-updated, does it mean I need to create a systemd unit file for each one (instead of allowing the systemd unit to auto-update all containers, as well as those to be installed in the future)? Thanks |
@piksel it now returns the image id, so this could be done. ULimits still an issue. |
@R8s6 please read the linked docs. |
I made a PR, but still facing this issue:
Seems that podman does NOT like explicitly specifying everything, even if it was defaulted to that value. |
I have this error on multiple containers now. How can i fix what watchtower messed up? |
remove the containers and create them again |
The same error. |
Try to build podman with this commit: containers/podman@6ea703b
|
thanks! |
one container could not be started after re-creation
|
Same here.. it re-creates the container but it fails to start... |
Confirming issue is still present in podman release v4.6.0 |
Still present in 4.8.x. Does watchtower use something similar like executing Unfortunately it is unsolved. Maybe someone can raise a new issue to solve this in podman? |
I have the same issue. |
Same on podman 5.2.2 I think this maybe watchtower set memory swappiness to 0 for containers. I do some research abount the low-level runtime of podman used by default, which is crun. See here if (memory->swappiness_present)
{
if (cgroup2)
return crun_make_error (err, 0, "cannot set memory swappiness with cgroupv2");
len = sprintf (fmt_buf, "%" PRIu64, memory->swappiness);
ret = write_cgroup_file (dirfd, "memory.swappiness", fmt_buf, len, err);
if (UNLIKELY (ret < 0))
return ret;
} I use Cool,let's dig deeper to this then I found that containers has set memory.swappiness in podman inspect <container>| grep OCIConfigPath then compare the file with some containers created by podman But who gives the 0 value? I inspect a container in a server running with docker, we will see How about using podman? well, podman gives zero even this value is not set. Then watchtower copy this and send container info to docker socket(emulated by podman) with zero setted in |
What's missing here to get the same functionality as for docker? |
podman needs to return same value as docker api. and podman says it maybe fix in v6 |
so this feature is gated by podman, rather than watchtower, right? |
This compose file works with Rocky linux (proxmox VM) / Podman :
docker.sock is automatically translated to podman.sock by podman, so this mapping works in my Podman :
Best regards :) Had this output after run (don't know if update errors are due to podman) :
And this is my portainer compose file witch also uses docker.sock with podman/rocky and works :
|
how come you map the volume to /var/run/docker.sock? |
The mapping (full docker compose in my other post) : you need to :
Podaman translates docker directives to podman directives automaticly (you do not need use podman.sock, use docker.sock instead). |
Is your feature request related to a problem? Please describe.
Currently
watchtower
requires/var/run/docker.sock
, which is not present in a system with onlypodman
installed (i.e. wheredocker
is not installed).Describe the solution you'd like
Potentially supporting
podman
in the future.Thanks!
The text was updated successfully, but these errors were encountered: