Is there a way to create a podman running container that cannot be deleted. On purpose, such that if it is stopped and a command runs prune it will not be removed.
1 Answer
You can use labels and filters for this. When you start the container, pass --label dontprune=y to podman run. When you prune, pass --filter "label!=dontprune=y" to podman container prune. Note that dontprune=y is arbitrary and any other label you want would work too.