containers/podlet

FEAT: generate from running container

johnmmcgee opened this issue · 4 comments

It would be nice if it were possible to generate a systemd file from an already running container.

To add to this, possibly have it format podman generate systemd into quadlet format.

Generating a quadlet file from a running container has been an idea in the back of my mind for a while. However, it's a low priority.

have it format podman generate systemd into quadlet format

Unfortunately, podman generate systemd is being deprecated in favor of quadlet (see the podman 4.7.0 release notes). Other options for implementing this that I can think of are running the podman container inspect command or using the podman REST API.

@k9withabone I actually found this to work pretty well, but it would be nice if we could get this built in, in some way:

podlet -i podman $(podman container inspect jellyfin | jq -r '.[0].Config.CreateCommand[2:] | join(" ")')

Sorry I linked the wrong issue in that commit. Please ignore it.