1CONFIG.JSON(5)                   JANUARY 2016                   CONFIG.JSON(5)
2
3
4

NAME

6       HOME/.docker/config.json - Default Docker configuration file
7
8
9

INTRODUCTION

11       By default, the Docker command line stores its configuration files in a
12       directory called .docker within your $HOME directory.  Docker manages
13       most of the files in the configuration directory and you should not
14       modify them.  However, you can modify the config.json file to control
15       certain aspects of how the docker command behaves.
16
17
18       Currently, you can modify the docker command behavior using environment
19       variables or command-line options. You can also use options within
20       config.json to modify some of the same behavior. When using these
21       mechanisms, you must keep in mind the order of precedence among them.
22       Command line options override environment variables and environment
23       variables override properties you specify in a config.json file.
24
25
26       The config.json file stores a JSON encoding of several properties:
27
28
29              ·
30
31
32              The HttpHeaders property specifies a set of headers to include
33              in all messages sent from the Docker client to the daemon.
34              Docker does not try to interpret or understand these header; it
35              simply puts them into the messages. Docker does not allow these
36              headers to change any headers it sets for itself.
37
38              ·
39
40
41              The psFormat property specifies the default format for docker ps
42              output.  When the --format flag is not provided with the docker
43              ps command, Docker's client uses this property. If this property
44              is not set, the client falls back to the default table format.
45              For a list of supported formatting directives, see docker-ps(1).
46
47              ·
48
49
50              The detachKeys property specifies the default key sequence which
51              detaches the container. When the --detach-keys flag is not
52              provide with the docker attach, docker exec, docker run or
53              docker start, Docker's client uses this property. If this
54              property is not set, the client falls back to the default
55              sequence ctrl-p,ctrl-q.
56
57              ·
58
59
60              The imagesFormat property  specifies the default format for
61              docker images output. When the --format flag is not provided
62              with the docker images command, Docker's client uses this
63              property. If this property is not set, the client falls back to
64              the default table format. For a list of supported formatting
65              directives, see docker-images(1).
66
67
68
69       You can specify a different location for the configuration files via
70       the DOCKER_CONFIG environment variable or the --config command line
71       option. If both are specified, then the --config option overrides the
72       DOCKER_CONFIG environment variable:
73
74
75              docker --config  /testconfigs/ ps
76
77
78
79       This command instructs Docker to use the configuration files in the
80       /testconfigs/ directory when running the ps command.
81
82

Examples

84       Following is a sample config.json file:
85
86
87              {
88                "HttpHeaders": {
89                  "MyHeader": "MyValue"
90                },
91                "psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
92                "imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
93                "detachKeys": "ctrl-e,e"
94              }
95
96
97
98

HISTORY

100       January 2016, created by Moxiegirl ⟨mary@docker.com⟩
101
102
103
104Docker Community              Docker User Manuals               CONFIG.JSON(5)
Impressum