Open dawidp opened 1 year ago
This is indeed not something we do at the moment, there is https://github.com/cockpit-project/cockpit-podman/pull/1270 open which offers a clone/copy feature.
I think this feature is very imported. At the moment is very annoying to change something. A clone/copy feature could help but isn't really the same… :(
Meanwhile, is there a way to edit them outside of the UI, maybe by editing a text file somewhere in the system via the terminal? Not ideal but it would be a lot better than deleting and creating them again.
@leocb: No, because that has the same conceptual difficulties as in the UI, as discussed in #1270. The closest is probably podman generate spec|systemd|kube
(see man podman-generate
). But this is more like templating. One really can't "edit" a container with any common-sense meaning of the word (not changing anything implicitly).
Meanwhile, is there a way to edit them outside of the UI, maybe by editing a text file somewhere in the system via the terminal? Not ideal but it would be a lot better than deleting and creating them again.
You can use podman-compose
with docker-compose.yml
files. It makes it much easier to edit, but when using compose you should start and stop the containers from shell, UI is not very helpful then. But it is possible to use UI features to inspect your running containers.
the saddest thing is that you need to set everything up again just to change a single value in the environment variables. all the volumes, ports, scripts, etc... this makes cockpit not really usable for container management
Yes it makes podman module quite unfriendly. I think it would be possible to add option "Export config to file" and later create new container from it
+1 to this in general.
I would say just copy what Portainer does with the Duplicate/Edit option The key as mentioned in this thread is to simply maintain all the custom edits made to the first container, allow the admin to Change/Add/Delete whatever they like, and then when they "save", you simply re-deploy the container with the new edits.
Example, I just deployed PiHole but forgot to add Volume mounts for /etc/dnsmasq and /etc/pihole If we had edit, I could simply add those and redeploy But without them, I will need to not only add those to the GUI (which is a bit clunky I might add), but also re-enter the 5 different Ports and 3 different Environment variables as well.
Another option that would be nice, is to read the image spec and see what Volumes/Ports/EnvironmentVars are recommended and default those when creating a new container from the Image list. Saves me from having to go lookup the details on GitHub for every container.
I would say just copy what Portainer does with the Duplicate/Edit option
+1 for this
But I would also like Recreate
option for updating a container to latest image
i spent quite some time trying to figure out why cockpit-podman ignored my /etc/containers/storage.conf completly, googling landed me here. and i have to agree, the lack of configuration options renders the podman plugin for cockpit completly useless for all but cases where users just have one big storage for everything, and dont intend too run any dockers needing special devices or settings. You might want to warn people about this in the readme, as it would have saved me and probably others a lot of time.
Would be nice if cockpit-podman would go the way with systemd and puts the configuration into ~/.config/containers/systemd/{servicename}.container Better than any compose file and you can just edit it, do a daemon-reload and start the {servicename}. With 5.0 even pods are working.
Any update on this?
Are there any plans to implement this feature? Because as far as I can tell, even changing the run command which gets used for the container requires destroying it. How can this not be an option?
I stopped using cockpit for podman and start using quadlet files from cockpit terminal, where are better settings and better save of configuration. Current cockpit podman cannot be used for anything useful. Even run commands on containers aren't good, not mention reading logs.
I don't see option to "Edit" containers or pods: