![]() After addition of multi-host networking in Docker 1.9, Docker Remote API is still returning only the network specified during creation of the container in the “List Containers” (`/containers/json`) endpoint: ... "HostConfig": { "NetworkMode": "default" }, The list of networks containers are attached to is only available at Get Container (`/containers/<id>/json`) endpoint. This does not allow applications utilizing multi-host networking to be built on top of Docker Remote API. Therefore I added a simple `"NetworkSettings"` section to the `/containers/json` endpoint. This is not identical to the NetworkSettings returned in Get Container (`/containers/<id>/json`) endpoint. It only contains a single field `"Networks"`, which is essentially the same value shown in inspect output of a container. This change adds the following section to the `/containers/json`: "NetworkSettings": { "Networks": { "bridge": { "EndpointID": "2cdc4edb1ded3631c81f57966563e...", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:02" } } } This is of type `SummaryNetworkSettings` type, a minimal version of `api/types#NetworkSettings`. Actually all I need is the network name and the IPAddress fields. If folks find this addition too big, I can create a `SummaryEndpointSettings` field as well, containing just the IPAddress field. Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com> |
||
---|---|---|
.. | ||
_static | ||
images | ||
docker-io_api.md | ||
docker_io_accounts_api.md | ||
docker_remote_api.md | ||
docker_remote_api_v1.14.md | ||
docker_remote_api_v1.15.md | ||
docker_remote_api_v1.16.md | ||
docker_remote_api_v1.17.md | ||
docker_remote_api_v1.18.md | ||
docker_remote_api_v1.19.md | ||
docker_remote_api_v1.20.md | ||
docker_remote_api_v1.21.md | ||
docker_remote_api_v1.22.md | ||
hub_registry_spec.md | ||
README.md | ||
registry_api.md | ||
registry_api_client_libraries.md | ||
remote_api_client_libraries.md |
This directory holds the authoritative specifications of APIs defined and implemented by Docker. Currently this includes:
- The remote API by which a docker node can be queried over HTTP
- The registry API by which a docker node can download and upload images for storage and sharing
- The index search API by which a docker node can search the public index for images to download
- The docker.io OAuth and accounts API which 3rd party services can use to access account information