Commit graph

4149 commits

Author SHA1 Message Date
Yong Tang
9e8adbecf5 Add custom DNS settings to service definition
This fix tries to fix the issue raised in 24391 about allowing
custom DNS settings to service definition.

This fix adds `DNSConfig` (`Nameservers`, `Options`, `Search`) to
service definition, as well as `--dns`, `--dns-opt`, and `dns-search`
to `service create`.

An integration test has been added to cover the changes in this fix.

This fix fixes 24391.

A PR in swarmkit will be created separately.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-08 15:41:32 -08:00
Tibor Vass
c33fb1013d Merge pull request #28142 from vieux/plugin_install_args
support settings in docker plugins install
2016-11-08 15:05:39 -08:00
Michael Crosby
47637b49a0 Convert err description to lower
Convert this to lower before checking the message of the error.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-08 14:42:54 -08:00
Michael Crosby
d58b47623b Replace grimes with tini
There is no reason to duplicate efforts and tini is well built and
better than grimes.  It is a much stronger option for the default init
and @krallin has done a great job maintaining it and helping make
changes so that it will work with Docker.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-08 14:42:54 -08:00
Justin Cormack
3a5a0ef1d4 Merge pull request #28130 from tophj-ibm/change-jq-syntax-for-old-version-support
[integration-cli] changes syntax to support older version of jq
2016-11-08 14:00:59 +00:00
Victor Vieux
e98e4a7111 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-08 04:55:27 -08:00
Victor Vieux
586b7cc19e delete plugin rootfs on plugin rm
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-08 03:30:37 -08:00
Victor Vieux
69276fddf8 support settings in docker plugins install
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-07 22:49:22 -08:00
John Howard
d29995bb84 Adds minimum API version to version
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-07 21:20:00 -08:00
Daniel Nephin
69efb4652c Merge pull request #28076 from yongtang/25644-docker-service-tty
Add `--tty` to `docker service create/update`
2016-11-07 22:15:27 -05:00
Akihiro Suda
8937b35936 Merge pull request #28132 from johnstep/win2lin
TestRunDuplicateMount requires the same host
2016-11-08 11:32:39 +09:00
Victor Vieux
03da822ee9 Merge pull request #27923 from vieux/plugin_set_gogogo
support env for docker plugin set
2016-11-07 17:07:14 -08:00
Victor Vieux
efbed4500e support env for docker plugin set
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-07 16:59:29 -08:00
Yong Tang
599be5a551 Add --tty to docker service create/update
This fix tries to add `--tty` to `docker service create/update`. As was
specified in 25644, `TTY` flag has been added to SwarmKit and is
already vendored.

This fix add `--tty` to `docker service create/update`.

Related document has been updated.

Additional integration tests has been added.

This fix fixes 25644.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-07 16:42:32 -08:00
Tõnis Tiigi
67b0311c8c Merge pull request #27615 from darrenstahlmsft/ExecCloseAsync
Asynchronously close streams to prevent holding container lock
2016-11-07 16:16:21 -08:00
John Stephens
bc87ec3815 TestRunDuplicateMount requires the same host
Signed-off-by: John Stephens <johnstep@docker.com>
2016-11-07 10:19:06 -08:00
Christopher Jones
1d0a5eb33f
[integration-cli] changes syntax to support older version of jq
Fixes a bug where a test would fail due to jq syntax
not being supported on all versions. Changes the syntax
to an equivalent way also supported on older versions.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-11-07 10:54:25 -06:00
Vincent Demeester
89ef0f2151 Merge pull request #25983 from jhorwit2/jah/ps-refactor
Add -a option to service/node ps
2016-11-07 17:33:10 +01:00
Yong Tang
818d55c34b Fix /proc/<pid>/oom_score_adj: invalid argument error caused by empty env name
This fix is part of the fix for issue 25099. In 25099, if an env
has a empty name, then `docker run` will throw out an error:
```
ubuntu@ubuntu:~/docker$ docker run -e =A busybox true
docker: Error response from daemon: invalid header field value "oci runtime error:
container_linux.go:247: starting container process caused \"process_linux.go:295:
setting oom score for ready process caused \\\"write /proc/83582/oom_score_adj:
invalid argument\\\"\"\n".
```

