Docker Container Configuration

From NovaOrdis Knowledge Base
Revision as of 16:05, 5 May 2018 by Ovidiu (talk | contribs) (→‎RestartPolicy)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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