-1

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 1

0

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.