Docker Container Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=


* [[Docker]]
* [[Docker Concepts#Configuration|Docker Concepts]]
* [[Docker_Server_Configuration#Docker_Container_Configuration|Docker Server Configuration]]


=Overview=
=Overview=
The container configuration resides under /var/lib/docker/containers/<''container-id''>. Note that these files must not be edited directly. Configuration can be changed retrieved with:
[[docker inspect]]
and can be changed with:
[[docker update]]


=hostconfig.json=
=hostconfig.json=


==RestartPolicy==
==RestartPolicy==
The container's [[Docker Concepts#Restart_Policy|restart policy]] specifies how container are restarted when the docker server is restarted.
<syntaxhighlight lang='json'>
{ ... "RestartPolicy":{"Name":"no","MaximumRetryCount":0}, ... }
</syntaxhighlight>
Also see {{Internal|Docker - Start a Container Automatically|Start a Container Automatically}}

Latest revision as of 16:05, 5 May 2018

Internal

Overview

The container configuration resides under /var/lib/docker/containers/<container-id>. Note that these files must not be edited directly. Configuration can be changed retrieved with:

docker inspect

and can be changed with:

docker update

hostconfig.json

RestartPolicy

The container's restart policy specifies how container are restarted when the docker server is restarted.

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

Also see

Start a Container Automatically