OK, I will see what they want to do. Thanks again for all your help.
One more question - if I do a --restart=always how can I later disable the restart? And is there a way to query the restart policy currently in effect for a container? (I guess thatās 2 questions
Use docker inspect
to see everything about a container, including restart policies.
Docker 1.10 added the docker update
command that can tune some parts of a container. Docker added the ability to use the docker update
command to change the restart policy. See docker update --help
on a 1.11 docker.
In 1.7.1 how can I update the restart policy?
That feature was not added until 1.11, so youāll have to recreate the container. It is definitely not a good idea to be on 1.7.1. It hasnāt had any security fixes backported to it. Iād recommend getting on latest.
I agree, but in many small companies, upgrading is often a hard sell. Often they donāt want to commit their scarce resources to it, preferring to spend them on bug fixes and new app features. And/or they have the āif it aināt broke donāt fix itā mentality. I have clients on old versions of django, python, jQuery, and more, and I cannot get them to upgrade.
When I apply this command āārestart=unless-stoppedā the container IP getting packet drop.
And the container status is restarting less than a second .
I configured static IP for the container.
if anyone else comes across this
docker update CONTAINER --restart always