Commit graph

61 commits

Author SHA1 Message Date
Wen Cheng Ma
5cc672b006 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>
2016-01-15 10:03:29 +08:00
Ryan Belgrave
662cac08ef Add IPAM Config Options to match libnetwork
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
2016-01-14 14:32:25 -05:00
Wen Cheng Ma
9f676ade0a Add network ID to container inspect
Fixes issue #19089

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-01-14 22:33:41 +08:00
Madhu Venugopal
b464f1d78c 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>
2016-01-13 21:28:52 -08:00
Chun Chen
b70954e60a Add network interal mode
Signed-off-by: Chun Chen <ramichen@tencent.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-13 11:30:36 -05:00
Antonio Murdaca
a79f96828f Merge pull request #19249 from calavera/carry_17414
[Carry 17414] Added additional container information to "docker info".
2016-01-13 10:42:22 +01:00
David Calavera
e5edc168a6 Complete documentation about extra container information.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-12 18:16:58 -05:00
Vincent Demeester
a4f6920731 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>
2016-01-12 08:33:41 +01:00
Alessandro Boch
2bb3fc1bc5 Allow user to choose the IP address for the container
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-08 10:09:16 -08:00
Zhang Wei
26dd026bd7 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>
2015-12-23 13:26:40 +08:00
Ma Shimiao
843084b08b Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-21 09:14:49 +08:00
Vincent Demeester
0f749ad55a Merge pull request #18559 from ahmetalpbalkan/return-container-networks
Proposal: Add container networks list to /containers/json
2015-12-17 10:11:18 +01:00
Ahmet Alp Balkan
755f8609f6 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>
2015-12-14 19:03:23 -08:00
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Aaron Lehmann
d92e7ad735 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>
2015-12-09 19:13:35 -08:00
Qiang Huang
2347f98003 Check minimum kernel memory limit to be 4M
Fixes: #18405

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-09 14:26:41 +08:00
Daniel Hiltgen
8dce8e9901 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>
2015-12-03 11:40:27 -08:00
Sebastiaan van Stijn
6deec021e5 Merge pull request #18309 from WeiZhang555/time
Consolidate time format for API
2015-12-02 22:28:28 +01:00
Arnaud Porterie
8f1f53f735 Merge pull request #16277 from runcom/add-oom-score-adj
Add OomScoreAdj
2015-12-02 11:49:51 -08:00
Zhang Wei
9daca1222a 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>
2015-12-02 22:40:18 +08:00
Sebastiaan van Stijn
3ddd21b8b6 docs: add API v1.22 to the list again
The 1.22 API was temporarily removed in e4d86c2c38
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>
2015-12-01 11:59:45 +01:00
Antonio Murdaca
d3af7f283d 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>
2015-11-30 11:19:04 +01:00
Sebastiaan van Stijn
a06d5273b3 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>
2015-11-25 14:10:18 +01:00
Zhang Wei
bfe711bed3 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>
2015-11-23 22:42:55 +08:00
Luca-Bogdan Grigorescu
d1e72baa15 Fix small typos in documentation files
Signed-off-by: Luca-Bogdan Grigorescu <bogdan@gmail.com>
2015-11-15 00:53:27 +02:00
Alexander Morozov
cccf674943 Merge pull request #16873 from coolljt0725/expand_docker_info
Add more cgroup config to docker info
2015-11-13 09:37:06 -08:00
Christopher Jones
93939c3f9f Fixed broken links in docker_remote_api
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2015-11-06 16:12:51 -06:00
Brian Goff
9465d6ee6a Merge pull request #17534 from Microsoft/10662-filterhyperv
Windows: Add isolation to ps filter
2015-11-05 15:55:47 -05:00
John Howard
9c5814171c Windows: Add isolation to ps filter
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-05 10:18:24 -08:00
Sebastiaan van Stijn
286fe69d53 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>
2015-11-03 15:24:31 +01:00
Mary Anthony
e4d86c2c38 Update to hide the 1.10 material
Signed-off-by: Mary Anthony <mary@docker.com>
2015-11-01 08:03:08 -08:00
Mary Anthony
5ce093e945 Fixing broken links
Fixing the weight

Signed-off-by: Mary Anthony <mary@docker.com>
2015-10-31 19:45:56 -07:00
Vincent Demeester
f664f6e4b1 Use RepoTags & RepoDigest in inspect
To be coherent with /images/json (images command)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-22 23:00:59 +02:00
Tobias Gesellchen
0c95eeb584 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>
2015-10-17 14:13:40 +02:00
Tibor Vass
22a0ea5550 Bump API Version to v1.22
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-13 17:27:33 -07:00
Vincent Demeester
ce607916e9 Merge pull request #15796 from azurezk/add-size-to-inspect
add container size info to inspect
2015-10-13 23:16:10 +02:00
Victor Costan
26bd356078 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
dcc50e1d59. This change updates the API
documentation to reflect the existing support.

Signed-off-by: Victor Costan <costan@gmail.com>
2015-10-12 11:26:39 -04:00
Sebastiaan van Stijn
70edf41c06 Merge pull request #16764 from thaJeztah/follow-the-white-rabbit
Docs: add Docker version/API version matrix
2015-10-11 15:28:46 -07:00
Mary Anthony
8fee1c2020 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>
2015-10-11 07:49:54 -07:00
Zhang Kun
b4d6b23838 add size to inspect
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-10-10 20:44:29 +08:00
Lei Jitang
458ec418cd Add more cgroup config to docker info
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-09 03:02:04 -04:00
Sebastiaan van Stijn
6a45bed9bf Docs: add Docker version/API version matrix
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-10-06 01:04:15 +02:00
Daniel Nephin
c1713e7c5a Documentation for filtering events by label
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-02 16:45:08 -04:00
Brian Goff
2d43d93410 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>
2015-10-02 14:40:22 -04:00
Lei Jitang
3fcf481361 Fix docker ps truncate long image name by default
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-02 22:56:42 +08:00
Zhang Kun
7cf343d106 add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-09-21 21:15:32 +08:00
Vincent Batts
4026512a2c 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>
2015-09-18 13:15:26 -04:00
Madhav Puri
54240f8da9 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>
2015-09-16 03:31:15 -07:00
Tim Hockin
3d4685e258 Add support for DNS options
Signed-off-by: Tim Hockin <thockin@google.com>
2015-09-16 14:06:45 -07:00
Hu Keping
d3379946ec 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>
2015-09-15 15:40:34 +08:00