Commit Graph

61 Commits

Author SHA1 Message Date
819b85bb3a Add Subnets info for user-defined network
* If user doesn't specify the subnets to create a network, it will pick
  subnets from inside preferred pool. This PR aims to inspect these subnets info

* Add integration tests for docker inspect the subnets.

* docker-py project is already synchronized.

* jenkins checks depend on https://github.com/docker/docker-py/pull/888

Fixes issue #18626

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 5cc672b0061f3df41073cb7b4ff962998a13a09c
Component: engine
2016-01-15 10:03:29 +08:00
f8714c52f0 Add IPAM Config Options to match libnetwork
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
Upstream-commit: 662cac08ef83ee105addb4d29f6e46188468306f
Component: engine
2016-01-14 14:32:25 -05:00
806650627f Add network ID to container inspect
Fixes issue #19089

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 9f676ade0aef66bb66a26171d6bfb27f105fa1df
Component: engine
2016-01-14 22:33:41 +08:00
2b7ea75ef2 Forced endpoint cleanup
docker's network disconnect api now supports `Force` option which can be
used to force cleanup an endpoint from any host in the cluster.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: b464f1d78cdfa2a4124e083b8f7b0f2353f12de3
Component: engine
2016-01-13 21:28:52 -08:00
9c6798de6b Add network interal mode
Signed-off-by: Chun Chen <ramichen@tencent.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: b70954e60a15d09756bd6b00a6fadedc64829477
Component: engine
2016-01-13 11:30:36 -05:00
69c1610f93 Merge pull request #19249 from calavera/carry_17414
[Carry 17414] Added additional container information to "docker info".
Upstream-commit: a79f96828f7da2fc762002bf79ab8a9dcf908457
Component: engine
2016-01-13 10:42:22 +01:00
a4e709fac0 Complete documentation about extra container information.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: e5edc168a65e038245efbc5353a456302554f4eb
Component: engine
2016-01-12 18:16:58 -05:00
62a5091381 Add a specific config for the update command
This allows to define clearly what is mutable or not in a container
and remove the use of the internal HostConfig struct to be used.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a4f6920731c6af27a7e89c3da8d0e6fd309de90a
Component: engine
2016-01-12 08:33:41 +01:00
7467c1af44 Allow user to choose the IP address for the container
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 2bb3fc1bc522059e9be5bd967b6a5c49917f5d0c
Component: engine
2016-01-08 10:09:16 -08:00
6f10e6b229 Add filter for network ls to hide predefined net
Add filter support for `network ls` to hide predefined network,
then user can use "docker network rm `docker network ls -f type=custom`"
to delete a bundle of userdefined networks.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 26dd026bd70c9c18a16b0e339821c309e56d8ff0
Component: engine
2015-12-23 13:26:40 +08:00
a04e1f9592 Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 843084b08b521a70baf9284ec4e23e941ab38367
Component: engine
2015-12-21 09:14:49 +08:00
9a50c6c5f4 Merge pull request #18559 from ahmetalpbalkan/return-container-networks
Proposal: Add container networks list to /containers/json
Upstream-commit: 0f749ad55ab794872e601b4f665b07c0be07abfc
Component: engine
2015-12-17 10:11:18 +01:00
b07ebd0f2f Add containers’ networks to /containers/json
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>
Upstream-commit: 755f8609f699a20cb47ec7269e3a9469541a9419
Component: engine
2015-12-14 19:03:23 -08:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
32056292f5 Update docs for addition of transfer manager
Closing the HTTP connection requesting a push or pull will cancel the
push or pull. This behavior also applies to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d92e7ad7356e10c86e7dc479356578ac40fd2bbd
Component: engine
2015-12-09 19:13:35 -08:00
8a7da51391 Check minimum kernel memory limit to be 4M
Fixes: #18405

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 2347f98003af34dd1cfd290bf0f2cc7e6ae07b03
Component: engine
2015-12-09 14:26:41 +08:00
a263d7120f Add token pass-thru for AuthConfig
This change allows API clients to retrieve an authentication token from
a registry, and then pass that token directly to the API.

Example usage:

    REPO_USER=dhiltgen
    read -s PASSWORD
    REPO=privateorg/repo
    AUTH_URL=https://auth.docker.io/token
    TOKEN=$(curl -s -u "${REPO_USER}:${PASSWORD}" "${AUTH_URL}?scope=repository:${REPO}:pull&service=registry.docker.io" |
        jq -r ".token")

    HEADER=$(echo "{\"registrytoken\":\"${TOKEN}\"}"|base64 -w 0 )
    curl -s -D - -H "X-Registry-Auth: ${HEADER}" -X POST "http://localhost:2376/images/create?fromImage=${REPO}"

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 8dce8e9901501863a80caf47d71713d4d36925a3
Component: engine
2015-12-03 11:40:27 -08:00
15181abee7 Merge pull request #18309 from WeiZhang555/time
Consolidate time format for API
Upstream-commit: 6deec021e5bbfd1942cfacb34c6593379e8b8c30
Component: engine
2015-12-02 22:28:28 +01:00
a7b1157339 Merge pull request #16277 from runcom/add-oom-score-adj
Add OomScoreAdj
Upstream-commit: 8f1f53f735e278bb23bb41d9387a75786d7ec1dc
Component: engine
2015-12-02 11:49:51 -08:00
c529eb3ce9 Consolidate time format for API
Consolidate all the API to same time format: RFC3339, and it will be
client's responsibility to present it in more user friendly way.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 9daca1222adabf3aeae97a2c4e5f4ed1bb8c15e1
Component: engine
2015-12-02 22:40:18 +08:00
2ba0212c1d docs: add API v1.22 to the list again
The 1.22 API was temporarily removed in e4d86c2c38f4c99660da8ed65a8103e283e07e23
to prevent it showing up in the 1.9 documentation.

This reverts that change and tweaks the aligning
of the table headers in Markdown source.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3ddd21b8b66be248ea04eb74c7a81349bffddac1
Component: engine
2015-12-01 11:59:45 +01:00
ddf1fb3149 Add OomScoreAdj to configure container oom killer preferences
libcontainer v0.0.4 introduces setting `/proc/self/oom_score_adj` to
better tune oom killing preferences for container process. This patch
simply integrates OomScoreAdj libcontainer's config option and adjust
the cli with this new option.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: d3af7f283d8dc0be67be48e14cd740fbeb690f7a
Component: engine
2015-11-30 11:19:04 +01:00
7da657059d docs: move API changes to the correct API version
These changes were made as part of https://github.com/docker/docker/pull/17478
but inadvertently added to the v1.21 API version.

Also added a short description to the API changelog.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a06d5273b3cb72f68fc32da26955842287314970
Component: engine
2015-11-25 14:10:18 +01:00
a12e446a79 Add API change to docs
Add API change description to docs due to `docker network inspect`
returns different data structure.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: bfe711bed342202ed0918a309b2000bb158c4eb7
Component: engine
2015-11-23 22:42:55 +08:00
2052e6ad6a Fix small typos in documentation files
Signed-off-by: Luca-Bogdan Grigorescu <bogdan@gmail.com>
Upstream-commit: d1e72baa15fb81a6dcf80e6727b884fc8ff67335
Component: engine
2015-11-15 00:53:27 +02:00
e628862038 Merge pull request #16873 from coolljt0725/expand_docker_info
Add more cgroup config to docker info
Upstream-commit: cccf6749431b5055e01f824f1d479ab517e1f812
Component: engine
2015-11-13 09:37:06 -08:00
012c3d4b3c Fixed broken links in docker_remote_api
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 93939c3f9fda70930ec2d3af4c6231ccfbc6b8ef
Component: engine
2015-11-06 16:12:51 -06:00
723ed1d8d2 Merge pull request #17534 from Microsoft/10662-filterhyperv
Windows: Add isolation to ps filter
Upstream-commit: 9465d6ee6a669e4978ce746f16280910db7b1359
Component: engine
2015-11-05 15:55:47 -05:00
2ba09b4e09 Windows: Add isolation to ps filter
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9c5814171ce7ab3af48867da36f4d374f804c4a6
Component: engine
2015-11-05 10:18:24 -08:00
6f36892ab1 docs: update remote API responses and minor fixes
Add back the "old" networksettings fields that were removed,
but added back to maintain backward compatibility, in
https://github.com/docker/docker/pull/17538

