Let’s say that for some desired functionality I needed to run my container with…
–cap-add NET_ADMIN
Is it possible to add that to an existing container? If not, what is the standard approach to modifying an existing container? Are there any options besides…
Delete the container and start over from the image.
Make an image from the container and then re-run the container from that image.
You should always be able to delete a container and start it with new parameters. There are some parameters that you could change without recreating the container, but even then you would need to restart it. If you can restart it, you can also recreate it. Assuming you didn’t change anything inside the container. If you are looking for a supported way to change any parameter without recreating the container, then there is no way. Maybe, if you know the Linux kernel enough, you could do some hacks, but I don’t know about that.