mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #15984 from jlhawn/document_build_auth_config
[docs] Add description of "X-Registry-Config"
This commit is contained in:
commit
ee4de4d163
2 changed files with 44 additions and 2 deletions
|
@ -1341,7 +1341,28 @@ Query Parameters:
|
||||||
Request Headers:
|
Request Headers:
|
||||||
|
|
||||||
- **Content-type** – Set to `"application/tar"`.
|
- **Content-type** – Set to `"application/tar"`.
|
||||||
- **X-Registry-Config** – base64-encoded ConfigFile object
|
- **X-Registry-Config** – A base64-url-safe-encoded Registry Auth Config JSON
|
||||||
|
object with the following structure:
|
||||||
|
|
||||||
|
{
|
||||||
|
"docker.example.com": {
|
||||||
|
"username": "janedoe",
|
||||||
|
"password": "hunter2"
|
||||||
|
},
|
||||||
|
"https://index.docker.io/v1/": {
|
||||||
|
"username": "mobydock",
|
||||||
|
"password": "conta1n3rize14"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
This object maps the hostname of a registry to an object containing the
|
||||||
|
"username" and "password" for that registry. Multiple registries may
|
||||||
|
be specified as the build may be based on an image requiring
|
||||||
|
authentication to pull from any arbitrary registry. Only the registry
|
||||||
|
domain name (and port if not the default "443") are required. However
|
||||||
|
(for legacy reasons) the "official" Docker, Inc. hosted registry must
|
||||||
|
be specified with both a "https://" prefix and a "/v1/" suffix even
|
||||||
|
though Docker will prefer to use the v2 registry API.
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
|
@ -1351,7 +1351,28 @@ Query Parameters:
|
||||||
Request Headers:
|
Request Headers:
|
||||||
|
|
||||||
- **Content-type** – Set to `"application/tar"`.
|
- **Content-type** – Set to `"application/tar"`.
|
||||||
- **X-Registry-Config** – base64-encoded ConfigFile object
|
- **X-Registry-Config** – A base64-url-safe-encoded Registry Auth Config JSON
|
||||||
|
object with the following structure:
|
||||||
|
|
||||||
|
{
|
||||||
|
"docker.example.com": {
|
||||||
|
"username": "janedoe",
|
||||||
|
"password": "hunter2"
|
||||||
|
},
|
||||||
|
"https://index.docker.io/v1/": {
|
||||||
|
"username": "mobydock",
|
||||||
|
"password": "conta1n3rize14"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
This object maps the hostname of a registry to an object containing the
|
||||||
|
"username" and "password" for that registry. Multiple registries may
|
||||||
|
be specified as the build may be based on an image requiring
|
||||||
|
authentication to pull from any arbitrary registry. Only the registry
|
||||||
|
domain name (and port if not the default "443") are required. However
|
||||||
|
(for legacy reasons) the "official" Docker, Inc. hosted registry must
|
||||||
|
be specified with both a "https://" prefix and a "/v1/" suffix even
|
||||||
|
though Docker will prefer to use the v2 registry API.
|
||||||
|
|
||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue