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
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