docker-config-json - Man Page

Default Docker configuration file

Introduction

By default, the Docker command line stores its configuration files in a directory called .docker within your $HOME directory.  Docker manages most of the files in the configuration directory and you should not modify them. However, you can modify the config.json file to control certain aspects of how the docker command behaves.

Currently, you can modify the docker command behavior using environment variables or command-line options. You can also use options within config.json to modify some of the same behavior. When using these mechanisms, you must keep in mind the order of precedence among them. Command line options override environment variables and environment variables override properties you specify in a config.json file.

The config.json file stores a JSON encoding of several properties:

You can specify a different location for the configuration files via the DOCKER_CONFIG environment variable or the --config command line option. If both are specified, then the --config option overrides the DOCKER_CONFIG environment variable:

docker --config ~/testconfigs/ ps

This command instructs Docker to use the configuration files in the ~/testconfigs/ directory when running the ps command.

Examples

Following is a sample config.json file:

{
  "HttpHeaders": {
    "MyHeader": "MyValue"
  },
  "psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
  "imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
  "detachKeys": "ctrl-e,e"
}

History

January 2016, created by Moxiegirl mary@docker.com ⟨mailto:mary@docker.com⟩

Info

JANUARY 2016 Docker Community Docker User Manuals