HowTo: Add custom headers to docker client requests

It is possible to add custom http header Show archive.org snapshot to request made by the docker CLI client. This can be used to e.g. add another authentication header for a proxy.

Implementation

config.json

Add an entry to ~/.docker/config.json:

{
	"HttpHeaders": {
		"X-Meta-$YOURKEY": "SomeValue"
	}
}

Environment Variable (Experimental)

Warning

Requires version v27.1 or higher.

Set DOCKER_CUSTOM_HEADERS, must be provided as a comma-seperated list of name=value pairs Show archive.org snapshot .

Caveats:

Ruben Aleman