This fix validates the Env in the container spec before it is sent
to containerd/runc.

Integration tests have been created to cover the changes.

This fix is part of fix for 25099 (not complete yet, non-utf case
may require a fix in `runc`).
This fix is related to 25300.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-07 08:15:26 -08:00
Josh Horwitz
139fff2bf0 Add -a option to service/node ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
2016-11-06 07:40:39 -05:00
Darren Stahl
4e15420b9b Windows: Add cpu count option
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-04 13:38:50 -07:00
Michael Crosby
cac13fc131 Merge pull request #27737 from justincormack/no-ambient-1.13
Revert ambient capabilities for 1.13
2016-11-04 12:52:21 -07:00
Justin Cormack
c5251f7116 Use runc version built without ambient capabilities
Until we can support existing behaviour with `sudo` disable
ambient capabilities in runc build.

Add tests that non root user cannot use default capabilities,
and that capabilities are working as expected.

Test for #27590

Update runc.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-04 17:25:28 +00:00
Yong Tang
846baf1fd3 Add --cpus flag to control cpu resources
This fix tries to address the proposal raised in 27921 and add
`--cpus` flag for `docker run/create`.

Basically, `--cpus` will allow user to specify a number (possibly partial)
about how many CPUs the container will use. For example, on a 2-CPU system
`--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share.

This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay
have a concept of NanoCPUs for tasks. The `--cpus` flag will translate
the number into reused `NanoCPUs` to be consistent.

This fix adds integration tests to cover the changes.

Related docs (`docker run` and Remote APIs) have been updated.

This fix fixes 27921.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-04 09:43:10 -07:00
Justin Cormack
efa5e85cf7 Merge pull request #26276 from runcom/seccomp-conf
daemon: add a flag to override the default seccomp profile
2016-11-04 15:45:30 +00:00
Madhu Venugopal
5f17e0f6c9 Handle NetworkDettach for the case of network-id
When a container is attached to an "--attachable" network, it strictly
forms the attacherKey using either the network-id or network-name
because at the time of attachment, the daemon may not have the network
downloaded locally from the manager. Hence, when the NetworkDettach is
called, it should use either network-name or network-id. This fix
addresses the missing network-id based dettachment case.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-11-03 15:56:35 -07:00
Madhu Venugopal
2d676d38a0 Merge pull request #28019 from sanimej/vendor
Vendoring libnetwork @9ab6e13
2016-11-03 14:35:28 -07:00
Santhosh Manohar
9cebccfb95 Fix IT case for network name validation
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-11-03 11:04:37 -07:00
John Howard
ecf405b64d Merge pull request #27873 from duglin/fixContChar
Fix case where \ at EOF made the builder ignore the command
2016-11-03 10:30:15 -07:00
Anusha Ragunathan
cf55397e13 Merge pull request #27164 from cpuguy83/carry_24205
Fix volume creates blocked by stale cache entries
2016-11-03 10:28:13 -07:00
Victor Vieux
6ee25e6277 Merge pull request #27968 from vieux/add_volume_test
add test plugin install --disable and volume ls
2016-11-03 10:22:52 -07:00
Brian Goff
6a0bdffc1a Fix volume creates blocked by stale cache entries
When a conflict is found in the volume cache, check with the driver if
that volume still actually exists.
If the volume doesn't exist, purge it from the cache and allow the
create to happen.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-03 11:56:44 -04:00
Doug Davis
eaf0b5708f Fix case where \\ at EOF made the builder ignore the command
Came from looking at issue #27545

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-11-03 05:48:49 -07:00
Akihiro Suda
273eeb813c cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-11-03 07:08:59 +00:00
Victor Vieux
7236e42046 add test plugin install --disable and volume ls
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-02 17:03:46 -07:00
Antonio Murdaca
b237189e6c
daemon: add a flag to override the default seccomp profile
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-02 21:41:29 +01:00
Anusha Ragunathan
4a955dc4d4 Merge pull request #27914 from riyazdf/check-plugins-on-startup
Check authz plugins on daemon startup, add v2 integration tests
2016-11-02 13:38:32 -07:00
Riyaz Faizullabhoy
2b045027ce Check authz plugins are valid on daemon startup, add integration tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-11-02 11:20:54 -07:00
John Howard
29d21388d5 Fix TestAPIClientVersionOldNotSupported
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-02 09:43:29 -07:00
Akihiro Suda
e448a32192 Merge pull request #27974 from yongtang/27969-duplicate-bind-mount
Fix issue related to duplicate identical bind mounts for `docker run`
2016-11-02 20:26:25 +09:00
Vincent Demeester
ebf10dc5b0 Merge pull request #27883 from mavenugo/na
Copy only the relevant endpoint configs from Attachable config
2016-11-02 11:50:31 +01:00
Yong Tang
90ce6de50b Fix issue related to duplicate identical bind mounts for docker run
This fix tries to address the issue raised in 27969 where
duplicate identical bind mounts for `docker run` caused additional volumes
to be created.

The reason was that in `runconfig`, if duplicate identical bind mounts
have been specified, the `copts.volumes.Delete(bind)` will not truly
delete the second entry from the slice. (Only the first entry is deleted).

This fix fixes the issue.

An integration test has been added to cover the changes

This fix fixes 27969.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-01 20:31:34 -07:00
Tibor Vass
1966f8e09d Merge pull request #27920 from mavenugo/npp
Basic IT for plugin-v2 network driver
2016-11-01 17:46:06 -07:00
Tibor Vass
0aefcd6ab6 Merge pull request #27960 from anusha-ragunathan/plugin_teardown
Add plugin cleanup as part of standard TearDownTest.
2016-11-01 17:36:51 -07:00
Michael Crosby
70459d6f1e Merge pull request #27908 from Microsoft/jjh/fix27601APIVersion
Windows: Require REST 1.25 or later
2016-11-01 14:32:32 -07:00
Michael Crosby
22f3e43e9a Merge pull request #22641 from cpuguy83/build_finalization
Adds ability to flatten image after build
2016-11-01 14:30:18 -07:00
Anusha Ragunathan
3e85271a64 Add plugin cleanup as part of standard TearDownTest.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-01 11:17:33 -07:00
Brian Goff
362369b4bb Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-01 13:41:59 -04:00
Addam Hardy
f150f42009 Convert Unused ARG error to warning
Signed-off-by: Addam Hardy <addam.hardy@gmail.com>
2016-10-31 21:42:50 -05:00
Madhu Venugopal
259441c027 Basic IT for plugin-v2 network driver
Since the plugin APIs have not changed for local-scoped network drivers
between plugin-v1 and v2, a simple test to validate the bootstrapping
and network creation APIs would suffice.

Any network driver specific API validations are handled independent of
plugin v1 or v2 format.

Using a sample v2 network plugin :
https://github.com/mavenugo/test-docker-netplugin/

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-10-31 15:43:50 -07:00
John Howard
f811d5b128 Windows: Require REST 1.25 or later
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-31 14:33:59 -07:00
Sebastiaan van Stijn
c600cfa93c Merge pull request #27901 from ripcurld00d/load_stdin_valid
Validate docker-load receives a tar file
2016-10-31 14:23:18 -07:00
Brian Goff
2fc760496b Merge pull request #27648 from dnephin/swagger-gen-operations
Generated more api types from swagger spec
2016-10-31 15:33:16 -04:00
Daniel Nephin
181562c2e5 Generate ContainerWait response from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:19:53 -04:00
Daniel Nephin
bad849fc82 Generate container create response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:16:02 -04:00
Daniel Nephin
29df3bdb11 Use a config to generate swagger api types
Moves the resposne types to a package under api/types

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin
5c2498fd3c Generate VolumesCreateRequest from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin
d459e83b1c Generate VolumeList response from the swagger spec
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Boaz Shuster
4426189b35 Validate docker-load receives a tar file
To load an image from a tar file, you can specify
the tar file in the -i/--input option:
docker load -i image_1.tar

or using stdin:

docker load < image_1.tar
cat image_1.tat | docker load

If the image file isn't given the `docker load`
command gets stuck.

To avoid that, the load makes sure the CLI input is
not a terminal or the `--input` option was set.
If not then an error message is shown.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-10-31 15:30:55 +02:00
John Howard
f0b93b6ed8 Windows: Fix COPY file . after WORKDIR
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-30 13:12:27 -07:00
Madhu Venugopal
c5dd4d70c6 Copy only the relevant endpoint configs from Attachable config
When a container is run on a --attachable network, the endpoint
configs passed by the user were incorrectly overwritten.
Copy the relevant configs instead of overwriting the entire configs.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-10-29 17:11:30 -07:00
Qiang Huang
e6866492c4 Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-10-29 15:03:26 +08:00
Vincent Demeester
515e5dade7 Merge pull request #24698 from jhorwit2/jah/clist-health-filter-format
Fixes #24022 - Adds container health support to docker ps filter/format
2016-10-29 06:56:06 +02:00
Sebastiaan van Stijn
a0eae7e3c0 Merge pull request #27867 from Microsoft/jjh/difftest
Windows: Port a docker diff test
2016-10-28 16:44:03 -07:00
Michael Crosby
91f477b830 Merge pull request #27800 from lilybguo/group-add-rm
Service create --group param
2016-10-28 14:01:53 -07:00
Sebastiaan van Stijn
c5adc271b2 Merge pull request #24725 from yongtang/24693-dockerfile-empty-line-after-escape
Fix dockerfile parser with empty line after escape
2016-10-28 13:53:15 -07:00
Lily Guo
2f58494ae6 Service create --group param
--group-add was used for specifying groups for both service create
and service update. For create it was confusing since we don't have
an existing set of groups. Instead I added --group to create, and
moved --group-add to service update only, like --group-rm
This deals with issue 27646

Signed-off-by: Lily Guo <lily.guo@docker.com>

Update flag documentation

Specify that --group, --group-add and --groupd-rm refers to
supplementary user groups

Signed-off-by: Lily Guo <lily.guo@docker.com>

Fix docs for groups and update completion scripts

Signed-off-by: Lily Guo <lily.guo@docker.com>
2016-10-28 13:26:31 -07:00
Josh Horwitz
1a149a0ea5 Adds container health support to docker ps filter
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
2016-10-28 15:43:04 -04:00
John Howard
5cab19a08b Windows: Port a docker diff test
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-28 12:21:54 -07:00
Darren Stahl
07cd19655b Stop holding container lock while waiting on streams
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-10-28 12:19:22 -07:00
Michael Crosby
9e436c9aad Merge pull request #26464 from vdemeester/11065-stop-signal-and-restart-policies
Taking stop-signal into account when docker kill
2016-10-28 11:08:55 -07:00
Vincent Demeester
87ddc8b0a5 Merge pull request #26837 from AkihiroSuda/newtmpfs
api: add TypeTmpfs to api/types/mount
2016-10-28 19:21:26 +02:00
Akihiro Suda
18768fdc2e api: add TypeTmpfs to api/types/mount
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-28 08:38:32 +00:00
Vincent Demeester
10d77b878c Merge pull request #25800 from vdemeester/25798-fix-event-actions
Fix 25798 : Allow "partial/prefix" filter for health_status, exec_create and exec_start events
2016-10-28 05:20:49 +02:00
Vincent Demeester
9e206b5512 Merge pull request #27805 from Microsoft/jjh/fixbuildercache
Windows: Fix builder cache bug
2016-10-28 02:49:40 +02:00
Sebastiaan van Stijn
33474a11fe Merge pull request #25820 from crosbymichael/prom
Add metrics output to docker
2016-10-27 16:44:26 -07:00
Vincent Demeester
71d8313ad4
Fix some event filtering
Make it possible to use health_status, exec_start and exec_create as
is in event filter. This way, using `health_status` as filter will allow
to get all health_status events (healthy, unhealthy, …) instead of
having to us all combination (`health_status: healthy`, `health_status:
unhealthy`, …). Same goes for `exec_start` and `exec_create`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-10-27 16:14:13 -07:00
Sebastiaan van Stijn
322f88f367 Merge pull request #24844 from yongtang/24712-create-service-env-file
Add `--env-file` flag to `docker create service`
2016-10-27 13:40:51 -07:00
Kenfe-Mickaël Laventure
4d2e258531 Merge pull request #26718 from ncdc/add-logs-to-container-attach-options
Add Logs to ContainerAttachOptions
2016-10-27 13:32:50 -07:00
John Howard
4f3889e4be Windows: Fix builder cache bug
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-27 12:27:30 -07:00
Yong Tang
ee3105c68a Add --env-file flag to docker create service
This fix tries to address the issue in 24712 and add
`--env-file` file to `docker create service`.

Related documentation has been updated.

An additional integration has been added.

This fix fixes 24712.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-27 11:48:32 -07:00
Yong Tang
3e1b539e8d Fix dockerfile parser with empty line after escape
This fix tries to fix the bug reported by #24693 where an empty
line after escape will not be stopped by the parser.

This fix addresses this issue by stop the parser from continue
with an empty line after escape.

An additional integration test has been added.

This fix fixes #24693.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-27 10:43:08 -07:00
Michael Crosby
3343d234f3 Add basic prometheus support
This adds a metrics packages that creates additional metrics.  Add the
metrics endpoint to the docker api server under `/metrics`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add metrics to daemon package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

api: use standard way for metrics route

Also add "type" query parameter

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Convert timers to ms

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-10-27 10:34:38 -07:00
Sebastiaan van Stijn
62ff3e9083 Merge pull request #27702 from tonistiigi/net-builder0
add --network option for docker build
2016-10-25 21:50:33 -07:00
Brian Goff
6e462412d7 Merge pull request #27503 from Microsoft/validcredspec
Windows: Add cred spec test with well form credentials
2016-10-25 13:44:52 -07:00
Sebastiaan van Stijn
0797e3f61a Merge pull request #27644 from Microsoft/jjh/builderslash
Windows: Honour escape directive fully
2016-10-25 11:52:13 -07:00
Tonis Tiigi
e3b48fca0d Add integration tests for build with network opts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-10-25 10:25:42 -07:00
Akihiro Suda
7e24c16086 add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-25 06:43:54 +00:00
Aaron Lehmann
4882c263c6 Merge pull request #27703 from aaronlehmann/fix-test-name
integration-cli: Fix style of swarm test name
2016-10-24 18:23:33 -07:00
Sebastiaan van Stijn
411e7b4416 Merge pull request #24533 from yongtang/24392-docker-info-label-duplicate-keys
Remove duplicate keys in labels of `docker info`
2016-10-24 18:12:28 -07:00
Sebastiaan van Stijn
ba41a5edac Merge pull request #27223 from mlaventure/merge-experimental
Make experimental a runtime flag
2016-10-24 16:58:32 -07:00
Aaron Lehmann
073d811587 integration-cli: Fix style of swarm test name
A recent change fixed integration tests to use "API" in test names
instead of "Api". A new test was added in a PR opened before this
change, and didn't benefit from the cleanup. Fix its name.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-10-24 16:45:17 -07:00
Kenfe-Mickael Laventure
7781a1bf0f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-24 15:20:01 -07:00
Vincent Demeester
67b85f9d26 Merge pull request #26354 from KingEmet/fixbranch
make GetAll use client.List as the source of truth
2016-10-24 14:25:24 -07:00
Vincent Demeester
d2e64247e6
Taking stop-signal into account when docker kill
If a container sets a stop-signal, taking it into account to disable or
not the restart policy.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-10-24 11:10:14 -07:00
John Howard
935d4d1c17 Merge pull request #27616 from Microsoft/jjh/microsoftprefix
Windows: Overhaul Dockerfile.windows and test image name
2016-10-22 13:01:40 -07:00
Sebastiaan van Stijn
b54a1d83fa Merge pull request #27630 from runcom/fix-info-route
api/server/router/system: fix info versioning
2016-10-21 18:58:10 -07:00
Sebastiaan van Stijn
a6688959b4 Merge pull request #26973 from allencloud/change-code-in-container-restore
change code in container restore
2016-10-21 18:53:37 -07:00
Sebastiaan van Stijn
3c385b9f6b Merge pull request #27117 from dnephin/swagger-gen
Add swagger.yaml and generate a few types from the spec
2016-10-21 18:15:28 -07:00
John Howard
9a19bd1b45 Windows: Update Dockerfile.windows
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-21 16:06:29 -07:00
John Howard
9127818414 Windows: Honour escape directive fully
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-21 14:22:14 -07:00
Antonio Murdaca
63b5a37203
api/server/router/system: fix info versioning
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-21 12:32:23 +02:00
Aaron Lehmann
bc52939b04 Merge pull request #27613 from stevvooe/archive-package-cleanup
pkg/archive: remove unnecessary Archive and Reader type
2016-10-20 20:56:23 -07:00
Stephen J Day
aa2cc18745
pkg/archive: remove unnecessary Archive and Reader type
The `archive` package defines aliases for `io.ReadCloser` and
`io.Reader`. These don't seem to provide an benefit other than type
decoration. Per this change, several unnecessary type cases were
removed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-10-20 19:31:24 -07:00
Aaron Lehmann
2c620d0aa2 Merge pull request #27287 from mavenugo/pluginv2-sk2
Allow multiple handlers to support network plugins in swarm-mode
2016-10-20 13:43:04 -07:00
Daniel Nephin
b06c352783 Generate api/types:Image from the swagger spec
and rename it to a more appropriate name ImageSummary.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Vincent Demeester
13fd75c3dd Merge pull request #27470 from runcom/expose-exec-pid
record pid of exec'd process
2016-10-20 21:36:21 +02:00
Alexander Morozov
c18fbc9455 Merge pull request #22337 from allencloud/support-insecure-registry-config-reload
support insecure registry in configuration reload
2016-10-20 11:41:23 -07:00
Antonio Murdaca
1808348136
record pid of exec'd process
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-20 17:06:11 +02:00
Yong Tang
9ce8aac55e Show volume options for docker volume inspect
This fix tries to address the issue raised in 25545 where
volume options at the creation time is not showed up
in `docker volume inspect`.

This fix adds the field `Options` in `Volume` type and
persist the options in volume db so that `volume inspect`
could display the options.

This fix adds a couple of test cases to cover the changes.

This fix fixes 25545.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-20 05:14:27 -07:00
Vincent Demeester
1b677816f5 Merge pull request #24594 from jwendell/24355
Exec: Add ability to set environment variables
2016-10-20 13:26:48 +02:00
allencloud
582803f00a support insecure registry in configuration reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-20 07:54:31 +08:00
Vincent Demeester
4a4f028c47 Merge pull request #23036 from yongtang/22471-daemon-shutdown-timeout-daemon
Add config parameter to change stop timeout during daemon shutdown
2016-10-19 18:47:50 +02:00
Andy Goldstein
fc8097f957 Add Logs to ContainerAttachOptions
Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2016-10-19 11:39:00 -04:00
Jonh Wendell
e03bf1221e Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
2016-10-19 12:39:25 -02:00
John Howard
b8977ae537 Windows: Cred spec test with well form credentials
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-18 12:17:56 -07:00
Aaron Lehmann
6d4b527699 Service update failure thresholds and rollback
This adds support for two enhancements to swarm service rolling updates:

- Failure thresholds: In Docker 1.12, a service update could be set up
  to either pause or continue after a single failure occurs. This adds
  an --update-max-failure-ratio flag that controls how many tasks need to
  fail to update for the update as a whole to be considered a failure. A
  counterpart flag, --update-monitor, controls how long to monitor each
  task for a failure after starting it during the update.

- Rollback flag: service update --rollback reverts the service to its
  previous version. If a service update encounters task failures, or
  fails to function properly for some other reason, the user can roll back
  the update.

SwarmKit also has the ability to roll back updates automatically after
hitting the failure thresholds, but we've decided not to expose this in
the Docker API/CLI for now, favoring a workflow where the decision to
roll back is always made by an admin. Depending on user feedback, we may
add a "rollback" option to --update-failure-action in the future.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-10-18 10:09:50 -07:00
Yong Tang
d7be6b2deb Add config parameter to change stop timeout during daemon shutdown
This fix tries to add a daemon config parameter `--shutdown-timeout`
that specifies the timeout value to stop containers gracefully
(before SIGKILL). The default value is 15s.

The `--shutdown-timeout` parameter is added to daemon options and
config file. It will also be updated during daemon reload.

Additional test cases have been added to cover the change.

This fix fixes #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-18 08:07:50 -07:00
Yong Tang
e4c9079d09 Remove duplicate keys in labels of docker info
This fix tries to address the issue raised in 24392 where
labels with duplicate keys exist in `docker info`, which
contradicts with the specifications in the docs.

The reason for duplicate keys is that labels are stored as
slice of strings in the format of `A=B` (and the input/output).

This fix tries to address this issue by checking conflict
labels when daemon started, and remove duplicate labels (K-V).

The existing `/info` API has not been changed.

An additional integration test has been added to cover the
changes in this fix.

This fix fixes 24392.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-18 07:45:27 -07:00
Yong Tang
e66d210891 Add config parameter to change per-container stop timeout during daemon shutdown
This fix tries to add a flag `--stop-timeout` to specify the timeout value
(in seconds) for the container to stop before SIGKILL is issued. If stop timeout
is not specified then the default timeout (10s) is used.

Additional test cases have been added to cover the change.

This fix is related to #22471. Another pull request will add `--shutdown-timeout`
to daemon for #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-17 12:28:46 -07:00
Madhu Venugopal
af185a3806 IT for e2e network-plugin support for swarmkit & services
As of https://github.com/docker/swarmkit/pull/1607, swarmkit honors
global network plugins while allocating network resources.

This IT covers the e2e integration between libnetwork, swarmkit and
docker engine to support global network-plugins for swarm-mode

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-10-17 09:00:36 -07:00
Vincent Demeester
a7c883fb04 Merge pull request #27074 from cyli/bump-notary-version
Bump notary version to 0.4.2
2016-10-17 16:35:57 +02:00
Akihiro Suda
bb17d1fabb [test] fix failure of TestBuildLabelsOverride on Windows
TestBuildLabelsOverride was consistently failing due to "Windows does not support FROM scratch" error

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-16 11:05:31 +00:00
Sebastiaan van Stijn
6f54d70a54 Merge pull request #27174 from duglin/Issue26027
Don't env-var evaluate labels from docker build cmd line
2016-10-14 20:57:41 -07:00
Tõnis Tiigi
4a6b37eb3e Merge pull request #27322 from yongtang/25855-deploy-dab-extension
Allow `docker deploy` command accept stack with/without extension
2016-10-14 18:26:49 -07:00
Tõnis Tiigi
1221294386 Merge pull request #27368 from morelena/move_close
integration-cli: move Close() after error check
2016-10-14 18:25:36 -07:00
cyli
0797af39c2 Fix API incompatibilities between notary v0.3.0 and v0.4.2:
- some function signatures have changed - use the new ones
- re-generate the notary delegation key certs, since notary doesn't allow SHA1
- fix some error message mapping because now if a root rotation fails to validate trusted operations will fail

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-10-14 17:53:34 -07:00
Yong Tang
1e9d04c458 Allow docker deploy command accept filename with/without extension
This fix tries to address the issue raised in 25855 where the command
`docker deploy` can only accept a STACK without extension of `.dab`.
In other words, `docker deploy hellojavaee.dab` gives an error:
```
Bundle hellojavaee.dab.dab not found. Specify the path with --file
```

This fix updates the way namespace STACK is taken so that in case
`STACK.dab` is provided with `docker deploy`:
```
$ docker deploy STACK.dab
```
The `STACK` is used as namespace (instead of `STACK.dab`).

NOTE: This fix will only allows `.dab` extension in namespace, because
it is not possible to have a namespace with `.` in the middle. In other
words, a namespace `hello.java.ee` will not work anyway (whether the file
`hello.java.ee` exists or not).

An additional integration test has been added to cover the changes.

This fix fixes 25855.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-14 11:44:15 -07:00
Sebastiaan van Stijn
dd383898cd Merge pull request #26795 from darrenstahlmsft/PauseResume
Implement Pause Resume support for Windows
2016-10-13 18:08:11 -07:00
Elena Morozova
2b9786a9b3 integration-cli: move Close() after error check
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
2016-10-13 16:07:08 -07:00
Elena Morozova
64238fef8c all: replace loop with single append
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
2016-10-13 13:31:52 -07:00
Tibor Vass
535f52c932 Merge pull request #27296 from tonistiigi/wait-tasks
Wait until tasks have been created in TestSwarmTaskListFilter
2016-10-13 15:02:43 +02:00
Tonis Tiigi
da9ef68f06 Add requirements for tests that require network
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-10-12 11:11:23 -07:00
Vincent Demeester
9db4698929 Merge pull request #27217 from Microsoft/jjh/servicingcitest
Windows: Test for container servicing
2016-10-12 15:50:52 +02:00
Vincent Demeester
310068f606 Merge pull request #27225 from darrenstahlmsft/CreateTests
Windows: Enable more create tests
2016-10-12 15:08:32 +02:00
Darren Stahl
69985e85d3 Implement Pause Resume support for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-10-11 16:23:35 -07:00
Aaron Lehmann
9bd8c1d332 Merge pull request #26804 from stevvooe/clear-tlsconfig-unix-socket
client: pedantic checking of tlsconfig
2016-10-11 15:47:47 -07:00
Tonis Tiigi
f8229aea9f Wait until tasks have been created in TestSwarmTaskListFilter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-10-11 11:56:42 -07:00
Justin Cormack
199e19548e Add support for ambient capabilities
Linux kernel 4.3 and later supports "ambient capabilities" which are the
only way to pass capabilities to containers running as a non root uid.

Previously there was no way to allow containers not running as root
capabilities in a useful way.

Fix #8460

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-10 19:29:02 +01:00
Darren Stahl
45fe59931a Windows: Enable more create tests
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-10-10 10:34:03 -07:00
John Howard
25a148918e Windows: Test for container servicing
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-07 10:47:54 -07:00
Vincent Demeester
b3cc3d7bf9 Merge pull request #23389 from Microsoft/jjh/credentialspec
Windows: Support credential specs
2016-10-07 18:32:44 +02:00
Vincent Demeester
e42ec6d7cb Merge pull request #27171 from tonistiigi/improve-attach-closed
Improve TestAttachClosedOnContainerStop
2016-10-07 11:26:33 +02:00
Vincent Demeester
91312f71aa Merge pull request #26882 from runcom/proxy-path
Specify userland proxy path
2016-10-07 09:44:39 +02:00
Darren Stahl
6482410c9d Enabled more test on Windows, API and Build
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-10-06 17:18:42 -07:00
Justin Cormack
5ee2c2a647 Merge pull request #27160 from mlaventure/update-containerd
Update containerd and runc
2016-10-06 19:36:31 +02:00
John Howard
e85867cb68 Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-06 09:32:22 -07:00
Antonio Murdaca
dd2e1947dc
daemon: add --userland-proxy-path flag
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-06 17:31:53 +02:00
Darren Stahl
443d7313f5 Enable more build tests on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-10-06 00:53:30 -07:00
Doug Davis
28a9a7deb0 Don't env-var evaluate labels from docker build cmd line
Fixes #26027

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-10-05 18:17:02 -07:00