Update network endpoint responses, with updated response
introduced in;
https://github.com/docker/docker/pull/17536

Added changes to v1.22 that were applied to the v1.21 / v1.20 docs
after the API bump(s);

https://github.com/docker/docker/pull/17085
https://github.com/docker/docker/pull/17127
https://github.com/docker/docker/pull/13707

Also fixed some mixed tab/spaces indentation
and Markdown formatting issues (causing code-blocks to
be rendered incorrectly)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 286fe69d5376add77dc31833dc3c2fcc9639dd17
Component: engine
2015-11-03 15:24:31 +01:00
7e41e50c2b Update to hide the 1.10 material
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: e4d86c2c38f4c99660da8ed65a8103e283e07e23
Component: engine
2015-11-01 08:03:08 -08:00
f3f473fc03 Fixing broken links
Fixing the weight

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 5ce093e94565a5f32df9adf78dcdb6deeda75f79
Component: engine
2015-10-31 19:45:56 -07:00
e1f1cd631a Use RepoTags & RepoDigest in inspect
To be coherent with /images/json (images command)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f664f6e4b19d4e155d78af2eacddcd941dae4fce
Component: engine
2015-10-22 23:00:59 +02:00
4a78d859fe rename POST /volumes to POST /volumes/create to be consistent with the other POST /.../create endpoints
see #17132

Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: 0c95eeb584f5033e1f1cc8eb383306b87d3f133f
Component: engine
2015-10-17 14:13:40 +02:00
98858eadeb Bump API Version to v1.22
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 22a0ea555069c47a132ac1579324e70d2bcde39d
Component: engine
2015-10-13 17:27:33 -07:00
019ffb819f Merge pull request #15796 from azurezk/add-size-to-inspect
add container size info to inspect
Upstream-commit: ce607916e9b4e294e66188bbaf50acaa86e3909f
Component: engine
2015-10-13 23:16:10 +02:00
ce2e2998fb Document CFS CPU period / quota support in the API.
Docker 1.7 got support for specifying the CFS scheduler's CPU quota and
period. The work appears to have started around commit
dcc50e1d593fd7995189872791c6d7a013f16970. This change updates the API
documentation to reflect the existing support.

Signed-off-by: Victor Costan <costan@gmail.com>
Upstream-commit: 26bd356078a02313649c7562369a2b2de6b63e19
Component: engine
2015-10-12 11:26:39 -04:00
7dfb385d48 Merge pull request #16764 from thaJeztah/follow-the-white-rabbit
Docs: add Docker version/API version matrix
Upstream-commit: 70edf41c06719912e1d787f9f9e77705c81a0228
Component: engine
2015-10-11 15:28:46 -07:00
6b6c7cc2b6 Enabled GitHub Flavored Markdown
GitHub flavored markdown is now supported for links and images. Also, ran LinkChecker and FileResolver. Yay!
Fixes from Spider check
Output for docker/docker now goes into engine directory

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 8fee1c2020186ac100b45e64864b94ae3a169ad5
Component: engine
2015-10-11 07:49:54 -07:00
9375e8c909 add size to inspect
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: b4d6b23838bb7d8436a1966fc3ef3ade83544d58
Component: engine
2015-10-10 20:44:29 +08:00
c5a31c9c9f Add more cgroup config to docker info
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 458ec418cd11989c58d4a4485436eccadf91a91d
Component: engine
2015-10-09 03:02:04 -04:00
3010ed375d Docs: add Docker version/API version matrix
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6a45bed9bfe66dc17a6aa04591d8c5ae39ba531a
Component: engine
2015-10-06 01:04:15 +02:00
883f553c16 Documentation for filtering events by label
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c1713e7c5a8f2eee7d78b17eef81b0d4203aabdd
Component: engine
2015-10-02 16:45:08 -04:00
a9fcaeb043 Make exec start return proper error codes
Exec start was sending HTTP 500 for every error.

