Commit graph

29517 commits

Author SHA1 Message Date
Daniel Nephin
5bf7901f5d Replace vendor of aanand/compose-file with a local copy.
Add go-bindata for including the schema.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 16:04:05 -05:00
Harald Albers
06dae4eae5 Fix bash completion for completing nodes
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 550947e437)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 13:04:05 -08:00
Daniel Nephin
a757b9bea9 Move pkg to cli/compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 16:02:09 -05:00
Daniel Nephin
f147d9b0d1 More unit tests for converting services in stack deploy
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 15:59:23 -05:00
Daniel Nephin
5537dbde84 Move ConvertService to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 15:58:07 -05:00
Daniel Nephin
732e19892d Move ConvertVolumes to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 15:42:06 -05:00
Daniel Nephin
c9ffd3586c Move ConvertNetworks to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 15:32:53 -05:00
Victor Vieux
0b27583f82 Merge pull request #30332 from anusha-ragunathan/1.13.x
Cherry pick docker #30145 and vendor corresponding swarmkit #1883
2017-01-25 12:21:45 -08:00
Victor Vieux
3fdce9676b Merge pull request #29826 from vdemeester/29809-fix-network-ipam-configuration
[1.13.x] Change the way IPAM configuration is handled on stack deploy
2017-01-25 11:51:35 -08:00
Anusha Ragunathan
f0f020a579 Vendor swarmkit
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
2017-01-25 10:13:26 -08:00
Anusha Ragunathan
3048e50434 Update TestSwarmNetworkPlugin test.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
2017-01-25 10:04:27 -08:00
Yong Tang
b194252d80 Fix failure in docker ps --format when .Label has args
This fix tries to fix the issue in 30279 where  `docker ps --format`
fails if `.Label` has args. For example:
```
docker ps --format '{{.ID}}\t{{.Names}}\t{{.Label "some.label"}}'
```

The reason for the failure is that during the preprocessing phase
to detect the existance of `.Size`, the `listOptionsProcessor`
does not has a method of `Label(name string) string`.

This results in the failure of
```
template: :1:24: executing "" at <.Label>: Label is not a method but has arguments
```

This fix fixes the issue by adding needed method of `Label(name string) string`.

This fix fixes 30279.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 2cd4ba1e56)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 17:45:05 -08:00
Brian Goff
e9751047e9 Fix deadlock on v1 plugin with activate error
When a plugin has an activation error, it was not being checked in the
`waitActive` loop. This means it will just wait forever for a manifest
to be populated even though it may never come.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit f2d384fca6)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 17:19:02 -08:00
Sebastiaan van Stijn
b875349fef do not create init-dir if not needed
commit 56f77d5ade
added support for cpu-rt-period and cpu-rt-runtime,
but always initialized the cgroup path, even if not
used.

As a result, containers failed to start on a
read-only filesystem.

This patch only creates the cgroup path if
one of these options is set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f285d5b3e8)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 17:00:52 -08:00
Doug Davis
b0970b629b Only show global warnings once
Upon each container create I'm seeing these warning **every** time in the
daemon output:
```
WARN[0002] Your kernel does not support swap memory limit
WARN[0002] Your kernel does not support cgroup rt period
WARN[0002] Your kernel does not support cgroup rt runtime
```
Showing them for each container.create() fills up the logs and encourages
people to ignore the output being generated - which means its less likely
they'll see real issues when they happen.  In short, I don't think we
need to show these warnings more than once, so let's only show these
warnings at daemon start-up time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
(cherry picked from commit ff42a2eb41)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 17:00:24 -08:00
Anusha Ragunathan
e9779fd7df Fix pluginv1 Windows volumes
c54b717 caused a regression for pluginv1 on Windows, where extraneous
backslashes were added to BasePath of the plugin. For pluginv1 on windows,
BasePath() should return an empty string, since the plugin is fully aware
of the mount path. Also, unlike Linux where all paths are relative to "/",
Windows paths are dependent on system drives and mapped drives.

Fixes #30148

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
(cherry picked from commit 0ef21eb0e3)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 16:37:24 -08:00
Elan Ruusamäe
2dd2ac2c14 do not require custom build of tini
https://github.com/krallin/tini/issues/55#issuecomment-260507562
https://github.com/krallin/tini/issues/55#issuecomment-260538243
https://github.com/docker/docker/pull/28037

Signed-off-by: Elan Ruusamäe <glen@delfi.ee>
(cherry picked from commit d7df731597)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 16:31:39 -08:00
Victor Vieux
b60f411292 Merge pull request #30038 from tonistiigi/setclusterprovider
[v1.13] Add workaround for possible SetClusterProvider deadlock
2017-01-24 16:13:20 -08:00
Sebastiaan van Stijn
482534ff5f Ignore certificate expiry error for top-level inspect
The top-level `docker inspect` command could return
an error if the nodes Swarm certificates were expired.

In situations where the user did not explicitly
ask for an object-type (`--type=foo`), we should
ignore these errors, and consider them equal to
"node is not a swarm manager".

This change makes `docker inspect` ignore these
errors if no type was specified.

