Skip to content
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

FEAT: generate from running container #23

Closed
johnmmcgee opened this issue Nov 3, 2023 · 4 comments · Fixed by #43
Closed

FEAT: generate from running container #23

johnmmcgee opened this issue Nov 3, 2023 · 4 comments · Fixed by #43
Labels
enhancement New feature or request
Milestone

Comments

@johnmmcgee
Copy link

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

@johnmmcgee
Copy link
Author

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

@k9withabone k9withabone added the enhancement New feature or request label Nov 4, 2023
@k9withabone
Copy link
Member

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.

@johnmmcgee
Copy link
Author

@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(" ")')

k9withabone added a commit that referenced this issue Dec 13, 2023
Fixes: #23

Also, in joined quadlet values, strings containing any whitespace are
now quoted, not just if it conains a space.
@k9withabone
Copy link
Member

k9withabone commented Dec 13, 2023

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

k9withabone added a commit that referenced this issue Dec 26, 2023
Adds the `podlet generate container` command.

Closes: #23
@k9withabone k9withabone added this to the v0.2.3 milestone Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants