Commit Graph

142 Commits

Author SHA1 Message Date
be83d1256c Merge pull request #26074 from allencloud/return-err-when-remove-container-in-progress
make client side know container removal in progress
Upstream-commit: 97d4b9c46528c2d263a448658a6cf78ffd943075
Component: engine
2016-09-27 18:48:03 +02:00
4ab44ced86 Merge pull request #26255 from Microsoft/jjh/xenon-test-infrastructure
Add isolation to info - enables Hyper-V containers CI bring-up
Upstream-commit: b881148385685f3c538a3a085207bfdf30ae9213
Component: engine
2016-09-27 18:46:51 +02:00
672761b64e make client side know container removal in progress
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9a58f298d182945eb2b820e5e3539b754fdaa751
Component: engine
2016-09-27 18:06:54 +08:00
6352e3e776 API return network-list if no network-name or id is provided
When calling the /networks/ endpoint with a trailing
slash, the default network was returned.

This changes the endpoint to return the list of networks
instead (same response as `/networks` without trailing
slash).

Also updated the description for GetNetworkByName to
explain that the "default" network is returned if
no name or id is provided.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ad4bf0a533f8851b0ddccb56fe3b457819f6146
Component: engine
2016-09-26 21:44:34 +02:00
a034d841ce Add isolation to info
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c4e169727474f24cb0eddea15b94aaa2bfbb3281
Component: engine
2016-09-23 12:13:29 -07:00
cc3c0d322a Implement build cache based on history array
Based on work by KJ Tsanaktsidis

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: KJ Tsanaktsidis <kjtsanaktsidis@gmail.com>
Upstream-commit: 690882c2e79c3f3742c709cf158584e61594ba00
Component: engine
2016-09-23 11:30:06 -07:00
a0b2adc110 Merge pull request #26516 from yongtang/26453-build-bad-syntax
Check bad syntax on dockerfile before building.
Upstream-commit: 72f556a9ff1043a4188e8eeef892d8a0ba4fe34f
Component: engine
2016-09-23 12:24:20 +02:00
9e4c8c252a Update documentation and change log to include the preliminary validation of dockerfile.
This commit updates documentation and change log to include
the preliminary validation of the dockerfile before instructions
in dockerfile is run one-by-one.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e33dea5b40a52c5dcda682a1a292584ae6bff00d
Component: engine
2016-09-22 14:33:37 -07:00
a262e6d191 Fix incorrectly named API options
This renames `MaximumIOps` to `IOMaximumBandwidth`,
and `MaximumIOBps` to `IOMaximumIOps` to match
the actual code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 36a25bdbe4d973aef308fa11b450264dae1bc0b4
Component: engine
2016-09-20 13:51:55 +02:00
69bead6193 Add direct link to event chart image
This adds a direct link to the event chart image
so that the full-resolution image can be "zoomed"
in to.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 86de72fef244b3fe209e5793deb40fb26f5b318e
Component: engine
2016-09-14 23:16:32 +02:00
06b2219a87 Add new HostConfig field, Mounts.
`Mounts` allows users to specify in a much safer way the volumes they
want to use in the container.
This replaces `Binds` and `Volumes`, which both still exist, but
`Mounts` and `Binds`/`Volumes` are exclussive.
The CLI will continue to use `Binds` and `Volumes` due to concerns with
parsing the volume specs on the client side and cross-platform support
(for now).

The new API follows exactly the services mount API.

Example usage of `Mounts`:

```
$ curl -XPOST localhost:2375/containers/create -d '{
  "Image": "alpine:latest",
  "HostConfig": {
    "Mounts": [{
      "Type": "Volume",
      "Target": "/foo"
      },{
      "Type": "bind",
      "Source": "/var/run/docker.sock",
      "Target": "/var/run/docker.sock",
      },{
      "Type": "volume",
      "Name": "important_data",
      "Target": "/var/data",
      "ReadOnly": true,
      "VolumeOptions": {
	"DriverConfig": {
	  Name: "awesomeStorage",
	  Options: {"size": "10m"},
	  Labels: {"some":"label"}
	}
      }]
    }
}'
```

There are currently 2 types of mounts:

  - **bind**: Paths on the host that get mounted into the
    container. Paths must exist prior to creating the container.
  - **volume**: Volumes that persist after the
    container is removed.

Not all fields are available in each type, and validation is done to
ensure these fields aren't mixed up between types.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fc7b904dced4d18d49c8a6c47ae3f415d16d0c43
Component: engine
2016-09-13 09:55:35 -04:00
7045275ed8 Update documentation for validation of --ip and ip6.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5118dd2992aef27890203b7e8eb62fc5f507d931
Component: engine
2016-08-25 22:11:56 -07:00
d13d215017 Update docker remote api to mention restart policy validation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a011a94be7448ee86e28396246de73f646af3a93
Component: engine
2016-08-25 17:03:18 +02:00
a603b90d7f Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band
volume driver deletion leaves some data in docker. This prevent the
reuse of deleted volume names (by out-of-band volume driver like flocker).

This fix adds a `--force` field in `docker volume rm` to forcefully purge
the data of the volume that has already been deleted.

Related documentations have been updated.

This fix is tested manually with flocker, as is specified in #23367.
An integration test has also been added for the scenario described.

This fix fixes #23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6c5c34d50d377d1c5318a255240fb2dc9c23cf92
Component: engine
2016-08-18 18:01:25 -07:00
c8732c07e1 expose RemovalInProgress in StateString #25652
Signed-off-by: timfeirg <kkcocogogo@gmail.com>
Upstream-commit: 37466cc8c85ccbdade57463ae2aacac638002f8a
Component: engine
2016-08-18 11:25:27 +08:00
d4747af3dc docs: add missing "quiet" parameter for image/load and update response
Progress reporting during image load was added
in 415dd8688618ac2b3872c6a5b5af3afcef2c3e10, but
the corresponding query-parameter was not documented
in the API docs.

This updates the API docs, and adds a response example
both with quiet enabled and disabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d13ed38471decb332e9a0872854a97730d548583
Component: engine
2016-08-09 12:08:33 +02:00
d56ceaaede Add docs for auto-removal on daemon
Docs for #20848: move "--rm" to daemon side.

Add description for introduced API changes.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 7df815d2afe006ece9a3bc5c0642bd7643f40124
Component: engine
2016-08-09 00:47:12 +08:00
34a323258f Wait container's removal via Events API
If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 6dd8e10d6ed7a7371c5c1824ad58c4403a7b3bfd
Component: engine
2016-08-08 22:46:53 +08:00
6a47f2d601 docs: re-enable API 1.25
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b9838eafed6c9f56a47fecc997cdef9b0203e9a
Component: engine
2016-07-28 02:11:34 +02:00
cc9d201773 Clarify API behavior when older versions are called.
Signed-off-by: fonglh <fonglh@gmail.com>
Upstream-commit: f62e24f697dd5c69e58f3b5d732fd5a962a0c8e6
Component: engine
2016-07-21 16:16:46 +08:00
b912567a85 docs: remove executiondriver from API 1.24 docs
the executiondriver property was removed in
880484992c360881dc57a3317b84d75300c358af, but docs
were only updated for the 1.25 API, not for 1.24

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3c6ef4c29d28e92ea29816d6117412162d829c60
Component: engine
2016-07-13 00:49:29 +02:00
32cd0213a9 Add missing API docs for HostConfig.PidMode
The `--pid` flag was added in Docker 1.5.0, but the
API changes were not documented. In Docker 1.12.0,
`--pid=container:<name|id>` was added as an additional
option, but also undocumented.

This adds the missing API documentation for this
option.

