0

I've got a container started (not my code, not my container, but I often manage the server and deal with the aftermath of it being patched) and I need to make a hot-fix to the deployment strategy, I had gone through the steps to change it to auto-restart, but a coworker noticed that the container was started with --rm. My guess is that this is circumventing any attempt to start it up after reboots (because the container just isn't there any more)

So is there a way to remove the --rm policy from a running container?

1
  • the real answer here is - convince the docker owner to enable swarm mode and deploy as a service. Jul 20, 2022 at 9:00

1 Answer 1

0

You can use a docker update. (https://docs.docker.com/engine/reference/commandline/update/).

docker update --restart always <containerID>/<containerName>.

Not sure about removing the --rm flag, though

1
  • Welcome to the site Bryan, I'm sorry but this doesn't quite answer my question. I know how to set the autostart parameters, but I'm pretty sure it doesn't help since the container is set to auto remove.
    – Peter Turner
    Jul 19, 2022 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.