Docker - Start a Container Automatically

From NovaOrdis Knowledge Base
Revision as of 17:55, 19 April 2017 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

Internal

Overview

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

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},
...