As a further optimization, the "swarm status"
result is now stored in a variable, so that
other swarm-specific API calls can be skipped.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 66cf4cc7f7)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 16:05:53 -08:00
Kenfe-Mickael Laventure
25810f3f47 Remove timeout on fifos opening
Instead of a timeout the context is cancelled on error to ensure
proper cleanup of the associated fifos' goroutines.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit c178700a04)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 15:57:14 -08:00
Aaron Lehmann
37be2d4e9b distribution: Add text/html and application/json as image mediatypes
As noted by #30083, the new strict checking of mediatypes misses some
cases where earlier bugs caused nonstandard mediatypes to be stored in
manifests. Two of the known cases are text/html and application/json,
which were returned by certain registries and stored by earlier versions
of Docker. Add special cases for text/html and application/json.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit a215e15cb1)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 15:53:36 -08:00
Harald Albers
880c12df7d Add bash completion for run|create --init-path
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 182048f185)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 15:41:44 -08:00
Harald Albers
ecd95a41d2 Add docs for run|create --init|--init-path
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit d049ef2b0d)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 15:41:37 -08:00
Kenfe-Mickael Laventure
b9ee1c6880 Ensure proper value is used when computing reclaimable space
When Size was reverted to be equal to VirtualSize, the df command
formatter was not correctly updated to account for the change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit dcc1b4baf6)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 15:41:06 -08:00
Steve Durrheimer
0c16980468 Add zsh completion for 'dockerd --init' and 'docker {create,run} --init'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit cdf57782fd)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 13:52:09 -08:00
Harald Albers
1ec7869443 Add bash completion for plugin install --disable-content-trust
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 725a864a04)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 13:49:24 -08:00
Steve Durrheimer
0fa35e2073 Add zsh completion for 'docker plugin install --alias'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 455b7bcbab)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 13:48:58 -08:00
Harald Albers
0be8ebd2a1 Fix bash completion for docker service update
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 01ac33ce16)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 13:48:18 -08:00
Harald Albers
b4fd48ce32 Add bash completion for docker service ps --filter node
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a39a2bb6c2)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 13:47:54 -08:00
Harald Albers
9da299954f Add missing options to bash completion for docker swarm init|update
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit f93da79dc1)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 13:47:28 -08:00
Harald Albers
d4e6422212 Add bash completion for docker swarm unlock|unlock-key
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 07bd5152b3)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 13:47:03 -08:00
Victor Vieux
954520f0ef Merge pull request #30329 from johndmulhausen/patch-2
Fixing formatting errors in Run refdoc
2017-01-20 14:14:15 -08:00
Harald Albers
23e9d30cea Fix treatment of DOCKER_HIDE_LEGACY_COMMANDS in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 12952f537c)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-20 14:07:19 -08:00
Harald Albers
7bb3740386 Honour $DOCKER_HIDE_LEGACY_COMMANDS in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit aa006f1280)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-20 14:06:58 -08:00
Harald Albers
ba79dde9d2 Add bash completion for build --squash
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e91dbba7ff)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-20 14:06:01 -08:00
Harald Albers
d621d74f64 Add bash completion for dockerd --init and docker run|create --init
Fixes #30263

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 2076261757)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-20 14:05:33 -08:00
Steve Durrheimer
78e4fa2caa Add zsh completion for 'docker swarm --availability'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit ee2ce82c61)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-20 14:05:10 -08:00
Steve Durrheimer
f6d70d08a8 Add zsh completion for 'docker {container,image,network,system} prune --filter'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 784ebccffa)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-20 14:03:45 -08:00
Anusha Ragunathan
660a186e92 Pass plugingetter as part of swarm node config.
This is necessary for swarmkit to support cluster wide plugins, such as
globally scoped network plugins.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
2017-01-20 13:44:22 -08:00
John Mulhausen
bd6c3ebed9 Fixing formatting errors
Fixing issues on https://docs.docker.com/engine/reference/builder/#arg

Signed-off-by: John Mulhausen <john@docker.com>
2017-01-20 13:26:30 -08:00
Victor Vieux
49bf474f9e bump version to 1.13.0
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-17 01:00:55 -08:00
Victor Vieux
d4f36676f0 Merge pull request #30188 from thaJeztah/update-1.13-changelog
[1.13] Add missing 1.13 features to changelog
2017-01-17 00:59:25 -08:00
Sebastiaan van Stijn
197977d7fd
Merge pull request #30108 from thaJeztah/update-changelog-1.12.6
Update changelog on master with changes from 1.12.x
(cherry picked from commit a4bc730298)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-17 09:53:25 +01:00
Sebastiaan van Stijn
8324f11b5a
Add missing 1.13 features to changelog
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-16 18:45:55 +01:00
Victor Vieux
48a9e53d70 bump version to 1.13.0-rc7
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-11 18:06:55 -08:00
Victor Vieux
bca3b05950 Merge pull request #30116 from vieux/cherry-pick-1.13.0-rc7
cherry pick 1.13.0-rc7
2017-01-12 22:03:51 -08:00
Yong Tang
4f914489e3 Add test for image size for v1.12 and v1.13 clients against v1.13 daemon
This test checks to make sure both v1.12 and v1.13 client against v1.13 daemon get correct `Size` after the fix.

This test is related to 30027.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit d9451f1c8c)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-11 17:59:31 -08:00
Kenfe-Mickael Laventure
e62d984138 Fix ImageSummary.Size value
The prune PR changed the meaning of the file to mean "space on disk
only unique to this image", this PR revert this change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit be20dc15af)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-11 17:21:26 -08:00
Stefan J. Wernli
f6bc09c380 storeLayer.Parent should return describableStoreLayers
When storeLayer.Parent returns the parent layer, it needs to use the same logic as Get where it wraps in a describablyStoreLayer if the layer is describable. Otherwise, on Windows, this can result in pushing the foreign layers, which is not supposed to be allowed.
This fixes https://github.com/docker/docker/issues/30080.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
(cherry picked from commit d14b7212ad)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-11 14:54:09 -08:00
Victor Vieux
2f2d055013 bump version to 1.13.0-rc6
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-11 09:36:57 -08:00