Docker - Start a Container Automatically: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=Internal=
=Internal=


* [[Docker Client Operations#Recipes|Client Operations]]
* [[Docker_Client_Operations#Container_Lifecycle_Operations|Container Liffecycle Operations]]


=Overview=
=Overview=

Revision as of 02:28, 5 December 2017

Internal

Overview

The restart policy can be specified when the container is started with --restart=always flag.

This does not seem to work with docker 1.7.1, I get the old configuration, even if I stop before editing.The container configuration may also be edited directly and the restart policy specified in /var/lib/docker/containers/<container-id>/hostconfig.json as:

...
"RestartPolicy":{"Name":"always","MaximumRetryCount":0},
...