Also see commits
47e3da848ffbe88d0188ae6cfc09d6e1668bc293 (for 1.5.0), and
ebeb5a0422be47e703353e327606a380eb9962ab (for 1.12.0).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c9b5addc5022dba33d5d0443b49b2e4c0041ef3
Component: engine
2016-07-12 01:52:42 +02:00
e4dfc2d04c Validate hostname starting from 1.24 API.
In order to keep a little bit of "sanity" on the API side, validate
hostname only starting from v1.24 API version.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6daf3d2a783fd042e870c8af8bbd19fc28989505
Component: engine
2016-07-06 09:13:59 +02:00
d648d9a308 docs: add note that we no longer send container-id for exec
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 82876c0f5b41fe4e3ee33e0bc77f2560b1a6535f
Component: engine
2016-06-29 13:30:09 -07:00
acc2e881b3 Temporarily disable API v1.25 docs
The docs are currently published from "master" for the RC,
so hiding v1.25 API, which is for docker 1.13

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 59bdd4e56986c09a998f41bfec23a30df14444cc
Component: engine
2016-06-20 13:50:00 -07:00
1de46d8dd4 Bump API Version to v1.25
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 04292192e023372453983cf6318f772922928c4e
Component: engine
2016-06-14 20:03:50 -07:00
896826cadf docs: move sysctls docs to current API version
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: de22669377d074a2594de33be01ae4d9723283a8
Component: engine
2016-06-14 15:14:16 -07:00
ecda48bde7 Return remote API errors as JSON
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 322e2a7d059a81617b593cf6ece2cfd9f6d4ea03
Component: engine
2016-06-07 18:45:27 -07:00
94abb34940 add support for filtering by network ID
This adds support for filtering by network ID, to be
consistent with other filter options.

Note that only *full* matches are returned; this is
consistent with other filters (e.g. volume), that
also return full matches only.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7c46ba02e694ae540866b29ebf0dab76e556cc13
Component: engine
2016-06-07 16:50:31 +02:00
4e024e3e7d Adding network filter to docker ps command
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Upstream-commit: 912af1ae8f22c4d9d7e478d0985a40b41ded2027
Component: engine
2016-06-07 16:43:11 +02:00
54aa4a7bec Merge pull request #22149 from vdemeester/deprecated-copy-endpoint
Deprecate /containers/(id or name)/copy endpoint
Upstream-commit: 148d2b8e4a7e4f669ba9e8db2adc2413fde27a07
Component: engine
2016-06-07 12:50:04 +02:00
0b0f7c4ee5 attach: replace interface with simple type
Also add docs to detach events

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3accde6dee079fbde42f1928002bce43cb15833d
Component: engine
2016-06-03 16:40:43 -07:00
27654930fa Deprecate /containers/(id or name)/copy endpoint
This endpoint has been deprecated since 1.8. Return an error starting
from this API version (1.24) in order to make sure it's not used for the
next API version and so that we can remove it some times later.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 428328908dc529b1678fb3d8b033fb0591a294e3
Component: engine
2016-06-03 19:38:03 +02:00
82d7e1ba5d Add --limit option to docker search
This fix tries to address the issue raised in #23055.
Currently `docker search` result caps at 25 and there is
no way to allow getting more results (if exist).

This fix adds the flag `--limit` so that it is possible
to return more results from the `docker search`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #23055.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 92f10fe228c1b4b527b87ac47401132322283ea3
Component: engine
2016-06-02 19:12:20 -07:00
35c5774373 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c1be45fa38e82054dcad606d71446a662524f2d5
Component: engine
2016-06-02 17:17:22 +08:00
0739417adc Update remote API docs for the removal of deprecated force in docker tag.
This fix updates remote API docs for the removal of deprecated `force` in `docker tag`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7b08941882668c1c40adb03d9227d22e0aa5e605
Component: engine
2016-06-01 09:45:10 -07:00
67d0b2dc23 remove deprecated feature of passing HostConfig at API container start
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 0a8386c8be3fa87b7523bef7fd31c81a7f84709c
Component: engine
2016-06-01 22:25:17 +08:00
9fc37c22c9 Add before and since filter to images
Add support for two now filter on the `images` command : `before` and
`since`. They work the same as the one on the `ps` command but for
images.

        $ docker images --filter before=myimage
        # display all images older than myimage
        $ docker images --filter since=myimage
        # display all images younger than myimage

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 750e16f57c0121aa8cdad1763f0bb6e54b8c6d75
Component: engine
2016-05-25 13:49:10 +02:00
fe4d79b993 Add filter for events emitted by docker daemon
This fix tries to cover the issue raised in #22463 by adding
filter for events emitted by docker daemon so that user could
utilize filter to receive events of interest.

Documentations have been updated for this fix.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 62014aaf9abeb4256cb66e7ae06bfdf5a77d1140
Component: engine
2016-05-23 19:00:47 -07:00
e954a0d7e9 Emit events for docker daemon
This fix tries to cover the issue raised in #22463 by emitting
events for docker daemon so that user could be notified by
scenarios like config reload, etc.

