containers / podlet

Generate Podman Quadlet files from a Podman command, compose file, or existing object
https://crates.io/crates/podlet
Mozilla Public License 2.0
322 stars 10 forks source link

Check for existing systemd service with the same name when writing a file #14

Closed Nitrousoxide closed 1 year ago

Nitrousoxide commented 1 year ago

Currently creating a podman.container file in the quadlet watched folder will have it create its own podman.service file which will break podman. I opened a ticket on the podman github, but you may want to change the default name to "podlet.container" or "default.container" so that it avoids this issue. Right now it creates "podman.container" which causes this bug if you use the export funtion to deploy it to the quadlet watched folder without a defined container name.

https://github.com/containers/podman/issues/18275

k9withabone commented 1 year ago

The name of the .container file is taken from the name of the image, so it's really only a problem if you're attempting to use podman within podman. I'll add a check and throw an error if the image name (if not provided a name) or the given name matches an existing service.