Fixed an error where pausing a container and then calling exec start
caused the daemon to freeze.

Updated API docs which incorrectly showed that a successful exec start
was an HTTP 201, in reality it is HTTP 200.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2d43d93410c29cec87deb9cd940c3b2a8af5fbbb
Component: engine
2015-10-02 14:40:22 -04:00
6f5edad812 Fix docker ps truncate long image name by default
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 3fcf481361400acd5e56da2a8c76cf888092b2e4
Component: engine
2015-10-02 22:56:42 +08:00
8e71940329 add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: 7cf343d1064e3d8211597c67574ff4ddff316fa1
Component: engine
2015-09-21 21:15:32 +08:00
cdae9e4a30 events/jsonmessage: add and prefer TimeNano for events
This way provide both Time and TimeNano in the event. For the display of
the JSONMessage, use either, but prefer TimeNano Proving only TimeNano
would break Subscribers that are using the `Time` field, so both are set
for backwards compatibility.

The events logging uses nano formatting, but only provides a Unix()
time, therefor ordering may get lost in the output. Example:
```
2015-09-15T14:18:51.000000000-04:00 ee46febd64ac629f7de9cd8bf58582e6f263d97ff46896adc5b508db804682da: (from busybox) resize
2015-09-15T14:18:51.000000000-04:00 a78c9149b1c0474502a117efaa814541926c2ae6ec3c76607e1c931b84c3a44b: (from busybox) resize
```

By having a field just for Nano time, when set, the marshalling back to
`time.Unix(sec int64, nsec int64)` has zeros exactly where it needs to.
This does not break any existing use of jsonmessage.JSONMessage, but now
allows for use of `UnixNano()` and get event formatting that has
distinguishable order. Example:
```
2015-09-15T15:37:23.810295632-04:00 6adcf8ed9f5f5ec059a915466cd1cde86a18b4a085fc3af405e9cc9fecbbbbaf: (from busybox) resize
2015-09-15T15:37:23.810412202-04:00 6b7c5bfdc3f902096f5a91e628f21bd4b56e32590c5b4b97044aafc005ddcb0d: (from busybox) resize
```

Including tests for TimeNano and updated event API reference doc.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 4026512a2c535fe377a4cf834b7a78fccfd82dab
Component: engine
2015-09-18 13:15:26 -04:00
ded3de600a Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
Upstream-commit: 54240f8da9992880e20a1508e9a6f0e59f2adef1
Component: engine
2015-09-16 03:31:15 -07:00
655513db24 Add support for DNS options
Signed-off-by: Tim Hockin <thockin@google.com>
Upstream-commit: 3d4685e258a7729bd0f8cc411b5a73980a9faa20
Component: engine
2015-09-16 14:06:45 -07:00
c71aa53e3d Refactor the statistics of network in docker stats
For now docker stats will sum the rxbytes, txbytes, etc. of all
the interfaces.

It is OK for the output of CLI `docker stats` but not good for
the API response, especially when the container is in sereval
subnets.

It's better to leave these origianl data to user.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: d3379946ec96fb6163cb8c4517d7d5a067045801
Component: engine
2015-09-15 15:40:34 +08:00