This fix adds the `daemon reload`, and events for docker daemon.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 382c152a73dfa1d771334ffbe79759c5c3596144
Component: engine
2016-05-23 19:00:47 -07:00
214a2bf487 Add a --filter option to docker search
The filtering is made server-side, and the following filters are
supported:

* is-official (boolean)
* is-automated (boolean)
* has-stars (integer)

Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e009ebdf4c0bf0ff64da8d48eefad63d0644de3e
Component: engine
2016-05-20 13:41:28 +02:00
b96d544c7a Fix bug which mistakes 400 error for 500
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
Upstream-commit: beca2615782e24fa28803ada067129fdfa88c77d
Component: engine
2016-05-19 20:01:55 +08:00
697f71e4f2 Add support for reading logs extra attrs
The jsonlog logger currently allows specifying envs and labels that
should be propagated to the log message, however there has been no way
to read that back.

This adds a new API option to enable inserting these attrs back to the
log reader.

With timestamps, this looks like so:
```
92016-04-08T15:28:09.835913720Z foo=bar,hello=world hello
```

The extra attrs are comma separated before the log message but after
timestamps.

Without timestaps it looks like so:
```
foo=bar,hello=world hello
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: bd9d14a07b9f1c82625dc8483245caf3fa7fe9e6
Component: engine
2016-05-06 20:42:20 -04:00
6e410ce449 Add "driver" filter for network ls
This add a new filter to 'docker network ls'
to allow filtering by driver-name.

Contrary to "ID" and "name" filters, this
filter only supports an *exact* match.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 23e418b6c966a43a463a064053ce0c741b8e5159
Component: engine
2016-04-29 16:22:26 +02:00
87afb49f07 Add IO Resource Controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 8df2066341931d9b7ba552afa902e2ef12e5eed5
Component: engine
2016-04-25 13:07:29 -07:00
121a98a71e Merge pull request #22148 from thaJeztah/remove-old-api-versions
Remove API versions 1.17 and older from documentation
Upstream-commit: 4a8519ba29a0b1f1aa2f9e9ac6d991114d8b8253
Component: engine
2016-04-19 10:26:56 -07:00
2052cabd5a Remove API versions 1.17 and older from documentation
Docker 1.5 and older is no longer supported by Docker Hub,
so there's not much need to document the API for those
versions.

Documentation is still available on GitHub, and through
the older versions of the documentation for those
that really need it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 68f9a45440c1d87316ec5106f942a8cae9113ca0
Component: engine
2016-04-19 14:39:14 +02:00
1beaa5c119 Add network label filter support
This patch did following:

1) Make filter check logic same as `docker ps ` filters

Right now docker container logic work as following:
when same filter used like below:
 -f name=jack -f name=tom
it would get all containers name is jack or tom(it is or logic)

when different filter used like below:

 -f name=jack -f id=7d1
it would get all containers name is jack and id contains 7d1(it is and logic)

It would make sense in many user cases, but it did lack of compliate filter cases,
like "I want to get containers name is jack or id=7d1", it could work around use
(get id=7d1 containers' name and get name=jack containers, and then construct the
final containers, they could be done in user side use shell or rest API)

2) Fix one network filter bug which could include duplicate result
when use -f name=  -f id=, it would get duplicate results

3) Make id filter same as container id filter, which means match any string.
not use prefix match.

It is for consistent match logic

Closes: #21417

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: f812b55692f5d50d427684216ad6c806bac5a702
Component: engine
2016-04-18 00:38:48 +00:00
b6c2e57eab Merge pull request #21172 from yongtang/20909-seccomp-in-docker-info
Show "seccomp" in docker info (#20909).
Upstream-commit: bc0c8828e9afc32f1660a1f679ed523376c7d3d2
Component: engine
2016-04-15 01:24:54 +02:00
3b52ebb9ff Add support for setting sysctls
This patch will allow users to specify namespace specific "kernel parameters"
for running inside of a container.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 9caf7aeefd23263a209c26c8439d26c147972d81
Component: engine
2016-04-12 13:37:31 -04:00