Compare commits

...

2072 Commits

Author SHA1 Message Date
e7309590a2 Merge pull request #457 from andrewhsu/v
[18.03] Bump version to 18.03.0-ce-rc3
2018-03-08 10:03:02 -08:00
49e42a6151 Merge pull request #456 from andrewhsu/p
[18.03] Use new 'dynamic' args in install.sh
2018-03-08 09:58:32 -08:00
89ec01afcb Bump version to 18.03.0-ce-rc3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-03-08 09:53:33 -08:00
6fa0c6462e Bump version to 18.03.0-ce-rc3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-03-08 09:48:32 -08:00
2329a946f6 Use new 'dynamic' args in install.sh
Scripts were changed around to do static by default, this changes so
that we have "dynamic" inserted where it needs to be inserted

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 130f74155e39ddc36b59d7c47867230284739710)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-03-08 09:41:50 -08:00
23a9017037 Merge pull request #455 from thaJeztah/18.03-fix_static_builds
[18.03] fix static builds
2018-03-08 09:29:02 -08:00
fb4173d8a8 buildmod => buildmode
There was a typo with the buildmode flag for containerd

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 5e4885b9afb1de30133627ce751af2c0e7b72a4e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-08 15:45:32 +01:00
3638dc65e4 Build containerd, runc, and proxy statically
These were originally static binaries in the first place, this changes
them back to that.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 63c7bb24637fdbfd905096ecc75b435ecefd31e9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-08 15:45:24 +01:00
cbc5bef54f Merge pull request #454 from seemethere/cherry_pick_packaging_88
[18.03] Fixes binary installation
2018-03-06 14:11:59 -08:00
88176d01f4 Fixes binary installation
Binary installation was broken after the
hack/dockerfile/install-binaries script was removed.

This remedies that.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 59164bedeab571029805a107e8e5a32fc9cd56b3)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-03-06 21:50:00 +00:00
3e53917a28 Merge pull request #443 from jose-bigio/18.03_versionBump
[18.03]  Bump version to 18.03.0-ce-rc2
2018-03-06 13:05:52 -08:00
5613f516dd Merge pull request #440 from jose-bigio/18.03_changelog
[18.03] Updating Changelog for 18.03
2018-03-06 13:05:24 -08:00
7bc0502750 Updating Changelog for 18.03
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2018-03-06 11:30:36 -08:00
91bb2aeb67 Merge pull request #453 from thaJeztah/18.03-swarmkit-ingress-attach
[18.03] disallow attaching ingress network
2018-03-06 11:27:15 -08:00
5ba2b1a74d Merge pull request #452 from thaJeztah/18.03-backport-selansen-36247
[18.03] Fix to address regression caused by PR 30897
2018-03-06 10:04:37 -08:00
dbe2a19e83 CLI bump swarmkit to 11d7b06f48bc1d73fc6d8776c3552a4b11c94301
Contains no changes for the CLI, but keeps the version
in sync with engine

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-06 17:32:08 +01:00
2d690d4e87 Engine: bump swarmkit to 11d7b06f48bc1d73fc6d8776c3552a4b11c94301
Ingress network should not be attachable

Ingress network is a special network used only to expose
ports. For this reason the network cannot be explicitly
attached during service create or service update

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-06 17:31:43 +01:00
3ab4d93c66 Merge pull request #451 from andrewhsu/md
[18.03] vndr swarmkit to 49a9d7f
2018-03-06 07:39:11 -08:00
cb1018ea72 Merge pull request #449 from tonistiigi/layer-leak-fix
[18.03] builder: fix layer lifecycle leak
2018-03-06 07:37:26 -08:00
3310baba0f Fix to address regression caused by PR 30897
With the inclusion of PR 30897, creating service for host network
    fails in 18.02. Modified IsPreDefinedNetwork check and return
    NetworkNameError instead of errdefs.Forbidden to address this issue

Signed-off-by: selansen <elango.siva@docker.com>
(cherry picked from commit 7cf8b20762cc9491f52ff3f3d94c880378183696)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-06 13:42:37 +01:00
9dbc108a14 Merge pull request #441 from thaJeztah/18.03-backport-templated-configs-secrets
[18.03] Add --template-driver option for secrets/configs
2018-03-05 22:25:55 -08:00
977f2704b3 Merge pull request #450 from thaJeztah/18.03-backport-bump-runc-1.0-rc5
[18.03] Bump Runc to 1.0.0-rc5
2018-03-05 22:22:01 -08:00
1b39f8bd26 cli: vndr swarmkit 49a9d7f
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-03-06 01:45:21 +00:00
652953a81f engine: vndr swarmkit 49a9d7f
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-03-06 01:43:57 +00:00
7000ca4203 Merge pull request #447 from vdemeester/tests-fixes
[18.03] Fixes tests to have the ci green
2018-03-05 17:19:37 -08:00
5bc239fe16 bump containerd/console to 2748ece16665b45a47f884001d5831ec79703880
Fix runc exec on big-endian, causing:

    container_linux.go:265: starting container process caused "open /dev/pts/4294967296: no such file or directory"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit aab5eaddccb8cb196fdb1e285890dfa94a071b14)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-05 23:56:22 +01:00
aca674de82 Bump Runc to 1.0.0-rc5 / 4fc53a81fb7c994640722ac585fa9ca548971871
Release notes: https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc5

Possibly relevant changes included:

- chroot when no mount namespaces is provided
- fix systemd slice expansion so that it could be consumed by cAdvisor
- libcontainer/capabilities_linux: Drop os.Getpid() call
- Update console dependency to fix runc exec on BE (causing: `container_linux.go:265: starting container process caused "open /dev/pts/4294967296: no such file or directory"`)
- libcontainer: setupUserNamespace is always called (fixes: Devices are mounted with wrong uid/gid)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a2f5a1a5b2d77d694c5bd47798be15b3c0bcdf70)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-05 23:56:13 +01:00
c709b18bfd Split binary installers/commit scripts
Originally I worked on this for the multi-stage build Dockerfile
changes. Decided to split this out as we are still waiting for
multi-stage to be available on CI and rebasing these is pretty annoying.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit b529d1b0936b90ae14d584c73f7332919f8d76b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-05 23:56:02 +01:00
6f6e5c5f2c builder: fix layer lifecycle leak
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 7ad41d53df94c4277574d14809211b42dca2becc)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-03-05 14:11:22 -08:00
50c9a31b4c Fix --label behavior on run
Commit 2b17f4c8a8 fixed the way empty labels
are taken into account (i.e. not interpolated from environment variable),
but it created a regression.

`ValidateLabel` functions doesn't allow empty label value, but it has
always been possible to pass an empty label via the cli (`docker run --label foo`).

This fixes that by not validating the label flag.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 31dc5c0a9a)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-02 10:21:53 +01:00
f8e0c47b29 Merge pull request #442 from thaJeztah/18.03-docs-cherry-picks
[18.03] docs cherry-picks
2018-02-28 13:32:40 -08:00
767a8f6227 Update run.md --restart to include unless-stopped
Update --restart option to include unless-stopped to be consistent with https://docs.docker.com/config/containers/start-containers-automatically/#use-a-restart-policy

Signed-off-by: Lydell Manganti <lydell.manganti@gmail.com>
(cherry picked from commit d281b72a98)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-28 18:10:39 +01:00
36343864e2 Migrate some copy tests to integration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 00d409f03ed825f623b6ef8ec5a3a91cd26194c2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-28 12:29:10 +01:00
7d395933ee Add more container cp tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 07cb69e9bc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-28 11:16:23 +01:00
c70b6c9f35 Clean some docker_cli_build_tests that are cli-only
Remove TestBuildRenamedDockerfile and TestBuildDockerfileOutsideContext
that are cli-only tests (and already tested in the docker/cli
repository).

Also adds some comments on few tests that could be migrate to
docker/cli.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 894c213b3bd6f4d8f344837b5b5084360a013680)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-28 10:13:03 +01:00
dd1b760bad Bump version to 18.03.0-ce-rc2
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2018-02-27 09:34:44 -08:00
de4362e128 docs: mention sctp
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit b85d87b8ab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-26 11:40:06 +01:00
eda1e25f5c Add --template-driver option for secrets/configs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d11b5ccdfa)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-26 11:34:23 +01:00
c160c73353 Merge pull request #438 from jose-bigio/18.03_changelog
[18.03] Changelog for 18.03
2018-02-21 18:31:04 -08:00
5c06a61da4 Merge pull request #437 from andrewhsu/t
[18.03] skip DockerTrustSuite tests for 18.03
2018-02-21 18:30:37 -08:00
9d7d57c20f Merge pull request #439 from andrewhsu/taad
[18.03] Fix TestAttachAfterDetach to work with latest client
2018-02-21 18:30:27 -08:00
138ca8c7ad Deleted the delete section and the triage sections
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2018-02-21 17:50:55 -08:00
9dd6df6ee4 Fix TestAttachAfterDetach to work with latest client
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 847b610620a8b8294d61c717d3c4aa13cb7a8b33)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-02-21 17:50:33 -08:00
9d4514861f 18.03 Changelog
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2018-02-21 17:33:48 -08:00
d5f8753b88 update integration-cli tests for stderr output
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
(cherry picked from commit 250b84ee88)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit d256539bf4)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 5742bd3ccf)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 1a2098cecf)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-02-21 16:23:44 -08:00
a720337d2e Blacklist tests, will be rewritten later on
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 4e81e4fa4e)
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
(cherry picked from commit ec6b0a1a4a)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit fbfecebc0a)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit e3571070d5)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 9d7b9c23f5)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-02-21 16:23:44 -08:00
5ff63c0239 Bump version to 18.03.0-ce-rc1
Signed-off-by: GordonTheTurtle <engine-team@docker.com>
2018-02-21 23:59:01 +00:00
2afc089041 Merge component 'engine' from git@github.com:moby/moby master 2018-02-21 23:57:52 +00:00
66d22efd1f Merge component 'cli' from git@github.com:docker/cli master 2018-02-21 23:32:37 +00:00
02638eae1b Merge pull request #36209 from dnephin/fix-image-prune-mapping
Remove broken container check from image prune
Upstream-commit: 05c751b1be6785b4f8a42c412e858508b137c10e
Component: engine
2018-02-21 18:22:51 -05:00
acea77d537 Merge pull request #843 from sepich/docs-for-pr33130
Document long form of --network and --network-add
Upstream-commit: 84c7dd6057
Component: cli
2018-02-21 23:26:39 +01:00
f1a4158236 Merge pull request #36370 from thaJeztah/update-authors
Update authors
Upstream-commit: f0f41bae5f0f2579784dfa551643b85286d8c899
Component: engine
2018-02-21 21:29:10 +01:00
706ded458f Merge pull request #897 from thaJeztah/update-authors2
Update authors
Upstream-commit: 50b229f533
Component: cli
2018-02-21 21:28:36 +01:00
c3a24a0fbd Update authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fb005971c2bd82de482d1cfe924f2f4ec60c60ae
Component: engine
2018-02-21 21:12:31 +01:00
da1330b479 Update authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ec92c08874
Component: cli
2018-02-21 20:53:40 +01:00
f8157dd468 Merge pull request #884 from shin-/update_3.6_schema_id
Fix typo in 3.6 schema ID
Upstream-commit: 0e81cddd95
Component: cli
2018-02-21 14:49:43 -05:00
86c5b9760f Fix typo in 3.6 schema ID
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 56f26d1134
Component: cli
2018-02-21 19:55:12 +01:00
ff7653434c Merge pull request #36368 from justincormack/maskkeys
Add /proc/keys to masked paths
Upstream-commit: 8f6a40a3f126ae1dc0a74dc612a3f7b14de4e7f6
Component: engine
2018-02-21 13:48:19 -05:00
da2e766ea9 Merge pull request #824 from ethan-haynes/820-bind-mount-source-missing-error
added check for empty source in bind mount
Upstream-commit: cea4d37bca
Component: cli
2018-02-21 13:33:24 -05:00
6e4091ce84 Merge pull request #894 from thaJeztah/update-moby
Bump moby to 0ede01237c9ab871f1b8db0364427407f3e46541
Upstream-commit: a160ad89c9
Component: cli
2018-02-21 13:15:58 -05:00
8878228a1f Merge pull request #895 from vdemeester/simplify-yaml-marshal
Simplify the marshaling of compose types.Config
Upstream-commit: 88ee1a67f4
Component: cli
2018-02-21 19:02:04 +01:00
8254c65c9b Bump moby to 0ede01237c9ab871f1b8db0364427407f3e46541
Includes:

- [client] Remove duplicate NewClient functions
- Add API support for templated secrets and configs
- Adjust minimum API version for templated configs/secrets

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 60930d309c
Component: cli
2018-02-21 18:48:42 +01:00
239936c7e1 Simplify the marshaling of compose types.Config
- Add `Version` to `types.Config`
- Add a new `Services` types (that is just `[]ServiceConfig`) and add
  `MarshalYAML` method on it.
- Clean other top-level custom marshaling as `Services` is the only one
  required.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cf86a4d922
Component: cli
2018-02-21 18:47:10 +01:00
83cba78175 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-02-21 17:06:09 +00:00
b9bcfd701b Merge component 'engine' from git@github.com:moby/moby master 2018-02-21 17:06:03 +00:00
912355fce6 Merge pull request #891 from vdemeester/k8s-loader-make-sure-version
Make sure we marshall version too…
Upstream-commit: 939938b976
Component: cli
2018-02-21 11:45:14 -05:00
e106425236 Merge pull request #36366 from thaJeztah/update-api-version-check
Adjust minimum API version for templated configs/secrets
Upstream-commit: 0ede01237c9ab871f1b8db0364427407f3e46541
Component: engine
2018-02-21 11:44:50 -05:00
3bdf2c5c9a Merge component 'cli' from git@github.com:docker/cli master 2018-02-21 16:41:14 +00:00
87cd2bf7ea Add /proc/keys to masked paths
This leaks information about keyrings on the host. Keyrings are
not namespaced.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: de23cb939858a66829d5b75057c7ac664c5acda5
Component: engine
2018-02-21 16:23:34 +00:00
3ed0ebb0b5 Make sure we marshall version too…
… otherwise the k8s controller might fail to parse the file as it will
think it's version 1.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9f9f1c8515
Component: cli
2018-02-21 15:36:51 +01:00
e09ff74ed5 Adjust minimum API version for templated configs/secrets
Also adds a note to the API version history

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a3efeaad529b945ce5af78c4b08a6ed47399f8d5
Component: engine
2018-02-21 15:23:00 +01:00
40a7a5b6d7 Bump default API version to 1.37
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 453f2b8b40b923862ce1c08c11531ff5042770f1
Component: engine
2018-02-21 15:22:40 +01:00
a196815f55 Merge pull request #33702 from aaronlehmann/templated-secrets-and-configs
Templated secrets and configs
Upstream-commit: 0076343b29f508a5deb06861c0d85748659f8881
Component: engine
2018-02-21 13:39:10 +01:00
0308ec9c17 Merge pull request #34899 from dnephin/fix-duplicate-new-client
[client] Remove duplicate NewClient functions
Upstream-commit: 466cc981433e2e1815a64ee714b1c8c083765785
Component: engine
2018-02-21 12:59:42 +01:00
ad01430349 Merge pull request #35829 from cpuguy83/no_private_mount_for_plugins
Perform plugin mounts in the runtime
Upstream-commit: 20028325daab4fcbee9c8e28f43dbfb2b1c5d568
Component: engine
2018-02-21 12:28:13 +01:00
692373dbbd Merge pull request #35898 from javabrett/docs-contributing-test
test.md improvements and corrections
Upstream-commit: 9f68f20faecfc084343dc1a6cbd7de1db616e7e0
Component: engine
2018-02-21 09:32:15 +01:00
53fd7b9026 Merge pull request #278 from ishidawataru/sctp
Support SCTP port mapping
Upstream-commit: 64f92fd07c
Component: cli
2018-02-21 09:29:36 +01:00
894af8d548 Support SCTP port mapping
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 995006c164
Component: cli
2018-02-21 12:19:38 +09:00
d7eb6e8c90 Merge pull request #36361 from kolyshkin/pr36326-followup
integration/TestUpdateMemory: fix false failure
Upstream-commit: e3831a62a3052472d7252049bc59835d5d7dc8bd
Component: engine
2018-02-20 16:10:59 -08:00
10bf273bff Remove explicit DOCKER_API_VERSION from integration env setup
Use the default version because it is used by the client package

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e73d742cd7deee396eac3c97664b40264ee358cb
Component: engine
2018-02-20 17:27:28 -05:00
49adb54d71 Remove duplicate calls for getting an APIClient
Remove request.SockRequest
Remove request.SockRequestHijack
Remove request.SockRequestRaw()
Remove deprecated ParseHost
Deprecate and unexport more helpers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0a91ba2d8cfe16df0ba37c1e283c8e3dbbb086d4
Component: engine
2018-02-20 17:27:24 -05:00
4b504a390c Merge pull request #874 from dnephin/replace-go-bindata
Replace go-bindata with esc
Upstream-commit: 5730ef8ea0
Component: cli
2018-02-20 17:00:22 -05:00
e0869be245 Cleanup volume plugin test with bad assumptions
Test made some bad assumptions about on-disk state of volume data.
This updates the test to only test based on what the volume API is
designed to provide.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0df654f3d61d8691ee113a8429bcc8ef65786bc7
Component: engine
2018-02-20 16:57:20 -05:00
088ad71eb5 integration/testUpdateCPUQuota: fix name
The function name should be TestUpdateCPUQuota and not TestUpdateCPUQUota.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 31825081d4c5e643a150b515547cb2a2ea223de4
Component: engine
2018-02-20 13:36:27 -08:00
133cf88cac integration/TestUpdateMemory: fix false failure
This fixes the following test failure:

> --- FAIL: TestUpdateMemory (0.53s)
>  	assertions.go:226:
>	Error Trace:	update_linux_test.go:52
>	Error:      	Not equal:
>	            	expected: int(524288000)
>	            	received: int64(524288000)

Fixes: 0f9da07b569f0d9
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: cc866470981a1e6a839004f24eb30bb708078068
Component: engine
2018-02-20 13:31:03 -08:00
180ce35066 Improve docstrings and small cleanup in client
Use client instead of helpers for TLS in integration test

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a68ae4a2d95b1ff143025a435195af0f1ab30ace
Component: engine
2018-02-20 15:15:02 -05:00
9a83d9fd53 Use gotestyourself env patching
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2b445a53c17ae6526c11a729cb6d1d1dc57490ff
Component: engine
2018-02-20 15:15:02 -05:00
1b01bb68a9 Merge pull request #87 from corbin-coleman/remove-zesty
Remove ubuntu-zesty from the default DOCKER_BUILD_PKGS in Makefile
Upstream-commit: 2ab6d8ab3a9da8917ef52b87943e3de83a1092a5
Component: packaging
2018-02-20 14:10:25 -06:00
18043a7a58 Remove ubuntu-zesty from the default BUILD_PKGS in Makefile
Zesty is EOL and doesn't even have a subdirectory in the `deb` directory of this repo. There's no need to have it as a default.

Signed-off-by: Corbin <corbin.coleman@docker.com>
Upstream-commit: 9b3e8f85f039dfe7391512de6143ef213574973a
Component: packaging
2018-02-20 11:29:11 -08:00
c2d1fda268 Merge pull request #886 from thaJeztah/dockerfile-outside-context
Allow Dockerfile from outside build-context
Upstream-commit: 82a8085885
Component: cli
2018-02-20 19:56:16 +01:00
4f56c06e93 Merge pull request #892 from thaJeztah/bump-moby-vendor
Bump moby vendor and dependencies
Upstream-commit: 02e8dc6bfc
Component: cli
2018-02-20 18:54:55 +01:00
81f2f8b4a0 Merge pull request #885 from thaJeztah/node-engine-version
Add Engine version to docker node ls
Upstream-commit: 1e8530bc34
Component: cli
2018-02-20 18:45:36 +01:00
8439f579a2 Bump swarmkit to f74983e7c015a38a81c8642803a78b8322cf7eac
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3c24e5ce12
Component: cli
2018-02-20 18:07:28 +01:00
5a987db87c Merge component 'engine' from git@github.com:moby/moby master 2018-02-20 17:05:31 +00:00
d34627d1e8 Update github.com/containerd/continuity
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 58e29ec11e
Component: cli
2018-02-20 18:03:37 +01:00
7a139c4f49 bump runc to 6c55f98695e902427906eed2c799e566e3d3dfb5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e17a680f01
Component: cli
2018-02-20 17:58:11 +01:00
6e43a54340 Update go-connections to 7beb39f0b969b075d1325fecb092faf27fd357b6
- Support parsing SCTP port mapping

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 88874b5eff
Component: cli
2018-02-20 17:45:42 +01:00
112f17c68b Merge component 'cli' from git@github.com:docker/cli master 2018-02-20 16:42:03 +00:00
434d9d7ac3 update golang.org/x/sys for OpenBSD
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d9f5fa8124
Component: cli
2018-02-20 17:40:06 +01:00
c6e3764db6 Merge pull request #264 from thaJeztah/carry-moby-32803
Update docker kill reference docs
Upstream-commit: bbe7f84540
Component: cli
2018-02-20 11:19:59 -05:00
a964103223 Bump docker/docker to 079ed017b61eb819b8184b90013ce89465d3aaba
- Add API support for SCTP port mapping
- Add canonical import path
- Add `REMOVE` and `ORPHANED` to TaskState
- Fix TLS from environment variables in client
- Introduce NewClientWithOpts func to build custom client easily
- Wrap response errors for container copy methodsto fix error detection using
  `IsErrNotFound` and `IsErrNotImplemented` for `ContainerStatPath`,
  `CopyFromContainer`, and `CopyToContainer` methods.
- Produce errors when empty ids are passed into inspect calls

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aaa7a7cb95
Component: cli
2018-02-20 17:17:49 +01:00
dbebd52548 Merge pull request #36326 from kolyshkin/integration-exec
Add/use container.Exec() to integration
Upstream-commit: ee9abc212032353e19e5b0f5e6410ad67a0cc9b1
Component: engine
2018-02-20 17:16:09 +01:00
6899375641 Merge pull request #33922 from ishidawataru/sctp
Support SCTP port mapping (bump up API to v1.37)
Upstream-commit: 079ed017b61eb819b8184b90013ce89465d3aaba
Component: engine
2018-02-20 17:00:13 +01:00
c93b94f9bd Allow Dockerfile from outside build-context
Historically, the Dockerfile had to be insde the build-context, because it was
sent as part of the build-context.

3f6dc81e10
added support for passing the Dockerfile through stdin, in which case the
contents of the Dockerfile is injected into the build-context.

This patch uses the same mechanism for situations where the location of the
Dockerfile is passed, and its path is outside of the build-context.

Before this change:

    $ mkdir -p myproject/context myproject/dockerfiles && cd myproject
    $ echo "hello" > context/hello
    $ echo -e "FROM busybox\nCOPY /hello /\nRUN cat /hello" > dockerfiles/Dockerfile
    $ docker build --no-cache -f $PWD/dockerfiles/Dockerfile $PWD/context

    unable to prepare context: the Dockerfile (/Users/sebastiaan/projects/test/dockerfile-outside/myproject/dockerfiles/Dockerfile) must be within the build context

After this change:

    $ mkdir -p myproject/context myproject/dockerfiles && cd myproject
    $ echo "hello" > context/hello
    $ echo -e "FROM busybox\nCOPY /hello /\nRUN cat /hello" > dockerfiles/Dockerfile
    $ docker build --no-cache -f $PWD/dockerfiles/Dockerfile $PWD/context

    Sending build context to Docker daemon  2.607kB
    Step 1/3 : FROM busybox
     ---> 6ad733544a63
    Step 2/3 : COPY /hello /
     ---> 9a5ae1c7be9e
    Step 3/3 : RUN cat /hello
     ---> Running in 20dfef2d180f
    hello
    Removing intermediate container 20dfef2d180f
     ---> ce1748f91bb2
    Successfully built ce1748f91bb2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a1048523d2
Component: cli
2018-02-20 16:50:49 +01:00
1cf28cd5dc Merge pull request #890 from silvin-lubecki/fix-kube-stack-marshaling
Fix stack marshaling for Kubernetes
Upstream-commit: 7d41d18b43
Component: cli
2018-02-20 16:50:45 +01:00
6362580899 Fix stack marshaling for Kubernetes
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9b27e92903
Component: cli
2018-02-20 16:43:24 +01:00
bf0c1bd1d9 Update docker kill reference docs
- explain the either "name" or "id" can be used to reference a container
- explain that signals can be sent by name or number

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0c085c2a77
Component: cli
2018-02-20 14:58:55 +01:00
74fad1551d Merge pull request #888 from trapier/completion-swarm-event-filter-types
Add swarm types to bash completion event type filter
Upstream-commit: e34ca9740e
Component: cli
2018-02-20 10:13:25 +01:00
ded970f96e Merge pull request #36107 from cpuguy83/cleanup_daemon_root_mount
Ensure daemon root is unmounted on shutdown
Upstream-commit: eb033c11753872c6269304d8127dbfe7315e476f
Component: engine
2018-02-20 10:04:41 +01:00
0c0ee07b87 Merge pull request #36330 from vdemeester/migrate-container-list-tests
test: clean/migrate some docker ps cli-only integration tests 
Upstream-commit: 7060a40addd71605862b668c1ec2b889e3540233
Component: engine
2018-02-20 08:44:17 +01:00
ed5d3f9cce Support SCTP port mapping (bump up API to v1.37)
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 8e435b8279f2af3e0cebd73fa9e25ca1bb26004e
Component: engine
2018-02-20 11:15:36 +09:00
df67d5ea13 Removed root@... PS1 from in-container root prompts, retaining #.
Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: bef0cd70a62eff156d99ddd15933b658a1af8893
Component: engine
2018-02-20 11:29:02 +11:00
f4580247c7 test.md improvements and corrections:
- Mentioned integration-cli test-suite deprecation.
- Removed mentions of removed in-container hack/make.sh
  target test-unit, replaced with hack/test/unit.

Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: acaa53bc35ab8fa97d75e90da393d39204a86a15
Component: engine
2018-02-20 11:21:03 +11:00
57f5f76274 integration/TestUpdateMemory: simplify
1. Use integration/internal/exec, removing the getContainerSysFSValue().

2. Avoid repeating magic numbers, use a variable for those.

3. Fix order of arguments to assert.Equal (first "expected", then "actual").

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 0f9da07b569f0d9cbe574db3af3951b4d5c968c0
Component: engine
2018-02-19 11:25:27 -08:00
0582099de6 integration/TestUpdateCPUQUota: use exec
An implementation of exec in TestUpdateCPUQUota had a few issues,
including resource leaking and calling both ContainerExecAttach and
ContainerExecRun. The last one makes the test flaky:

	update_linux_test.go:136: expected cgroup value 20000, got: Error: Exec
	command f923baf709525f6b38f6511126addc5d9bb88fb477eeca1c22440551090fa2bb
	is already running

Fix by using the integration/internal/exec package.

While at it, use require/assert to further improve code readability.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 8a7d6143fca69623e2f5d409328c97603843ccb6
Component: engine
2018-02-19 11:25:27 -08:00
b08746e15a integration: add container.Exec()
Some test cases might need an ability to execute a command inside a
container (in order to analyse its output and/or exit code). It is a bit
complicated operation to do so using engine API. The function provided
aims to hide this complexity, making exec almost as simple as 'docker
exec'.

NOTE that the exec is synchronous, and command's stdin is closed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 01143afe54f1be7308c5663a0cc110740626c62b
Component: engine
2018-02-19 11:25:11 -08:00
5539b125fe Add swarm types to bash completion event type filter
Signed-off-by: Trapier Marshall <trapier.marshall@docker.com>
Upstream-commit: fb80101ca7
Component: cli
2018-02-19 13:46:23 -05:00
39cad2aa10 Merge pull request #36256 from wcwxyz/fix-refcounter-memory-leak
graphdriver: Fix RefCounter memory leak
Upstream-commit: 733ed2ddd3c621dadafbb74feb7b80d20fd3fd6f
Component: engine
2018-02-19 10:32:14 -08:00
c6e83a026f Merge component 'engine' from git@github.com:moby/moby master 2018-02-19 17:05:16 +00:00
7ff06bec92 Merge component 'cli' from git@github.com:docker/cli master 2018-02-19 16:41:15 +00:00
157ffc1e2f Merge pull request #845 from vdemeester/stack-load-the-same
[compose] Share the compose loading code between swarm and k8s stack deploy
Upstream-commit: f56265ae3e
Component: cli
2018-02-19 15:28:40 +01:00
36a89bcfdd Merge pull request #36329 from tonistiigi/tar-cache-fix
builder: fix wrong cache hits building from tars
Upstream-commit: 8cf42d3ad805467be407962f902156a3834062ff
Component: engine
2018-02-19 12:01:20 +01:00
4d022ca109 Merge pull request #880 from vdemeester/container-list-unit-tests
Add unit tests to docker container ls
Upstream-commit: 8900d77a0b
Component: cli
2018-02-19 11:42:10 +01:00
07a8b9380b Add unit tests to docker container ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 581b8d9d72
Component: cli
2018-02-19 11:22:36 +01:00
c2407fa324 Clean some cli-only integration tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 641c73d211d7efe15255ae36ab2362cef3584260
Component: engine
2018-02-19 11:19:19 +01:00
e46642afe1 Merge pull request #35510 from ripcurld0/fix_35500
Display a warn message when there is binding ports and net mode is host
Upstream-commit: 35d69f10a9ac7479095f39358abb78ee6d3ab65f
Component: engine
2018-02-19 08:57:36 +01:00
da22cbc58d Display a warn message when there is binding ports and net mode is host
When a container is created if "--network" is set to "host" all the
ports in the container are bound to the host.
Thus, adding "-p" or "--publish" to the command-line is meaningless.

Unlike "docker run" and "docker create", "docker service create" sends
an error message when network mode is host and port bindings are given

This patch however suggests to send a warning message to the client when
such a case occurs.

The warning message is added to "warnings" which are returned from
"verifyPlatformContainerSettings".

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 6e78fdb790d2e1dbf95a1733cab9395b1b936622
Component: engine
2018-02-18 13:28:44 +00:00
60fb0a3d93 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-02-17 17:05:04 +00:00
c523bda1bb Merge component 'engine' from git@github.com:moby/moby master 2018-02-17 17:04:57 +00:00
7cf04c3e9b Merge component 'cli' from git@github.com:docker/cli master 2018-02-17 16:41:15 +00:00
de6daa450d Merge pull request #36339 from thaJeztah/bump-continuity
Update containerd/continuity to fix ARM 32-bit builds
Upstream-commit: c5e7537d2305c1855f95422f08ca844d05a17aa2
Component: engine
2018-02-17 15:18:08 +09:00
3657332c34 Add Engine version to docker node ls
This adds the Engine version to `docker node ls`, and `.EngineVersion` as a
template option.

With this patch applied:

    docker node ls
    ID                            HOSTNAME                STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
    wp9231itoqsh4rqceojqo01vp *   linuxkit-025000000001   Ready               Active              Leader              18.01.0-ce

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e888dd711f
Component: cli
2018-02-17 02:58:05 +01:00
75d038d03f Update containerd/continuity to fix ARM 32-bit builds
This updates the containerd/continuity package to d8fb8589b0e8e85b8c8bbaa8840226d0dfeb7371
which fixes builds failing on ARM 32-bit, after this dependency was added in
b3aab5e31faf04d8a29f17be55562e4d0c0cb364

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f0947a541866ca05b030afe07dd659887a655e3e
Component: engine
2018-02-17 00:42:10 +01:00
dcede7a976 Merge pull request #36303 from dnephin/cleanup-in-daemon-unix
Cleanup unnecessary and duplicate functions in `daemon_unix.go`
Upstream-commit: 747c163a65365933c5d6d7f0740f2ac8e3775287
Component: engine
2018-02-16 14:55:18 -08:00
37bb2f6b53 Merge pull request #883 from anusha-ragunathan/set_default_timeout
Set a non-zero timeout for HTTP client communication with plugin backend.
Upstream-commit: a0044ba3a7
Component: cli
2018-02-16 16:46:55 -05:00
69a82cc567 Merge pull request #75 from seemethere/add_libseccomp_dependency
Add libseccomp requirement for CentOS 7
Upstream-commit: c64bed235096ded43782dfdbd72ca499b04457c0
Component: packaging
2018-02-16 12:09:35 -08:00
8bdc8e0190 Set a non-zero timeout for HTTP client communication with plugin
backend.

Currently, the timeout is set to 0, which means no timeout. Set it to a
sane default timeout of 30 seconds.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: f1e2030ce8
Component: cli
2018-02-16 12:00:58 -08:00
fbcb172e80 Merge pull request #36144 from emil2k/node-id-required
Produce errors when empty ids are passed into inspect calls. 
Upstream-commit: db360995df97f9d9bcb4eb6a34a5c35a2711795b
Component: engine
2018-02-16 10:18:47 -08:00
b7ea2ca28b Merge component 'engine' from git@github.com:moby/moby master 2018-02-16 17:06:31 +00:00
3e970eb963 Merge component 'cli' from git@github.com:docker/cli master 2018-02-16 16:41:21 +00:00
e537ce0b31 Error out on secret/config templates for older API
Makes sure if the user specifies an older API version that we don't pass
through templating options for versions that templating was not
supported.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a407761e483d9c5ea425a6fd5e55fec03a90485c
Component: engine
2018-02-16 11:25:14 -05:00
f68c84b9a0 Merge configs/secrets in unix implementation
On unix, merge secrets/configs handling. This is important because
configs can contain secrets (via templating) and potentially a config
could just simply have secret information "by accident" from the user.
This just make sure that configs are as secure as secrets and de-dups a
lot of code.
Generally this makes everything simpler and configs more secure.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c02171802b788fb2d4d48bebcee2a57c8eabeeaa
Component: engine
2018-02-16 11:25:14 -05:00
850e2bff8c Always mount configs with tmpfs
This makes configs and secrets behavior identical.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8e8f5f4457d8e1b02031576dbc18c903be4bcfb6
Component: engine
2018-02-16 11:25:14 -05:00
40e1524cb3 daemon: Check return value of createSecretDir
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 426f4e48e3e53b2445835585d7957043a5fe6ab3
Component: engine
2018-02-16 11:25:14 -05:00
599f92e497 Store configs that contain secrets on tmpfs
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cd3d0486a6f62afac50f2cf74e2b9d8728848c97
Component: engine
2018-02-16 11:25:14 -05:00
82ebb2a6fd integration-cli: Add secret/config templating tests
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cdd2e6efdbf402c629844cb20955f160327917b9
Component: engine
2018-02-16 11:25:13 -05:00
fc6a93f926 api: Add Templating parameter to SecretSpec and ConfigSpec
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c5df7235f6a4811f26b37441db401f6b04858504
Component: engine
2018-02-16 11:25:13 -05:00
a6e6cffaed executor: Use a TemplatedDependencyGetter to support template expansion
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 56da5fd7d31c9a627fc6a3c482cb0bf0ffb2d26e
Component: engine
2018-02-16 11:25:13 -05:00
dd73a093e4 Merge pull request #564 from thaJeztah/fix-yaml-examples
Fix leading characters being stripped from example sections in YAML
Upstream-commit: 847cc4bdc0
Component: cli
2018-02-16 11:22:24 -05:00
8a28d41c4f Merge pull request #36335 from thaJeztah/sync-libnetwork-commits
Sync binary commits with vndr
Upstream-commit: 302e584b78db16ea39aca7d7c1612370c50d20f5
Component: engine
2018-02-16 16:12:53 +01:00
44b01cd383 Merge pull request #840 from dekkagaijin/master
GetAll -> Get to retrieve credentials from credential helpers
Upstream-commit: 69432c48db
Component: cli
2018-02-16 15:38:53 +01:00
0a0d1f70a0 Update tomlv for MIT License
The BurntSushi/toml code is now re-licensed as MIT. While
the vendored package was already updated, the tomlv binary
used was still using the old license type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 508d5a0bc00400fb41395223cb4c8be3d9b74ade
Component: engine
2018-02-16 13:42:27 +01:00
3806697c36 Sync version of userland-proxy with libnetwork vendor
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dcf9e7ee1a6f1b840e05e88aeb1aaf2415af38ad
Component: engine
2018-02-16 13:41:13 +01:00
d4bbb49d5c Add notes about keeping versions in sync
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 02ca7dc6e91931d6d418cbfa006c0bcf67861ae5
Component: engine
2018-02-16 13:38:45 +01:00
b38d6149be Merge pull request #36306 from cpuguy83/fix_logopt_validator_plugins
Move log validator logic after plugins are loaded
Upstream-commit: 04d97267b6b57987030862c0d355c9a49eb0e445
Component: engine
2018-02-16 11:52:23 +01:00
4a4ea266a9 Merge pull request #828 from thaJeztah/update-authors
Update authors
Upstream-commit: cb85d55e8d
Component: cli
2018-02-16 11:38:58 +01:00
ff398aa5c7 Merge pull request #34900 from dnephin/send-codecov-report
Create and send codecov report
Upstream-commit: 01bfb6d27c6a4b12c777a11c58830a5ef83379a9
Component: engine
2018-02-16 11:36:51 +01:00
d3ed73b92e Update authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f8da04a510
Component: cli
2018-02-16 11:20:05 +01:00
d2ece4f9f2 Merge pull request #536 from thaJeztah/update-gitignore
Update gitignore
Upstream-commit: 2001500c6e
Component: cli
2018-02-16 10:26:58 +01:00
92f3e5322f Merge pull request #372 from jphuynh/completion-zsh-event-filter
Update event filter zsh completion with `disable`, `enable`, `install…
Upstream-commit: c6a7046674
Component: cli
2018-02-16 10:16:40 +01:00
bc08869249 builder: fix wrong cache hits building from tars
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f6c8266afddcf24a2eb629af3b8e924e9c78ce73
Component: engine
2018-02-15 23:42:42 -08:00
d9b7b3fed0 Document service --network long form
Signed-off-by: Alexander Ryabov <i@sepa.spb.ru>
Upstream-commit: 94ecd2ba73
Component: cli
2018-02-16 09:34:42 +03:00
694d72e031 Merge pull request #36323 from iporsut/remove-getOffsetToReader
Remove unused method from multireader package
Upstream-commit: 89ce4209bd1fed97e30843f7ce1d4b9866ad2ca6
Component: engine
2018-02-15 21:12:41 -05:00
963b00a076 Ensure daemon root is unmounted on shutdown
This is only for the case when dockerd has had to re-mount the daemon
root as shared.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 487c6c7e73dbb7871e80d75f176dd2a3539a2947
Component: engine
2018-02-15 15:58:20 -05:00
cc3e819977 Merge pull request #36304 from Microsoft/jjh/dontrestoreimageformissinglayer
Don't restore image if layer does not exist
Upstream-commit: b1a1234c60cf87048814aa37da523b03a7b0d344
Component: engine
2018-02-15 14:48:36 -05:00
a4ed28f439 Merge pull request #36274 from thaJeztah/bump-swarmkit
Bump SwarmKit to f74983e7c015a38a81c8642803a78b8322cf7eac
Upstream-commit: 1474ec1ecf56a2ec711e42f008cbea4e8287503d
Component: engine
2018-02-15 18:40:09 +01:00
c900fb9923 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-02-15 17:07:08 +00:00
481715cd83 Merge component 'engine' from git@github.com:moby/moby master 2018-02-15 17:07:01 +00:00
fec234b5f1 Merge pull request #878 from adshmh/add-unit-tests-to-plugin-package
Add unit tests to plugin create/remove/enable/disable commands
Upstream-commit: 4bc27c68ac
Component: cli
2018-02-15 18:02:36 +01:00
b4446f4926 Move log validator logic after plugins are loaded
This ensures that all log plugins are registered when the log validator
is run.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b0b9a25e7e60abbe143e149ccaaf4dfb62044016
Component: engine
2018-02-15 11:53:11 -05:00
25714179da Merge pull request #36322 from thaJeztah/fix-build
Fix import path
Upstream-commit: 7d8fa84e11154bf31644b41c50daaac79f463ad5
Component: engine
2018-02-15 11:52:38 -05:00
1ef968a6d2 Merge component 'cli' from git@github.com:docker/cli master 2018-02-15 16:41:17 +00:00
78ec305ac2 Remove unused method from multireader package
Signed-off-by: Weerasak Chongnguluam <singpor@gmail.com>
Upstream-commit: 6e5fba98a53a832dc1654d87637df14c5b9ab2f1
Component: engine
2018-02-15 23:10:56 +07:00
e8ddf74a02 Test invalid filter and move validation on top
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 05e7f2cf58bdd6c1aaf3da9a92ebcd54cdde6d09
Component: engine
2018-02-15 16:24:26 +01:00
664a0689f9 Fix import path
The utils package was moved to "internal" in commit
af306d149e76b100e08972cda364647bd7bcfe1e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ce35439015e4d2190bd82a3b6dfec98f7a12ac90
Component: engine
2018-02-15 15:29:45 +01:00
2b13e6eda3 Merge pull request #36318 from yongtang/02152018-docker-py
Update docker-py to 5e28dcaace5f7b70cbe44c313b7a3b288fa38916
Upstream-commit: 1690103906f3e0554a0a9f7ebaadd86363b212f7
Component: engine
2018-02-15 15:15:23 +01:00
66a715574f Merge pull request #36055 from cpuguy83/slave_mounts_for_root
Use rslave propagation for mounts from daemon root
Upstream-commit: ea34f827112b3837e5349827f6309a37217854cb
Component: engine
2018-02-15 12:57:25 +01:00
7fad1f8a1a Merge pull request #36320 from yongtang/02142018-diff-tests
Migrate container diff tests in integration-cli to api tests.
Upstream-commit: 6f8af32f224c986367bc341df8d4abc1a7b6e018
Component: engine
2018-02-15 03:53:21 -08:00
f2f9da3776 add tests to plugin create/remove/enable/disable commands. Part of work on #37
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 0a914da708
Component: cli
2018-02-15 06:20:26 -05:00
90c87d3cd7 Migrate container diff tests in integration-cli to api tests.
This fix migreates container diff tests in integration-cli
to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9537498cedc4e28ee0c8c26ba3d9e59ebb59fcad
Component: engine
2018-02-15 01:03:29 -08:00
1903b720b8 Remove docker_cli_diff_test.go from integration-cli
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f19bea20c91e1cd5a748aa241e7083e8c6246634
Component: engine
2018-02-15 01:03:29 -08:00
bb78e86790 Merge pull request #36298 from arm64b/fix-internal-network-mode
Fix `DockerNetworkInternalMode` issue
Upstream-commit: e3102d5055995a43b090dbc29342a1846a39edae
Component: engine
2018-02-15 09:49:15 +01:00
f91bc41f1e Merge pull request #36308 from thaJeztah/bump-containerd-1.0.2
Bump containerd to 1.0.2 (cfd04396dc68220d1cecbe686a6cc3aa5ce3667c)
Upstream-commit: 41bed9e6d55c39abac701db7a8492026886a95d5
Component: engine
2018-02-15 09:12:55 +01:00
28ab1221fd Merge pull request #36315 from dnephin/move-commit-to-container-api
Move commit to container backend
Upstream-commit: d6ac79be3454a3ba34672290218ea5a53b1201a2
Component: engine
2018-02-15 09:10:52 +01:00
d80026fd7e Update docker-py to 5e28dcaace5f7b70cbe44c313b7a3b288fa38916
This fix updates docker-py:
```
-ENV DOCKER_PY_COMMIT 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a
+ENV DOCKER_PY_COMMIT 5e28dcaace5f7b70cbe44c313b7a3b288fa38916
```

The updated docker-py includes https://github.com/docker/docker-py/pull/1909
which is required to have #36292 pass the tests.

Full diff is in 1d6b5b2032...5e28dcaace.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9d9af83b0fd70ff6a7faa15cf8746669f0f3b588
Component: engine
2018-02-15 07:43:44 +00:00
98a1f0698b Merge pull request #86 from eiais/newPackages
Update readme to supported packages
Upstream-commit: a54da87b1f51743d9b750a8f1d4997e332faa903
Component: packaging
2018-02-14 17:04:13 -08:00
b741266882 Update readme to supported packages
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: a82d3959676cf185fb7a0511edb036983cedbf21
Component: packaging
2018-02-14 15:21:31 -08:00
0e750709d3 Move commit to container backend
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e574c5ae73f2f54c47319e5e4a17b16bd93213be
Component: engine
2018-02-14 16:06:12 -05:00
c82207f253 Add libseccomp requirement for CentOS 7
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 86f76496ce33bd6eff1737348bc44add4723ddd2
Component: packaging
2018-02-14 19:17:32 +00:00
a592702237 Remove duplicate rootFSToAPIType
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4ceea53b5e6a86c39122e99f6ffbc1142d28a174
Component: engine
2018-02-14 11:59:18 -05:00
9e1c0d7187 Remove unnecessary getLayerInit
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c502bcff33e10be55f15366e123b25574016a9af
Component: engine
2018-02-14 11:59:10 -05:00
8bb8847f9c Merge pull request #36237 from cpuguy83/zfs_do_not_unmount
Do not recursive unmount on cleanup of zfs/btrfs
Upstream-commit: 68c3201626439d5be5c24d14d4fe7e27fe93954d
Component: engine
2018-02-14 09:49:17 -05:00
e156b95318 Merge pull request #35892 from javabrett/dockerfile-on-docker-build-comments
Updated docker-on-docker build-notes.
Upstream-commit: 62c433cd922a9dbd2b989d098fe331c939fe6b71
Component: engine
2018-02-14 09:26:59 -05:00
86dfabe9b6 Share the compose loading code between swarm and k8s stack deploy
To ensure we are loading the composefile the same wether we are pointing
to swarm or kubernetes, we need to share the loading code between both.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 570ee9cb54
Component: cli
2018-02-14 14:07:48 +01:00
1d51022fe8 Updated docker-on-docker build-notes.
These are now more in-line with wiki instructions. Also removes
broken/deprecated make target test-unit.

Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: ba49e8c49830b69c833edff3c393716da20f897a
Component: engine
2018-02-14 22:08:37 +11:00
9ab4ce343a Merge pull request #36305 from cpuguy83/35370_fix_logs_eof
Fix log tail with empty logs
Upstream-commit: e698b6e098ac696daa1a7a80d4bdac08b305b328
Component: engine
2018-02-14 16:41:22 +09:00
d88a6732e6 Merge pull request #35749 from thaJeztah/change-swagger-install
Update go-swagger installation steps in Dockerfile
Upstream-commit: 0f6dc962a5ad650dcb3b5a72ce4eb831deacda7b
Component: engine
2018-02-14 08:20:06 +01:00
4d4ce758aa Merge pull request #876 from vdemeester/maintainers-clean
Remove some maintainers 👼
Upstream-commit: 3e5f2f29ad
Component: cli
2018-02-14 08:10:04 +01:00
16fed85531 Merge pull request #36301 from vdemeester/clean-maintainers
Remove some maintainers 👼
Upstream-commit: 72d89c25c0c8d5e0e61f3eec92765c2078924ab2
Component: engine
2018-02-14 08:09:29 +01:00
b660bf165d Unify the frozen images to the multi-arch version
Update and unify the `busybox` images on all arches to the `glibc` multi-arch
version and remove the temp workaround on amd64 which uses the old version
busybox (v1.26) before this PR to bypass the failure of those network related
test cases. Also, this PR will fix all the network related issues with `glibc`
version `busybox` image.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 3a971009763387856bb7f162accdf6714100e39b
Component: engine
2018-02-14 03:59:04 +00:00
0fb8610c54 Fix log tail with empty logs
When tailing a container log, if the log file is empty it will cause the
log stream to abort with an unexpected `EOF`.
Note that this only applies to the "current" log file as rotated files
cannot be empty.

This fix just skips adding the "current" file the log tail if it is
empty.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f40860c5f3d3575629d4a932207e866c1fea625d
Component: engine
2018-02-13 21:33:05 -05:00
c38f2d0ac2 Merge pull request #869 from mistyhacks/3343-swarm-network-plugins
Clarify network plugins and swarm mode
Upstream-commit: 9a264be221
Component: cli
2018-02-13 21:05:44 -05:00
281df74045 Update containerd dependencies to match 1.0.2
- ed1cbe1fc3...4f6e87ae04
- 29da22c617...c0710c92e8
- runc (already ahead)
- 76e68349ad...d452837986

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 175cfdcfb521aa83f6a1441b0a4b99cb159f058d
Component: engine
2018-02-14 02:13:07 +01:00
6d509c76c4 Bump containerd to 1.0.2 (cfd04396dc68220d1cecbe686a6cc3aa5ce3667c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c2fb6db55be08da95b15bee730a191094f846577
Component: engine
2018-02-14 01:35:22 +01:00
25813b19fa Merge pull request #36269 from Microsoft/jjh/remove-lcow-api-platform-if-omitted
Remove interim env var LCOW_API_PLATFORM_IF_OMITTED
Upstream-commit: 04cb98e6b5e5bd9dac0b92fcc13966498053aa7e
Component: engine
2018-02-13 15:12:18 -08:00
f914512cd5 Merge pull request #36271 from dnephin/use-tag-image-in-commit
Use TagImage in Commit
Upstream-commit: 060893ab5d97d6582770224db3623ad1b3bdb6e1
Component: engine
2018-02-13 16:40:17 -05:00
0f7a16334c Merge pull request #36222 from yongtang/02062018-runc
Update runc to 6c55f98695e902427906eed2c799e566e3d3dfb5
Upstream-commit: 5eb2f98a352de1fb9a32b1795a9f16e6e73bc8db
Component: engine
2018-02-13 12:40:35 -08:00
ea40d8289f Merge pull request #36290 from cpuguy83/use_c8d_fs_pkg
Use continuity fs package for volume copy
Upstream-commit: fc1f95bdb777c59d84e31d56a7a345af92bfe0d8
Component: engine
2018-02-13 15:22:17 -05:00
39948932b1 Don't restore image if layer does not exist
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6903ca89af71d40aeaa0277dab13d3dc6dd801a7
Component: engine
2018-02-13 11:51:01 -08:00
069181a5f7 Merge pull request #36294 from yongtang/02122018-update
Update api tests to use container.Run/Create in helper package
Upstream-commit: bbd9b7ffdf924de8444b5cbc7c41deb604acc8b7
Component: engine
2018-02-13 13:21:49 -05:00
f29b55d081 Merge component 'engine' from git@github.com:moby/moby master 2018-02-13 17:04:05 +00:00
b624ca41cd Merge component 'cli' from git@github.com:docker/cli master 2018-02-13 16:41:09 +00:00
e04d07e253 Merge pull request #36291 from yongtang/02052018-configs-test
Migrates several swarm configs tests from integration-cli to api tests
Upstream-commit: 82d1aedf5325aadcb35e6fd0bfe2008fe37ac88e
Component: engine
2018-02-13 17:24:26 +01:00
65db1dafe3 Update runc to 6c55f98695e902427906eed2c799e566e3d3dfb5
This fix is related to 36219

This fix updates runc to:
```
-RUNC_COMMIT=9f9c96235cc97674e935002fc3d78361b696a69e
+RUNC_COMMIT=6c55f98695e902427906eed2c799e566e3d3dfb5

-github.com/opencontainers/runc 9f9c96235cc97674e935002fc3d78361b696a69e
+github.com/opencontainers/runc 6c55f98695e902427906eed2c799e566e3d3dfb5
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d644050db2a2e341726df49b7a43fc37c05d554a
Component: engine
2018-02-13 15:56:44 +00:00
366c7398c0 Add WithNetworkMode, WithExposedPorts, WithTty, WithWorkingDir to container helper functions
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: eaa1a0c218454c7f102a1a56c657e806e30d1b1b
Component: engine
2018-02-13 15:45:40 +00:00
7ebcfdf8bd Update api tests to use container.Run/Create in helper package
This fix is a sync up with 36266 so that relevant api tests
use the newly added container.Run/Create in helper package

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9fcd2a05106af98e6ffd6efb9f124d64426956e4
Component: engine
2018-02-13 14:54:31 +00:00
cd33455198 Clean some maintainers 👼
albers, aluzzardi, ehazlett, icecrime, lk4d4, mavenugo 🤗

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: de664ac749ed25271e6b498aa5b7735dd2f1e026
Component: engine
2018-02-13 14:42:50 +01:00
7f25d42388 Clean some maintainers 👼
aluzzardi, anusha, crosbymichael, ehazlett, johnstep, mavenugo, mlaventure 🤗

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2a56ebddcb
Component: cli
2018-02-13 11:32:54 +01:00
e6e5d18154 Merge pull request #36299 from liubin/fix-typo-pkg
Fix typo and incorrect return value in pkg
Upstream-commit: 95ce998c10ac407ee0a07c92f14969b573df478e
Component: engine
2018-02-13 01:23:58 -05:00
4efb1e07a3 Merge pull request #875 from kolyshkin/man
Improve man pages
Upstream-commit: 4519c83d44
Component: cli
2018-02-13 00:29:28 +01:00
5f5ee4bd87 Merge pull request #36268 from Microsoft/jjh/rs3-bump
Windows: Bump to final RS3 build number
Upstream-commit: bf1345d0b6d91f24e06d05e741897bc83cf8bab4
Component: engine
2018-02-12 14:49:33 -08:00
f825ac0204 Update integration test to account for SwarmKit change
The PKCS8 changes updated the encryption on the keys so that the
`x509.IsEncryptedPEMBlock` may no longer return true because it cannot
parse the PEM block. The `keyutils` module in SwarmKit can tell whether
it is encrypted either way.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ed7d7b9b0577895e8305e87816cb52fc4e2a0b92
Component: engine
2018-02-12 23:25:51 +01:00
f0113d4e5a Use continuity fs package for volume copy
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b3aab5e31faf04d8a29f17be55562e4d0c0cb364
Component: engine
2018-02-12 16:43:51 -05:00
85207ef75c man/docker-run.1.md: --restart, --ipc, --network options
Describe the possible values for `--restart`, `--ipc`, and `--network`
options. While at it, improve formatting for `--name` options arguments.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 0d9bd33bab
Component: cli
2018-02-12 12:43:24 -08:00
bd1e6937cb Bump cpuguy83/go-md2man to v1.0.8
The biggest motivation for this is proper table rendering; in the
old version it was broken so tables were not rendered at al
(i.e. anything that was put into table was lost, for example,
description of LOG_* log levels in dockerd(8) page).

This also fixes lists, including nested lists. This fixes the
description of behavior in docker-cp(1) which is rendered as a tree:

BEFORE:

```
      Assuming a path separator of /, a first argument of SRC_PATH and second
       argument of DEST_PATH, the behavior is as follows:

       · SRC_PATH specifies a file

       · DEST_PATH does not exist

       · the file is saved to a file created at DEST_PATH

       · DEST_PATH does not exist and ends with /

       · Error condition: the destination directory must exist.

...
```

AFTER:
```
      Assuming a path separator of /, a first argument of SRC_PATH and second
       argument of DEST_PATH, the behavior is as follows:

              · SRC_PATH specifies a file

                · DEST_PATH does not exist

                  · the file is saved to a file created at DEST_PATH

                · DEST_PATH does not exist and ends with /

                  · Error condition: the destination directory must exist.

...
```

Manually checking the diff between the man pages generated by the old
and the new version, there are no changes other than the indentation
(.RS/.RE) for lists, and proper formatting for tables. Formatted man
pages also look decent, nothing seems broken.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 6566f5ff2c
Component: cli
2018-02-12 12:01:20 -08:00
c28bbfe97a Migrates several swarm configs tests from integration-cli to api tests
This fix migrates several swarm configs tests from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 63bd2425fd5ec0dd17aad830652c1b0c5515a31c
Component: engine
2018-02-12 19:38:56 +00:00
f06f7f1849 Remove docker_api_swarm_config_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 31301769106f53a86d194ad68ff02642204a60cf
Component: engine
2018-02-12 19:33:17 +00:00
51450d870a Replace go-bindata with esc
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b127b8d927
Component: cli
2018-02-12 14:23:19 -05:00
228b4fffc0 Merge pull request #36246 from sirreal/fix/swagger-buildargs-type
Fix string type for buildargs API definition
Upstream-commit: 9cbe066e2709cb98ff44b687c2fba1956ff95872
Component: engine
2018-02-12 11:21:42 -08:00
ac895d7e08 Merge pull request #36284 from yongtang/02112018-update-tests
Migrate some update restart tests to api tests
Upstream-commit: 919be92823f970bcf26a64bc4002723baac8cb32
Component: engine
2018-02-12 11:21:21 -08:00
86aa3ea787 Merge pull request #36261 from yongtang/02082018-oom-killed
Migrate docker_cli_oom_killed_test.go to api tests
Upstream-commit: 1bb389121d985affeb2a572bc48d3f2cd38582ed
Component: engine
2018-02-12 09:50:26 -08:00
37a1758a61 Merge pull request #36234 from yongtang/02042018-config-ls
Migrate config list tests from integration-cli to api tests
Upstream-commit: 848cf75f1f3cf45ede5817201fd6febe7225c764
Component: engine
2018-02-12 18:36:14 +01:00
134f46c1e9 Merge pull request #36270 from dperny/fix-client-tls
Fix TLS from environment variables in client
Upstream-commit: bc17d0724a2b7843ada42425453517c549472777
Component: engine
2018-02-12 18:35:55 +01:00
53e6b2eab2 Merge pull request #36283 from yongtang/02052018-secrets-tests
Migrates several swarm secrets from integration-cli to api tests
Upstream-commit: 54d56bbcf454435822d6a696fd7477e31aec9f27
Component: engine
2018-02-12 18:34:29 +01:00
be7cd20cb8 Merge component 'engine' from git@github.com:moby/moby master 2018-02-12 17:05:46 +00:00
119c362758 Merge pull request #872 from nogoegst/fix-unsupported-default-credential-store
Fix compilation of defaultCredentialStore() on unsupported platforms
Upstream-commit: dcd62981c4
Component: cli
2018-02-12 11:51:18 -05:00
e286c9f54e Merge component 'cli' from git@github.com:docker/cli master 2018-02-12 16:42:18 +00:00
8b434386b4 Merge pull request #36279 from yongtang/36266-follow-up
Update api tests to use the newly added container helper package
Upstream-commit: 5d26170cfdb16586d8cd1069a0111930499025a6
Component: engine
2018-02-12 08:24:12 -08:00
4d79f94efe Migrate some update restart tests to api tests
This fix migrates some update restart tests in
integration-cli to api tests in integration.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5b65cee9150b343c97606adc525cf680fb330642
Component: engine
2018-02-12 16:23:08 +00:00
7f1e764c34 Merge pull request #36285 from yongtang/02112018-session-tests
Migrates session tests in integration-cli to api tests
Upstream-commit: 945b786c140b037822c3f1792c3a05a1c16c9a4b
Component: engine
2018-02-12 11:04:49 -05:00
5c9e151bc4 Merge pull request #841 from vdemeester/e2e-kill-test
Add e2e container kill test
Upstream-commit: 85f9fb56b3
Component: cli
2018-02-12 15:14:41 +01:00
4816de08ce Add example buildargs usage
Signed-off-by: Jon Surrell <jon.surrell@gmail.com>
Upstream-commit: 344c73ac672cd4d4f70a08b5a41b6835d9873926
Component: engine
2018-02-12 14:09:37 +01:00
535cb21e7e Reformat to multi-line
Signed-off-by: Jon Surrell <jon.surrell@gmail.com>
Upstream-commit: de2b2b5e4ba0cb297d47a7b05614190fa44f54a2
Component: engine
2018-02-12 14:09:31 +01:00
a6f0fffe6c Merge pull request #36249 from cpuguy83/36145_fix_container_reload
Fix container cleanup on daemon restart
Upstream-commit: 812592d911146791500efc1fb46c3429d9d645b2
Component: engine
2018-02-12 11:36:18 +01:00
afc39de469 Merge pull request #36273 from yongtang/02092018-pause_test
Migrate container pause tests to api tests
Upstream-commit: 5f9570c7ac1775debec250e8b53ff2ff42f36a74
Component: engine
2018-02-12 02:32:52 -08:00
3b4c1991cb Merge pull request #871 from vdemeester/stack-deploy-update-ref
Update reference docs for docker stack deploy
Upstream-commit: 3e344ae425
Component: cli
2018-02-12 11:08:21 +01:00
15d857c4ce Merge pull request #36275 from liubin/fix-daemon
Fix typos in daemon directory
Upstream-commit: 84bde485d754248565b86d2873728da2717e46b9
Component: engine
2018-02-12 09:18:01 +01:00
b61dd8e57f Migrate container pause tests to api tests
This fix migrates container pause tests from integration-cli
to api tests in integration/.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ea2f076ca986038c48af37feaba6524f32761406
Component: engine
2018-02-12 01:24:43 +00:00
5d80bc453f Migrates session tests in integration-cli to api tests
This fix migrates session tests in integration-cli to
api tests in integration.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1d40c6a8999bdddbb57c199c2cf6e5d103153e69
Component: engine
2018-02-11 23:14:39 +00:00
46e07309bd Migrates several swarm secrets from integration-cli to api tests
This fix migrates several swarm secrets from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f955d2e2042cabaeac8a451b83a507b76e606d33
Component: engine
2018-02-11 21:17:44 +00:00
4571efe6b5 Remove docker_api_swarm_secret_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3499557c9b3aa728cb52402c1bb4302f80ab4721
Component: engine
2018-02-11 21:17:25 +00:00
e2c834a1a9 Migrate docker_cli_oom_killed_test.go to api tests
This fix migrates tests in integration-cli/docker_cli_oom_killed_test.go
to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3c21274b76323883e8ffb146fb989850c4de221a
Component: engine
2018-02-11 20:09:32 +00:00
bf8ec4c4d2 Migrate config list tests from integration-cli to api tests
This fix migrates config list tests from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 246f450ac4fcaff15f36874475f15f435ab03a15
Component: engine
2018-02-11 19:39:56 +00:00
dd36e40493 Remove integration-cli/docker_cli_config_ls_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 955a2b81940181ef51b31feacbf234dab98e56d1
Component: engine
2018-02-11 19:26:39 +00:00
401e32ece2 Merge component 'engine' from git@github.com:moby/moby master 2018-02-11 17:05:14 +00:00
e3241636cf Merge pull request #36257 from arm64b/fix-inspect-network-timeout
Fix timeout issue of `InspectNetwork` on AArch64
Upstream-commit: 178ebca0b9fdf41d473cd6dd52ff6607bed28fd7
Component: engine
2018-02-11 20:50:08 +09:00
fd34f2aedf Merge pull request #36276 from nogoegst/update-vendor-x-sys
Update golang.org/x/sys vendor
Upstream-commit: 52a65f6e34261158007d6b85fb90ebe65cfa73af
Component: engine
2018-02-11 17:08:15 +09:00
9bb3c2d897 Update api tests to use the newly added container helper package
This fix is a follow up to 36266 to update some api tests
to use the newly added container helper package.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e9f19df6a9d8ba682f3c9dcdaffed2ac4e0c6189
Component: engine
2018-02-10 23:30:40 +00:00
1d4b488828 Remove integration-cli/docker_cli_pause_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6453d49d05a020aef1426c1676d9cc73217c8ff2
Component: engine
2018-02-10 23:03:55 +00:00
396aa8a139 Merge pull request #36266 from vdemeester/integration-container-helper
Add an integration/internal/container helper package 
Upstream-commit: d07d3e71171ea3125d4462e8e509170f7c3e3370
Component: engine
2018-02-10 12:57:58 -08:00
e1e478d6bf Merge component 'engine' from git@github.com:moby/moby master 2018-02-10 17:03:59 +00:00
defd7909c5 Add an integration/internal/container helper package
To help creating/running/… containers using the client for test integration.
This should make test more readable and reduce duplication a bit.

Usage example

```
// Create a default container named foo
id1 := container.Create(t, ctx, client, container.WithName("foo"))
// Run a default container with a custom command
id2 := container.Run(t, ctx, client, container.WithCmd("echo", "hello world"))
```

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0bb7d42b03bfb125cd50ab50dabe99726e66ab71
Component: engine
2018-02-10 17:29:38 +01:00
3927eb596e Update golang.org/x/sys vendor to 37707fdb30a5b38865cfb95e5aab41707daec7fd
Signed-off-by: Ivan Markin <sw@nogoegst.net>
Upstream-commit: 6f66ccaf507e58f3031a88ec85a84a77c0c3b928
Component: engine
2018-02-10 15:58:20 +00:00
6f3d7b05d2 Fix compilation of defaultCredentialStore() on unsupported platforms
Signed-off-by: Ivan Markin <sw@nogoegst.net>
Upstream-commit: 57c51c8af3
Component: cli
2018-02-10 15:30:32 +00:00
3ca395f582 Merge pull request #36265 from vdemeester/rename-integration-util-to-internal
Rename integration/util to integration/internal
Upstream-commit: 3053006679aa7b6427286f94c3922412ed99f354
Component: engine
2018-02-10 14:25:28 +01:00
6a659ff498 Fix typos in pkg
Signed-off-by: bin liu <liubin0329@gmail.com>
Upstream-commit: 7a7a8a33a4a79e7ea1e67f8a77b4060f95e936ea
Component: engine
2018-02-10 19:43:13 +08:00
4adc380b90 Fix typos in daemon
Signed-off-by: bin liu <liubin0329@gmail.com>
Upstream-commit: b00a67be6e3d3f241879110bd342abaa8e23cbac
Component: engine
2018-02-10 19:42:54 +08:00
1c3e1e8db6 Rename integration/util to integration/internal
Both names have no real sense, but one allows to make sure these packages
aren't used outside of `integration`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: af306d149e76b100e08972cda364647bd7bcfe1e
Component: engine
2018-02-10 09:16:32 +01:00
7179b03d8b Bump SwarmKit to f74983e7c015a38a81c8642803a78b8322cf7eac
- Replace EC Private Key with PKCS#8 PEMs
- Fix IP overlap with empty EndpointSpec
- Add support for Support SCTP port mapping (depends on changes in libnetwork)
- [orchestrator/updater] Do not reschedule tasks if only placement constraints change and are satisfied by the assigned node
- Ensure task reaper stopChan is closed no more than once
- [manager/dispatcher] Synchronization fixes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 191324b8f1e1a2b2dbe692f869bfbf525d150ade
Component: engine
2018-02-09 18:39:49 -08:00
81a9d51f50 Merge pull request #36242 from kolyshkin/rwlayer-nil-deref
c.RWLayer: check for nil before use
Upstream-commit: ab3ea81376441e93311c94910be78ac42292c496
Component: engine
2018-02-09 18:13:03 -08:00
8382b77c1c Use TagImage in Commit
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: afb3eda697efebf18d8ac3bbcfd911a5968081e3
Component: engine
2018-02-09 20:53:39 -05:00
d92fe4f6a1 Fix TLS from environment variables in client
A recent change accidently caused any TLS configuration in FromEnv to be
ignored. This change alters WithHost to create a new http client only if
one doesn't already exist, and otherwise applies the logic to the
transport on the existing client. This preserves the TLS configuration
that might already be on the client.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 80904e9571e7724328160c97ede6a71864f3c06a
Component: engine
2018-02-09 15:29:32 -08:00
cd579fc565 defaultIndexserver -> defaultIndexServer
Signed-off-by: Jake Sanders <jsand@google.com>
Upstream-commit: e1b607a351
Component: cli
2018-02-09 13:48:01 -08:00
e42b22c770 Merge pull request #36259 from yongtang/02082018-kill_test
Migrate TestKillDifferentUserContainer to api test
Upstream-commit: 2d97f5e7800b43a7ea9106c3c95200c6f4404930
Component: engine
2018-02-09 13:47:35 -08:00
2f849b7e23 Merge pull request #36260 from yongtang/02082018-inspect_test
Migrate docker_api_inspect_unix_test.go to integration api test
Upstream-commit: 5589e9cad1107eb9cf030b73d9375e9a7c84cc47
Component: engine
2018-02-09 13:33:51 -08:00
663c468cfb Merge pull request #36221 from yongtang/02032018-secret_ls
Migrate secret list tests from integration-cli to api tests
Upstream-commit: 9d55eefc1b4553260785c1c09772ccd9660b075f
Component: engine
2018-02-09 13:29:19 -08:00
d3c6f2e0ef Remove interim env var LCOW_API_PLATFORM_IF_OMITTED
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c111fec758770a37e8674cac312e528e85d89428
Component: engine
2018-02-09 12:05:07 -08:00
0a75e5196f Windows: Bump to final RS3 build number
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c04504383a913c1af9868b23880c6401651c71b1
Component: engine
2018-02-09 11:39:57 -08:00
5d3102854b Fix container cleanup on daemon restart
When the daemon restores containers on daemon restart, it syncs up with
containerd to determine the existing state. For stopped containers it
then removes the container metadata from containerd.

In some cases this is not handled properly and causes an error when
someone attempts to start that container again.
In particular, this case is just a bad error check.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c0d56ab71701ba47ca6066c7952e724f4f5977c0
Component: engine
2018-02-09 14:36:36 -05:00
89a07f6033 c.RWLayer: check for nil before use
Since commit e9b9e4ace294230c6b8eb has landed, there is a chance that
container.RWLayer is nil (due to some half-removed container). Let's
check the pointer before use to avoid any potential nil pointer
dereferences, resulting in a daemon crash.

Note that even without the abovementioned commit, it's better to perform
an extra check (even it's totally redundant) rather than to have a
possibility of a daemon crash. In other words, better be safe than
sorry.

[v2: add a test case for daemon.getInspectData]
[v3: add a check for container.Dead and a special error for the case]

Fixes: e9b9e4ace294230c6b8eb
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 195893d38160c0893e326b8674e05ef6714aeaa4
Component: engine
2018-02-09 11:24:09 -08:00
4db928a87d Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-02-09 17:07:11 +00:00
13f81c44a2 Merge component 'engine' from git@github.com:moby/moby master 2018-02-09 17:07:05 +00:00
610cac270f Merge component 'cli' from git@github.com:docker/cli master 2018-02-09 16:41:15 +00:00
20c1120c88 Migrate TestKillDifferentUserContainer to api test
This fix migrates TestKillDifferentUserContainer to api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0855922cd3cd1e9d846fd85ef968653ff8649a44
Component: engine
2018-02-09 13:40:32 +00:00
ffb77fa93a Update reference docs for docker stack deploy
`docker stack deploy` now support multiple composefil. This updates the
reference doc to take that fact into account.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4c50007496
Component: cli
2018-02-09 14:22:45 +01:00
a75949cd5f Migrate docker_api_inspect_unix_test.go to integration api test
This fix migrates docker_api_inspect_unix_test.go to integration api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8197529ca2fabc95b9fc4a7e3ff643740b1f4388
Component: engine
2018-02-09 12:56:07 +00:00
fd856e7e70 Merge pull request #36226 from yongtang/36198-follow-up
Add description to TestContainerNetworkMountsNoChown
Upstream-commit: 7e7f8160fcccce94a45596b4fd41f7ddcf9d910f
Component: engine
2018-02-09 04:39:56 -08:00
b582c47758 Fix timeout issue of InspectNetwork on AArch64
Service of inspect network can't be finished within 10s on AArch64 platform,
so we need to adjust the timeout value avoid to paper cover the real issue, plus
to make the integreation test can continue while not terminate with below error:

> === RUN   TestInspectNetwork
> --- FAIL: TestInspectNetwork (27.65s)
>         daemon.go:285: [de79880f4ed4a] waiting for daemon to start
>         daemon.go:317: [de79880f4ed4a] daemon started
>         inspect_test.go:57: timeout hit after 10s: waiting for tasks to enter run state
>         daemon.go:275: [de79880f4ed4a] exiting daemon
> FAIL
> ---> Making bundle: .integration-daemon-stop (in bundles/test-integration)
> Removing test suite binaries
> Makefile:171: recipe for target 'test-integration' failed

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 8f5c1841a8bffb4a7e33f51174177b7ad0182969
Component: engine
2018-02-09 03:20:14 +00:00
9914b54ec0 Merge pull request #36213 from yongtang/02052018-rename_test
Migrate rename tests in integration-cli to api tests
Upstream-commit: afbc9c4cfc5d6f812e3c11c0b0bae8be41f380f7
Component: engine
2018-02-08 18:38:02 -08:00
f74751654b graphdriver: Fix RefCounter memory leak
Signed-off-by: WANG Chao <chao.wang@ucloud.cn>
Upstream-commit: 9015a05606a9bb80f0d8d2e3d43b0b682ca53db4
Component: engine
2018-02-09 10:26:06 +08:00
5072bc0df8 Migrate secret list tests from integration-cli to api tests
This fix migrates secret list tests from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9349c035831e09057bd039b8f677fa19d3354f73
Component: engine
2018-02-09 00:45:22 +00:00
62e1fa1243 Remove docker_cli_secret_ls_test.go from integration-cli
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 42465784dcc61aa69b8fcefe4669d20422471fea
Component: engine
2018-02-09 00:45:08 +00:00
f5f60f4ad4 Migrate rename tests in integration-cli to api tests
This fix migrates rename tests in integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: be24a6b11e36b542d37cf168f6d198d5445803a5
Component: engine
2018-02-08 23:27:14 +00:00
a0a24043be Remove broken container check from image prune
The imageRefs map was being popualted with containerID, and accessed
with an imageID which would never match.

Remove this broken code because: 1) it hasn't ever worked so isn't
necessary, and 2) because at best it would be racy

ImageDelete() should already handle preventing of removal of used
images.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3aa4f7f0d71f04c5cc93d5e80cbdd47b0b5fdb7f
Component: engine
2018-02-08 18:10:46 -05:00
158c963b62 Merge pull request #36241 from yongtang/02072018-create-tests
Migrate TestCreateTmpfsMountsTarget test to api test
Upstream-commit: 15001f83bdb268ce3d4c0191eab39f443cc6ea5c
Component: engine
2018-02-08 14:58:06 -08:00
95ee01fa37 Merge pull request #85 from thaJeztah/bump-golang-1.9.4
Bump Golang to 1.9.4
Upstream-commit: 522d35bf0b10fa675ce18587e5ff766d021dbd82
Component: packaging
2018-02-08 14:56:16 -08:00
4415397c48 Clarify network plugins and swarm mode
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 16d29b3cd6
Component: cli
2018-02-08 14:08:31 -08:00
8aa2823503 Merge pull request #36140 from vdemeester/integration-container-kill
Migrate some kill integration cli test to api tests
Upstream-commit: 21c9e5701bef4687847adb9c26ac42583a57c174
Component: engine
2018-02-08 09:55:28 -08:00
085b7dfcd2 Merge pull request #36235 from yongtang/02072018-info-api-test
Migrates docker info tests to integration api tests
Upstream-commit: 12ff002eedb602f6c8c36d41876dae15e1587849
Component: engine
2018-02-08 09:55:08 -08:00
7a31f33f22 Merge pull request #868 from thaJeztah/bump-golang-1.9.4
Bump golang to 1.9.4
Upstream-commit: a9ecf823ff
Component: cli
2018-02-08 08:06:52 -08:00
61559bd9ba Migrate TestCreateTmpfsMountsTarget test to api test
This fix migrates TestCreateTmpfsMountsTarget test to api test,
and removed integration-cli/docker_cli_create_unix_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f601bc16d555238c86dad1cc0a67bcfcf36a3301
Component: engine
2018-02-08 15:59:12 +00:00
82570b7d22 Migrate some calls to new client function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6977f468bbcf43864a5acf6c89c331a9180169e5
Component: engine
2018-02-08 16:21:45 +01:00
c00977eb44 Merge pull request #867 from sungwonh/prune
Clarify description of volume prune command
Upstream-commit: 704d37db8f
Component: cli
2018-02-08 09:56:15 -05:00
8991a8a5bd Merge pull request #36220 from dnephin/support-proxy-in-splunk-driver
Support a proxy in splunk log driver
Upstream-commit: f653485e57a36518085868dcb48b4d924a520877
Component: engine
2018-02-08 15:32:19 +01:00
9887b96613 Move some kill integration cli to api tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2227c8ad5ee2bd2f636651efd4ef70e56c082f85
Component: engine
2018-02-08 15:26:24 +01:00
0590bb4b31 Introduce NewClientWithOpts func to build custom client easily
This allows to create a client with default values and override those
using functors. As an example, `NewEnvClient()` becomes
`NewClientWithOpts(FromEnv)` ; and if you want a different api version
for this client : `NewClientWithOpts(FromEnv, WithVersion("1.35"))`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 772edd020cc784913973387b00c4d0c526a10a26
Component: engine
2018-02-08 15:26:24 +01:00
83ccee96c3 Merge pull request #36173 from cpuguy83/fix_containerd_crash_spin
Refresh containerd remotes on containerd restarted
Upstream-commit: 384ff69f2f97c0cf0ee2b863bd4d90a82e1cc1a4
Component: engine
2018-02-08 06:19:29 -08:00
d7f3bf126b Merge pull request #36243 from thaJeztah/bump-golang-1.9.4
Bump Golang to 1.9.4
Upstream-commit: 6f33b5a2ab29f3e5db40ed5d958a54e731adca59
Component: engine
2018-02-08 06:17:35 -08:00
e09b72af21 Merge pull request #36224 from dnephin/refactor-commit
Refactor Daemon.Commit()
Upstream-commit: 9769ef333f2af24b30fed0dd7b00384b2df3b953
Component: engine
2018-02-08 21:02:30 +09:00
8ea0c8eb22 Fix string type for buildargs API definition
Signed-off-by: Jon Surrell <jon.surrell@gmail.com>
Upstream-commit: f281358ba2de6204a61cdb062fa67a8b7134739c
Component: engine
2018-02-08 13:00:24 +01:00
940ea8083a Bump golang to 1.9.4
This fixes a vulnerability in `go get` (CVE-2018-6574, http://golang.org/issue/23672),
but shouldn't really affect our code, but it's good to keep in sync.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b32599761f
Component: cli
2018-02-08 00:56:12 -08:00
909b58836c Remove workaround for Nano server TP5
This workaround for golang/go#15286 was added for Nano server TP5 in
fa82c0aa10cfac8c6d5e2446876dc79b2b0c1bf9, and should no longer be
needed

Due to a security fix in Go 1.9.4/1.8.7, loading the .dll is no longer
allowed, and produces an error:

   .\docker_windows.go:9:3: //go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll" only allowed in cgo-generated code

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 250193387c98a4ad69a6591d5fe5a39c1409ffba
Component: engine
2018-02-07 23:38:14 -08:00
770eb4a40c Clarify description of volume prune command
volume prune command removes only local volumes
not used by at least one container.

Signed-off-by: Sungwon Han <sungwon.han@navercorp.com>
Upstream-commit: 34504d0a1e
Component: cli
2018-02-08 15:33:07 +09:00
a076c21e0c Remove integration-cli/docker_cli_create_unix_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8331a1a5cf1f7f751fdb011cb9e1aa4b0642c1e5
Component: engine
2018-02-08 00:21:29 +00:00
06e15263e9 Bump Golang to 1.9.4
This fixes a vulnerability in `go get` (CVE-2018-6574, http://golang.org/issue/23672),
but shouldn't really affect our code, but it's good to keep in sync.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6263b1254b179af81ff4ef97563fe2e1a053993a
Component: packaging
2018-02-07 15:15:37 -08:00
72d7f12462 Bump Golang to 1.9.4
This fixes a vulnerability in `go get` (CVE-2018-6574, http://golang.org/issue/23672),
but shouldn't really affect our code, but it's good to keep in sync.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: caeab268430a033fedd27c53be16758ac1a0f71e
Component: engine
2018-02-07 14:49:51 -08:00
fd90b16ff5 Merge pull request #36194 from dnephin/add-canonical-import
Add canonical import path
Upstream-commit: 3a633a712c8bbb863fe7e57ec132dd87a9c4eff7
Component: engine
2018-02-07 13:06:45 -08:00
32c5b53960 Make sure plugin mounts are cleaned up
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e6f784e3df2095366fd99fd42ab5a2d0b451bd07
Component: engine
2018-02-07 15:54:52 -05:00
eb861a7ae9 Revert "Make plugins dir private."
This reverts commit 0c2821d6f2de692d105e50a399daa65169697cca.

Due to other changes this is no longer needed and resolves some other
issues with plugins.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 37d7b7ddc332541f516d0c41d9ad30b28f2d3e22
Component: engine
2018-02-07 15:48:27 -05:00
90450b2044 Ensure plugin returns correctly scoped paths
Before this change, volume management was relying on the fact that
everything the plugin mounts is visible on the host within the plugin's
rootfs. In practice this caused some issues with mount leaks, so we
changed the behavior such that mounts are not visible on the plugin's
rootfs, but available outside of it, which breaks volume management.

To fix the issue, allow the plugin to scope the path correctly rather
than assuming that everything is visible in `p.Rootfs`.
In practice this is just scoping the `PropagatedMount` paths to the
correct host path.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0e5eaf8ee32662182147f5f62c1bfebef66f5c47
Component: engine
2018-02-07 15:48:27 -05:00
3928c278e5 Plugins perform propagated mount in runtime spec
Setting up the mounts on the host increases chances of mount leakage and
makes for more cleanup after the plugin has stopped.
With this change all mounts for the plugin are performed by the
container runtime and automatically cleaned up when the container exits.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a53930a04fa81b082aa78e66b342ff19cc63cc5f
Component: engine
2018-02-07 15:48:27 -05:00
c932e5d2a5 Use runtime spec modifier for metrics plugin hook
Currently the metrics plugin uses a really hackish host mount with
propagated mounts to get the metrics socket into a plugin after the
plugin is alreay running.
This approach ends up leaking mounts which requires setting the plugin
manager root to private, which causes some other issues.

With this change, plugin subsystems can register a set of modifiers to
apply to the plugin's runtime spec before the plugin is ever started.
This will help to generalize some of the customization work that needs
to happen for various plugin subsystems (and future ones).

Specifically it lets the metrics plugin subsystem append a mount to the
runtime spec to mount the metrics socket in the plugin's mount namespace
rather than the host's and prevetns any leaking due to this mount.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 426e610e43179d58b29c496bc79a53f410a4b1e1
Component: engine
2018-02-07 15:48:26 -05:00
4ec1fd107e Refactor commit
The goal of this refactor is to make it easier to integrate buildkit
and containerd snapshotters.

Commit is used from two places (api and build), each calls it
with distinct arguments. Refactored to pull out the common commit
logic and provide different interfaces for each consumer.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: daff039049aea6e19a4bda1df2834d14b4198bc0
Component: engine
2018-02-07 15:09:06 -05:00
33ddc6d172 Do not recursive unmount on cleanup of zfs/btrfs
This was added in #36047 just as a way to make sure the tree is fully
unmounted on shutdown.

For ZFS this could be a breaking change since there was no unmount before.
Someone could have setup the zfs tree themselves. It would be better, if
we really do want the cleanup to actually the unpacked layers checking
for mounts rather than a blind recursive unmount of the root.

BTRFS does not use mounts and does not need to unmount anyway.
These was only an unmount to begin with because for some reason the
btrfs tree was being moutned with `private` propagation.

For the other graphdrivers that still have a recursive unmount here...
these were already being unmounted and performing the recursive unmount
shouldn't break anything. If anyone had anything mounted at the
graphdriver location it would have been unmounted on shutdown anyway.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2fe4f888bee52b1f256d6fa5e20f9b061d30221c
Component: engine
2018-02-07 15:08:17 -05:00
f68b87fd47 Support a proxy in splunk log driver
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3c4537d5b33d951237ea5e4cc123953eda7a37e7
Component: engine
2018-02-07 14:52:32 -05:00
3257e049e6 update vendor
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7d296522f68a80d540b20753ea0648171ee12825
Component: engine
2018-02-07 14:46:24 -05:00
49c61840e2 Use rslave propagation for mounts from daemon root
By default, if a user requests a bind mount it uses private propagation.
When the source path is a path within the daemon root this, along with
some other propagation values that the user can use, causes issues when
the daemon tries to remove a mountpoint because a container will then
have a private reference to that mount which prevents removal.

Unmouting with MNT_DETATCH can help this scenario on newer kernels, but
ultimately this is just covering up the problem and doesn't actually
free up the underlying resources until all references are destroyed.

This change does essentially 2 things:

1. Change the default propagation when unspecified to `rslave` when the
source path is within the daemon root path or a parent of the daemon
root (because everything is using rbinds).
2. Creates a validation error on create when the user tries to specify
an unacceptable propagation mode for these paths...
basically the only two acceptable modes are `rslave` and `rshared`.

In cases where we have used the new default propagation but the
underlying filesystem is not setup to handle it (fs must hvae at least
rshared propagation) instead of erroring out like we normally would,
this falls back to the old default mode of `private`, which preserves
backwards compatibility.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 589a0afa8cbe39b6512662fd1705873e2d236dd0
Component: engine
2018-02-07 14:27:09 -05:00
b2efbde0e3 Migrates docker info tests to integration api tests
This fix migrates docker info tests in integration-cli
to integration tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 68d9beedbe0994af5c91022874daa271b657be8c
Component: engine
2018-02-07 18:26:01 +00:00
e1fe1c5e0c Merge component 'engine' from git@github.com:moby/moby master 2018-02-07 17:06:12 +00:00
1e3931f923 Refresh containerd remotes on containerd restarted
Before this patch, when containerd is restarted (due to a crash, or
kill, whatever), the daemon would keep trying to process the event
stream against the old socket handles. This would lead to a CPU spin due
to the error handling when the client can't connect to containerd.

This change makes sure the containerd remote client is updated for all
registered libcontainerd clients.

This is not neccessarily the ideal fix which would likely require a
major refactor, but at least gets things to a working state with a
minimal patch.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 400126f8698233099259da967378c0a76bc3ea31
Component: engine
2018-02-07 11:53:00 -05:00
c599863a52 Merge component 'cli' from git@github.com:docker/cli master 2018-02-07 16:41:16 +00:00
3122cc53fa Produce errors when empty ids are passed into inspect calls.
If a blank nodeID was previously passed in it resulted in a node list
request. The response would then fail to umarshal into a `Node`
type returning a JSON error.

This adds an extra validation to all inspect calls to check that the ID
that is required is provided and if not return an error.

Signed-off-by: Emil Davtyan <emil2k@gmail.com>
Upstream-commit: 3e6bbefd268f51755be5af0644995297a71a05d7
Component: engine
2018-02-07 14:05:14 +01:00
0919d8f13e Merge pull request #36201 from arm64b/oom-kill-disable-fixing
Daemon: passdown the `--oom-kill-disable` option to containerd
Upstream-commit: 2e8ccbb49e21b8696ad4c39185036a8b7e50402f
Component: engine
2018-02-06 21:39:43 -08:00
9e9ebf27ff Merge pull request #36223 from yongtang/02062018-clean
Combine runSimpleContainer with runContainer for rename test
Upstream-commit: 4ba4b4b283162c4917d773bf49f8d2c7f5de6b3c
Component: engine
2018-02-06 17:26:49 -08:00
d2876760b0 Add description to TestContainerNetworkMountsNoChown
This fix is a follow up to 36198 by adding description
to TestContainerNetworkMountsNoChown so that it is clear
about the purpose of the test for ownership.

This fix is related to comment in 36198.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 28a2187ea7f0484ce515e7ae1662d778dcf94720
Component: engine
2018-02-07 00:19:38 +00:00
f496025a99 Merge pull request #36198 from yongtang/02042018-mount-tests
Migrates TestContainersAPINetworkMountsNoChown to api tests
Upstream-commit: 382c9593bfc73a0bf967557c98a560413c537b42
Component: engine
2018-02-06 14:08:35 -08:00
d3b2389f2d Merge pull request #35414 from madhanrm/hotadd1
Enable HotAdd for Windows
Upstream-commit: e62d36bcad6ef1b1beafb15411f927b25f52c3d1
Component: engine
2018-02-06 10:40:39 -08:00
5007511cdb Merge pull request #863 from WTFKr0/tls-env-var
Add DOCKER_TLS environment variable for --tls option
Upstream-commit: b5df4f69db
Component: cli
2018-02-06 10:24:38 -08:00
20243d6421 Combine runSimpleContainer with runContainer for rename test
As there is already a  runSimpleContainer, I think it makes
sense to combine runSimpleContainer with runContainer for rename test
to reduce code duplication.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 203d871658104b00099d818425b25f4cd1eff55b
Component: engine
2018-02-06 17:11:39 +00:00
64efe2121e Merge component 'engine' from git@github.com:moby/moby master 2018-02-06 17:05:01 +00:00
b4ccef5824 Merge component 'cli' from git@github.com:docker/cli master 2018-02-06 16:41:14 +00:00
607349c14f Migrates TestContainersAPINetworkMountsNoChown to api tests
This fix migrates TestContainersAPINetworkMountsNoChown from
integration-cli to api tests in integration.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c028da3557cc0e9f80aee9b08118e9947e1fa57a
Component: engine
2018-02-06 15:56:20 +00:00
4056ff9d7d Merge pull request #36188 from yongtang/02012018-TestSecretInspect
Migrate TestSecretInspect from integration-cli to api tests
Upstream-commit: 30a8c6c1094aca87f62f321ea1420865565f1d04
Component: engine
2018-02-06 15:19:08 +01:00
5421c51a06 Merge pull request #569 from vdemeester/compose-multiple-version-mergo
Add support for multiple composefile when deploying
Upstream-commit: 25e969c854
Component: cli
2018-02-06 00:41:43 -08:00
3bb4e932f7 Add DOCKER_TLS environment variable
Signed-off-by: WTFKr0 <thomas.kovatchitch@gmail.com>
Upstream-commit: 42fa3ef7d8
Component: cli
2018-02-06 09:27:05 +01:00
ac13dc6ce4 Use Get rather than GetAll to retrieve credentials from credential helpers.
Signed-off-by: Jake Sanders <jsand@google.com>
Upstream-commit: 1d0a37c460
Component: cli
2018-02-05 20:31:46 -08:00
8e79d4b5b1 Merge pull request #860 from mistyhacks/explain-netio-blockio
Explain the columns shown in docker stats
Upstream-commit: e12f71a9b8
Component: cli
2018-02-05 18:47:24 -08:00
70566138f9 Merge pull request #858 from mistyhacks/add-registry-auth-example
Add an example for --with-registry-auth
Upstream-commit: ce985d04ce
Component: cli
2018-02-05 18:45:50 -08:00
be83c11fb0 Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
83bc700def Merge pull request #36192 from yongtang/02012018-docker_cli_nat_test
Migrate some of the nat tests in integration-cli to api tests
Upstream-commit: 090c5bf25a53c8656cddfed275874030a6109ec0
Component: engine
2018-02-05 10:54:43 -08:00
4d238fdd93 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-02-05 18:13:44 +00:00
74954408a8 Merge component 'engine' from git@github.com:moby/moby master 2018-02-05 18:13:38 +00:00
53cc069631 Merge pull request #84 from seemethere/fix_deb_dev
Re-add Git Commit time to deb dev builds
Upstream-commit: 17c691a2dfc4da67dddfb7c33537ba65b5623af3
Component: packaging
2018-02-05 09:46:25 -08:00
44aff4f98f Merge pull request #36191 from cpuguy83/fix_attachable_network_race
Fix race in attachable network attachment
Upstream-commit: 6987557e0cef9bd139128e62d86586a40cda6036
Component: engine
2018-02-05 09:41:35 -08:00
62488ecee8 Merge component 'engine' from git@github.com:moby/moby master 2018-02-05 17:04:33 +00:00
f013c316ca Merge pull request #36202 from AkihiroSuda/remove-wtf
vendor: update BurntSushi/toml for MIT license
Upstream-commit: 874539594333583ea6e3f8459bf9e93ccf19ef35
Component: engine
2018-02-05 09:21:59 +01:00
557565af45 vendor: update BurntSushi/toml for MIT license
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 6093b917c2fa4fc642ac691489ead1f175f1d6b7
Component: engine
2018-02-05 13:57:49 +09:00
fa06c65a30 Daemon: passdown the --oom-kill-disable option to containerd
Current implementaion of docke daemon doesn't pass down the
`--oom-kill-disable` option specified by the end user to the containerd
when spawning a new docker instance with help from `runc` component, which
results in the `--oom-kill-disable` doesn't work no matter the flag is `true`
or `false`.

This PR will fix this issue reported by #36090

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Upstream-commit: 44b074d199de84b9af8cc94005fbed4f76bd9ab8
Component: engine
2018-02-05 03:25:59 +00:00
9f86cebf80 Migrate some of the nat tests in integration-cli to api tests
This fix migrates nat tests in docker_cli_nat_test.go
to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8fb933a30b7cb2f1726c1d73001266d520cf121d
Component: engine
2018-02-03 20:18:00 +00:00
1dc4d7c54e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-02-03 17:04:27 +00:00
6a670e72e5 Merge component 'engine' from git@github.com:moby/moby master 2018-02-03 17:04:21 +00:00
1df01c41a2 Merge component 'cli' from git@github.com:docker/cli master 2018-02-03 16:41:09 +00:00
fd2998caea Merge pull request #36119 from cpuguy83/fix_plugin_scanner
Fix issue with plugin scanner going to deep
Upstream-commit: 6e5c2d639f67ae70f54d9f2285f3261440b074aa
Component: engine
2018-02-02 20:19:01 -08:00
51b800faf9 Merge pull request #36193 from dnephin/debug-swagger-gen-failures
Make it easier to debug swagger-gen flakes
Upstream-commit: 39fe5875407bd23a8da25951d7343c66e0cc4482
Component: engine
2018-02-02 19:54:30 -08:00
07e098a3c1 Merge pull request #36137 from fcrisciani/libnetwork-vendoring
Libnetwork revendoring
Upstream-commit: c2b27d5752e5f2b40e4925dd5f23f59313efa581
Component: engine
2018-02-02 21:27:27 -05:00
9640f78dbf Merge pull request #36190 from dnephin/fix-vendor-check
Fix vendor validation
Upstream-commit: a5f15c738a34746b0726d6d33ebab0dcd8d3df02
Component: engine
2018-02-02 16:24:57 -08:00
3443bd57ad Merge pull request #862 from dnephin/fix-vendor-validation
Fix vendor validation (and vendor)
Upstream-commit: 0c80cafe78
Component: cli
2018-02-02 15:34:09 -08:00
39892725fa Migrate usage of newSwarm in integration/service to use integration/utils/swarm.NewSwarm
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1d40e9289913338eb15de8b8304bcdd329d8e497
Component: engine
2018-02-02 23:28:54 +00:00
b87196602b Re-add Git Commit time to deb dev builds
Dev builds for debian packages previously had system time inserted into
their packaging names while both static and rpm builds instead had the
git commit time.

This commit remedies that by pushing the generation of the debian
package version into a separate script to mirror what is being done in
static and rpm builds.

To give you an idea of what it looks like take the following examples:

```
❯ ./gen-deb-ver ~/work/docker-ce/components/engine/ $(cat ~/work/docker-ce/VERSION)
18.03.0~ce~dev~git20180202.170651.0.e232737
```

```
❯ ./gen-rpm-ver ~/work/docker-ce/components/engine $(cat ~/work/docker-ce/VERSION)
18.03.0.ce 0.0.dev.git20180202.170651.0.e232737 e232737
```

```
❯ ./gen-static-ver ~/work/docker-ce/components/engine/ $(cat ~/work/docker-ce/VERSION)
18.03.0-ce-dev-20180202.170651-e232737
```

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 23e3e42df6cb4e5cafd8648344ad37de25002971
Component: packaging
2018-02-02 23:27:19 +00:00
e73d8c24d7 Libnetwork revendoring
Diff:
5ab4ab8300...20dd462e0a

- Memberlist revendor (fix for deadlock on exit)
- Network diagnostic client
- Fix for ndots configuration

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: ec86547244fa329148a096db56f9ade77a7ce7eb
Component: engine
2018-02-02 14:36:32 -08:00
041bf84c58 Migrate TestSecretInspect from integration-cli to api tests
This fix migrates TestSecretInspect from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 71c794d9126dc4b4626cf6ab90267a990c8923f6
Component: engine
2018-02-02 22:23:12 +00:00
1fa91ec1e6 Merge pull request #82 from seemethere/static_dev_versions
Static Dev builds should include date and sha
Upstream-commit: 015af2c71e77fb99a9882301828bf8eafe4b95df
Component: packaging
2018-02-02 14:20:31 -08:00
6347d30b6f Fix issue with plugin scanner going to deep
The plugin spec says that plugins can live in one of:

- /var/run/docker/plugins/<name>.sock
- /var/run/docker/plugins/<name>/<name>.sock
- /etc/docker/plugins/<name>.[json,spec]
- /etc/docker/plugins/<name>/<name>.<json,spec>
- /usr/lib/docker/plugins/<name>.<json,spec>
- /usr/lib/docker/plugins/<name>/<name>.<json,spec>

However, the plugin scanner which is used by the volume list API was
doing `filepath.Walk`, which will walk the entire tree for each of the
supported paths.
This means that even v2 plugins in
`/var/run/docker/plugins/<id>/<name>.sock` were being detected as a v1
plugin.
When the v1 plugin loader tried to load such a plugin it would log an
error that it couldn't find it because it doesn't match one of the
supported patterns... e.g. when in a subdir, the subdir name must match
the plugin name for the socket.

There is no behavior change as the error is only on the `Scan()` call,
which is passing names to the plugin registry when someone calls the
volume list API.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b27f70d45a0fbb744c17dda02f597ffa6a47d4d9
Component: engine
2018-02-02 16:49:14 -05:00
99a67602d2 Merge pull request #36146 from yongtang/36142-TaskState
Add `REMOVE` and `ORPHANED` to TaskState
Upstream-commit: 3a6f8cfd5108aa3fac145525b7cd2f4f0439702d
Component: engine
2018-02-02 11:33:25 -08:00
1ccbec4ecc Make it easier to debug swgger-gen flakes
Sometimes this check fails, but git status doesn't give us enough information
to debug the failure.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: d80f25d079b84d8aa1e3233464c415e3b5d4480a
Component: engine
2018-02-02 11:07:40 -08:00
cb4ddc2058 Fix vendor validation
vendor/ must be removed first, otherwise files added to vendor/ but not vendor.conf
will not cause the validation to fail

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: a6dedd1a12
Component: cli
2018-02-02 11:01:05 -08:00
08f32bbeb8 Remove integration-cli/docker_cli_nat_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: deae6a5c087eac564dc348fa1f46f57790ed2c84
Component: engine
2018-02-02 18:59:15 +00:00
9256f1dbc3 Fix vendor validation
Previously adding files to vendor/ without adding to vendor.conf would not fail the
validation.

Also be consistent with indentation and use tabs.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 075fd7a9bee630f62f0fa0d7a0a26c660ed504ea
Component: engine
2018-02-02 10:49:57 -08:00
efc7d712c1 Fix race in attachable network attachment
Attachable networks are networks created on the cluster which can then
be attached to by non-swarm containers. These networks are lazily
created on the node that wants to attach to that network.

When no container is currently attached to one of these networks on a
node, and then multiple containers which want that network are started
concurrently, this can cause a race condition in the network attachment
where essentially we try to attach the same network to the node twice.

To easily reproduce this issue you must use a multi-node cluster with a
worker node that has lots of CPUs (I used a 36 CPU node).

Repro steps:

1. On manager, `docker network create -d overlay --attachable test`
2. On worker, `docker create --restart=always --network test busybox
top`, many times... 200 is a good number (but not much more due to
subnet size restrictions)
3. Restart the daemon

When the daemon restarts, it will attempt to start all those containers
simultaneously. Note that you could try to do this yourself over the API,
but it's harder to trigger due to the added latency from going over
the API.

The error produced happens when the daemon tries to start the container
upon allocating the network resources:

```
attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded
```

What happens here is the worker makes a network attachment request to
the manager. This is an async call which in the happy case would cause a
task to be placed on the node, which the worker is waiting for to get
the network configuration.
In the case of this race, the error ocurrs on the manager like this:

```
task allocation failure" error="failed during network allocation for task n7bwwwbymj2o2h9asqkza8gom: failed to allocate network IP for task n7bwwwbymj2o2h9asqkza8gom network rj4szie2zfauqnpgh4eri1yue: could not find an available IP" module=node node.id=u3489c490fx1df8onlyfo1v6e
```

The task is not created and the worker times out waiting for the task.

---

The mitigation for this is to make sure that only one attachment reuest
is in flight for a given network at a time *when the network doesn't
already exist on the node*. If the network already exists on the node
there is no need for synchronization because the network is already
allocated and on the node so there is no need to request it from the
manager.

This basically comes down to a race with `Find(network) ||
Create(network)` without any sort of syncronization.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c379d2681ffe8495a888fb1d0f14973fbdbdc969
Component: engine
2018-02-02 13:46:23 -05:00
b9a24cabc1 Merge pull request #36177 from yongtang/02012018-docker_api_resize_test
Migrate several resize tests from integration-cli to integration
Upstream-commit: 81e651c6d2e26df4ed210a5fd87142dcd7a94dd6
Component: engine
2018-02-02 10:27:24 -08:00
e232737f95 Merge component 'engine' from git@github.com:moby/moby master 2018-02-02 17:06:51 +00:00
a4a00c301a Merge component 'cli' from git@github.com:docker/cli master 2018-02-02 16:41:17 +00:00
08694d3da0 Migrate several resize tests from integration-cli to integration
This fix migrates several resize tests from integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8f800c941570ffcd087c920c37d3a368a5a19e6d
Component: engine
2018-02-02 15:21:47 +00:00
c41074cd60 Merge pull request #36178 from yongtang/01302018-TestAPIStatsContainerGetMemoryLimit
Migrate TestAPIStatsContainerGetMemoryLimit from integration-cli to api tests
Upstream-commit: fd87db3769f111cdaf4ed09f0f36a254bf46fbbd
Component: engine
2018-02-01 22:01:05 -08:00
fe9238ad21 Migrate TestAPIStatsContainerGetMemoryLimit from integration-cli to api tests
This fix migrates TestAPIStatsContainerGetMemoryLimit from
integration-cli to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d5cbde514f4887f5655096bce05faa7b91068038
Component: engine
2018-02-01 22:07:06 +00:00
c38d4936f4 Merge pull request #682 from albers/completion-service-options
Fix and simplify bash completion for service env, mounts and labels
Upstream-commit: 26a2a45967
Component: cli
2018-02-01 14:02:51 -08:00
be8b7a4dfb Merge pull request #851 from mistyhacks/overlay-network-limits
Doc guidance to only use 256 IPs per overlay
Upstream-commit: 19e4389a72
Component: cli
2018-02-01 11:11:27 -08:00
62c3cc507d Merge component 'engine' from git@github.com:moby/moby master 2018-02-01 17:06:44 +00:00
6fbbcc8257 Merge component 'cli' from git@github.com:docker/cli master 2018-02-01 16:41:16 +00:00
02e1927cf7 Remove integration-cli/docker_api_resize_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e8d1f35718b3a9869778611b2cb11c2f4407350f
Component: engine
2018-02-01 16:37:01 +00:00
d25b4a3533 Merge pull request #859 from mistyhacks/quotes-around-format-strings
Add quotes around format template
Upstream-commit: 5bf0d76494
Component: cli
2018-01-31 21:40:08 -08:00
20111ede63 Explain the columns shown in docker stats
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 0219338781
Component: cli
2018-01-31 17:05:54 -08:00
2daf468e57 Add quotes around format template
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 0b6aeae007
Component: cli
2018-01-31 16:51:43 -08:00
4e10e192e9 Merge pull request #36160 from kolyshkin/layer-not-retained
daemon.cleanupContainer: nullify container RWLayer upon release
Upstream-commit: 53a58da551e961b3710bbbdfabbc162c3f5f30f6
Component: engine
2018-01-31 15:13:00 -08:00
096bbe0b3e Merge pull request #36166 from yongtang/01312018-TestAPIUpdateContainer
Migrate TestAPIUpdateContainer from integration-cli to api tests
Upstream-commit: 5772c4b8a25dfad869ecd83bb986e2b0d08b7a07
Component: engine
2018-01-31 15:02:00 -08:00
d30180eaf5 Merge pull request #857 from mistyhacks/5759_typo-in-builder
Fix doubled word in note
Upstream-commit: 3aac740478
Component: cli
2018-01-31 14:51:37 -08:00
dc47308ffd Add an example for --with-registry-auth
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 821452629c
Component: cli
2018-01-31 13:38:49 -08:00
0a7bda1a7c Fix doubled word in note
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: a2bb62683d
Component: cli
2018-01-31 13:05:58 -08:00
2fdf0e5bd3 Migrate TestAPIUpdateContainer from integration-cli to api tests
This fix migrates TestAPIUpdateContainer from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 490edd35829a7dd1144da50105fc377d41a52fc0
Component: engine
2018-01-31 20:02:55 +00:00
e0f0ab1bd4 Merge pull request #36150 from yongtang/36139-ContainerStatus
Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus
Upstream-commit: 231a4408f2d691838e4f821eedb7439c4e1b3f56
Component: engine
2018-01-31 11:59:53 -08:00
6bed3b4c11 Merge pull request #853 from thaJeztah/bump-go-connections
bump docker/go-connections to 98e7d807e5d804e4e42a98d74d1dd695321224ef
Upstream-commit: 3988d9cfd9
Component: cli
2018-01-31 10:22:41 -08:00
275df9bb2d Merge pull request #852 from thaJeztah/bump-version-18.03
Bump VERSION to 18.03.0-dev
Upstream-commit: 4a03f2a4ae
Component: cli
2018-01-31 10:21:54 -08:00
5aed35b37a Merge pull request #36163 from thaJeztah/bump-go-connections
bump docker/go-connections to 98e7d807e5d804e4e42a98d74d1dd695321224ef
Upstream-commit: e1f98e8ab3cb5ae5c0f452cdd81ac4a954279e62
Component: engine
2018-01-31 09:20:10 -08:00
0cabc3863b Merge component 'engine' from git@github.com:moby/moby master 2018-01-31 17:04:47 +00:00
eba76967d1 Merge component 'cli' from git@github.com:docker/cli master 2018-01-31 16:41:13 +00:00
6f8c4ca576 Remove docker_api_update_unix_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8786b09c81e4eed540924ef415ecdfb5f9affa01
Component: engine
2018-01-31 16:10:34 +00:00
877ec711a0 Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus
This fix tries to address the issue raised in 36139 where
ExitCode and PID does not show up in Task.Status.ContainerStatus

The issue was caused by `json:",omitempty"` in PID and ExitCode
which interprate 0 as null.

This is confusion as ExitCode 0 does have a meaning.

This fix removes  `json:",omitempty"` in ExitCode and PID,
but changes ContainerStatus to pointer so that ContainerStatus
does not show up at all if no content. If ContainerStatus
does have a content, then ExitCode and PID will show up (even if
they are 0).

This fix fixes 36139.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9247e09944a4c7f3c2f3f20f180c047a19fb6bae
Component: engine
2018-01-31 15:35:19 +00:00
e5e113b93d bump docker/go-connections to 98e7d807e5d804e4e42a98d74d1dd695321224ef
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b7a9f027f3
Component: cli
2018-01-31 01:38:06 -08:00
aef7840d1c Bump VERSION to 18.03.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: beb0d08e48
Component: cli
2018-01-31 01:34:51 -08:00
6744cda526 bump docker/go-connections to 98e7d807e5d804e4e42a98d74d1dd695321224ef
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a6d35a822eed940260c74e2e7eea6455953ffabe
Component: engine
2018-01-31 01:30:56 -08:00
a0d42db1d4 Merge pull request #36156 from r2d4/move-shell-parser
Move dockerfile ENV shell parser functions into subpackage
Upstream-commit: 421664aba1753b4f9475d6f42b8d18f65950d5ab
Component: engine
2018-01-31 14:48:01 +09:00
d59bd66e1b daemon.cleanupContainer: nullify container RWLayer upon release
ReleaseRWLayer can and should only be called once (unless it returns
an error), but might be called twice in case of a failure from
`system.EnsureRemoveAll(container.Root)`. This results in the
following error:

> Error response from daemon: driver "XXX" failed to remove root filesystem for YYY: layer not retained

The obvious fix is to set container.RWLayer to nil as soon as
ReleaseRWLayer() succeeds.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: e9b9e4ace294230c6b8eb010eda564a2541c4564
Component: engine
2018-01-30 18:50:59 -08:00
3ea1f0df2c Move builder shell parser into subpackage
Moves builder/shell_parser and into its own subpackage at builder/shell since it
has no dependencies other than the standard library. This will make it
much easier to vendor for downstream libraries, without pulling all the
dependencies of builder/.

Fixes #36154

Signed-off-by: Matt Rickard <mrick@google.com>
Upstream-commit: a634526d14639c6b98c509a069ef29e2b69c0ef0
Component: engine
2018-01-30 17:54:39 -08:00
198448e674 Doc guidance to only use 256 IPs per overlay
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 6085b5d3aa
Component: cli
2018-01-30 15:41:53 -08:00
2cc4e9e5e9 Add e2e container kill test
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 42edad2fc7
Component: cli
2018-01-30 15:38:45 -08:00
090ffb4eb7 Merge pull request #36125 from thaJeztah/fix-plural-singular-node-generic-resources
Fix "--node-generic-resource" singular/plural
Upstream-commit: a80cd04eb5375f0eb7b648e820f694b45983cf2b
Component: engine
2018-01-30 14:38:50 -08:00
7de8b77c33 Merge pull request #848 from mistyhacks/fix-publish-table
Fix the network option table
Upstream-commit: bb9e5ab767
Component: cli
2018-01-30 14:32:32 -08:00
d0e1c8724c Fix the network option table
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 773ccdec7b
Component: cli
2018-01-30 14:00:48 -08:00
30a8f2b39f Merge pull request #849 from mistyhacks/add-filter-label-example
Add examples of prune by label
Upstream-commit: 0aabbb09b6
Component: cli
2018-01-30 13:52:34 -08:00
835d51fadd Merge pull request #36148 from yongtang/01302018-TestLinksEtcHostsContentMatch
Migrate some integration-cli test to api tests
Upstream-commit: 5e7a245c3f63a29fb0eb96d8897238b9dd3cfc47
Component: engine
2018-01-30 13:38:15 -08:00
3c2369ae51 Merge pull request #36152 from yongtang/01302018-TestAuthAPI
Migrate TestAuthAPI from integration-cli to integration
Upstream-commit: 11ccbeb5c5ceeeaf6a57b766efe7e4701a740f56
Component: engine
2018-01-30 13:37:56 -08:00
b0db1afb21 Add examples of prune by label
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: bc28bf13f7
Component: cli
2018-01-30 11:29:45 -08:00
bbb554bc58 Migrate TestAuthAPI from integration-cli to integration
This fix migrates TestAuthAPI from integration-cli to integration

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d9247557898d1d15a7349ecb0044b73d4a5a41a9
Component: engine
2018-01-30 19:15:06 +00:00
6d89c35e6e Migrate some integration-cli test to api tests
This fix migrate  TestLinksEtcHostsContentMatch
to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e6bd20edcbf3b7a6f87a356ab0943714936c70e1
Component: engine
2018-01-30 18:52:48 +00:00
6c2db26f29 Merge component 'engine' from git@github.com:moby/moby master 2018-01-30 17:05:43 +00:00
fe18510901 Add REMOVE and ORPHANED to TaskState
This fix tries to address the issue raised in 36142 where
there are discrepancies between Swarm API and swagger.yaml.

This fix adds two recently added state `REMOVE` and `ORPHANED` to TaskState.

This fix fixes 36142.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a40687f5ac7df27bc6c6c3a6f69513a397a1a05a
Component: engine
2018-01-30 16:46:05 +00:00
c1528c1357 Merge component 'cli' from git@github.com:docker/cli master 2018-01-30 16:41:38 +00:00
f0d03ada35 Merge pull request #35946 from joelwurtz/patch-2
Fix Volumes property definition in ContainerConfig
Upstream-commit: 40a9d5d24cda0d938f3c41dceef41b97b6b4e847
Component: engine
2018-01-29 20:57:09 -08:00
8c6b3bb86c Merge pull request #36141 from yongtang/01292018-stop_test
Migrate docker_cli_stop_test.go to api test
Upstream-commit: d98cdc490cca30b4928ad82668485111f9b800df
Component: engine
2018-01-29 19:31:01 -08:00
db1ce9af6b Merge pull request #838 from vdemeester/fix-label-file-behavior
Fix `--label-file` weird behavior
Upstream-commit: 9de1b162fa
Component: cli
2018-01-29 17:32:21 -08:00
4d611b9990 Add support for multiple composefile when deploying
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1872bd802c
Component: cli
2018-01-29 17:27:25 -08:00
12f9c4b018 Migrate docker_cli_stop_test.go to api test
This fix migrate docker_cli_stop_test.go to api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4f378124ff649b844de88c93f6ca70e6b3f5d7d7
Component: engine
2018-01-30 00:55:18 +00:00
f6b5291c4c Merge pull request #844 from tophj-ibm/bump-to-go-1-9-3
Bump Go to 1.9.3 (cont.)
Upstream-commit: 7da324a2f6
Component: cli
2018-01-29 16:17:28 -05:00
98a8916ad3 Merge pull request #36124 from crosbymichael/exec
Use proc/exe for reexec
Upstream-commit: 9d61e5c8c1d85f633643a8b9071393dc417d56dd
Component: engine
2018-01-29 11:41:08 -08:00
aea7a7fc73 Fix --label-file weird behavior
`--label-file` has the exact same behavior as `--env-file`, meaning any
placeholder (i.e. a simple key, no `=` sign, no value), it will get the
value from the environment variable.

For `--label-file` it should just add an empty label.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2b17f4c8a8
Component: cli
2018-01-29 11:08:54 -08:00
27ced4316d Merge pull request #36131 from yongtang/01282018-swarmkit
Update swarmkit to 68a376dc30d8c4001767c39456b990dbd821371b
Upstream-commit: 9c5686fbd04cced838c601a4bf9583bd4b8b9700
Component: engine
2018-01-29 11:07:13 -08:00
33c438d7c6 Bump Go to 1.9.3
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: d89f5fa731
Component: cli
2018-01-29 13:43:59 -05:00
9bff0e7832 Merge pull request #36130 from yongtang/36042-secret-config-mode
Fix secret and config mode issue
Upstream-commit: d093aa0ec365e1ffd4db8a513c5b341b9a0d012e
Component: engine
2018-01-29 10:37:24 -08:00
6c313c03fe Merge pull request #36114 from Microsoft/jjh/fixdeadlock-lcowdriver-hotremove
LCOW: Graphdriver fix deadlock in hotRemoveVHDs
Upstream-commit: 03a1df95369ddead968e48697038904c84578d00
Component: engine
2018-01-29 09:57:43 -08:00
691eb859f4 Merge component 'engine' from git@github.com:moby/moby master 2018-01-29 17:04:44 +00:00
13e5898067 Merge pull request #34369 from cyphar/build-buildmode-pie
*: switch to -buildmode=pie
Upstream-commit: cd3c0057ac28b5601196424597d7fed226948386
Component: engine
2018-01-29 23:54:03 +09:00
a94b27c618 Merge pull request #36132 from yongtang/01282018-typo
Fix a typo in CONTRIBUTING.md
Upstream-commit: 4219df22fc138bc9d180ef81ab2838bb85d96ace
Component: engine
2018-01-28 12:21:46 -08:00
a1a0300f4c Merge component 'engine' from git@github.com:moby/moby master 2018-01-28 17:04:35 +00:00
b13e2a39e1 Add test cases for file mode with secret and config.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 65ee7fff02111bf696bc2fec442d07c2957f4151
Component: engine
2018-01-28 16:48:10 +00:00
eac1cd59fb Merge component 'cli' from git@github.com:docker/cli master 2018-01-28 16:41:09 +00:00
7b9944fc04 Merge pull request #36074 from shutefan/master
Update API docs to show that /containers/{id}/kill returns HTTP 409
Upstream-commit: 958200970f4c52fd093aa913632d2d2b79ebf969
Component: engine
2018-01-28 08:32:35 -08:00
82bc59e5d6 Fix secret and config mode issue
This fix tries to address the issue raised in 36042
where secret and config are not configured with the
specified file mode.

This fix update the file mode so that it is not impacted
with umask.

Additional tests have been added.

This fix fixes 36042.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3305221eefd18ba7712a308c1fb05d4eeeac2cc6
Component: engine
2018-01-28 16:21:41 +00:00
9d28e686ee Update swarmkit to 68a376dc30d8c4001767c39456b990dbd821371b
This fix updates swarmkit to 68a376dc30d8c4001767c39456b990dbd821371b:
```
-github.com/docker/swarmkit 713d79dc8799b33465c58ed120b870c52eb5eb4f
+github.com/docker/swarmkit 68a376dc30d8c4001767c39456b990dbd821371b
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b9923d853076c4ce884246dc3e17955dcf851f16
Component: engine
2018-01-28 16:20:17 +00:00
9a7da567a7 Fix a typo in CONTRIBUTING.md
`seperate` -> `separate`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cce360c7b0136f91fdce6e15ec7fb83eb14153f2
Component: engine
2018-01-28 16:19:51 +00:00
b24e274bbe Merge pull request #36099 from thaJeztah/bump-libnetwork3
bump libnetwork to 5ab4ab830062fe8a30a44b75b0bda6b1f4f166a4
Upstream-commit: 9368e9dac3e7202d2b15a83427010db7b062033a
Component: engine
2018-01-27 21:47:29 -08:00
5e3cb1566c Merge pull request #34992 from allencloud/simplify-shutdowntimeout
simplify codes on calculating shutdown timeout
Upstream-commit: c9f1807abbc60236f5552f8dd25e6d484584f037
Component: engine
2018-01-27 18:26:54 -08:00
8f3ae07b6b Merge pull request #717 from albers/completion-images-2
Improve and fix bash completion for images
Upstream-commit: 4586609f71
Component: cli
2018-01-27 17:48:49 -08:00
8d2c67f10d Merge pull request #36095 from yongtang/36083-network-inspect-created-time
Fix issue where network inspect does not show Created time for networks in swarm scope
Upstream-commit: 924fb0e843930ca444e0f3a6632d7cb67a3da479
Component: engine
2018-01-26 17:18:30 -08:00
3d79cf83bd Merge pull request #35911 from ASMfreaK/Russian-Scientsists-addition-to-names-generator
Add more russian scientists in names-generator.go
Upstream-commit: c41c80026b1469d398edee0167ef33653ff82e93
Component: engine
2018-01-26 15:48:58 -08:00
7c5df03153 Fix "--node-generic-resource" singular/plural
Daemon flags that can be specified multiple times use
singlar names for flags, but plural names for the configuration
file.

To make the daemon configuration know how to correlate
the flag with the corresponding configuration option,
`opt.NewNamedListOptsRef()` should be used instead of
`opt.NewListOptsRef()`.

Commit 6702ac590e6148cb3f606388dde93a011cb14931 attempted
to fix the daemon not corresponding the flag with the configuration
file option, but did so by changing the name of the flag
to plural.

This patch reverts that change, and uses `opt.NewNamedListOptsRef()`
instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6e7715d65ba892a47d355e16bf9ad87fb537a2d0
Component: engine
2018-01-26 13:53:13 -08:00
37f71b34b7 Merge pull request #804 from thaJeztah/more-annotations
Annotate "stack" commands to be "swarm" and "kubernetes"
Upstream-commit: a46fa0759d
Component: cli
2018-01-26 15:12:09 -05:00
dce32bffba Use proc/exe for reexec
You don't need to resolve the symlink for the exec as long as the
process is to keep running during execution.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 59ec65cd8cec942cee6cbf2b8327ec57eb5078f0
Component: engine
2018-01-26 14:13:43 -05:00
db2a10168c Merge pull request #36047 from cpuguy83/graphdriver_improvements
Do not make graphdriver homes private mounts.
Upstream-commit: 2c05aefc99d33edde47b08e38978b6c2f4178648
Component: engine
2018-01-26 13:54:30 -05:00
5338e07ad9 Merge pull request #829 from thaJeztah/bump-moby
Bump moby and dependencies
Upstream-commit: 44e93ddd13
Component: cli
2018-01-26 10:42:14 -08:00
4e8a0d189e Simplify codes on calculating shutdown timeout
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: de68ac8393d32d2c2028dd11c5816430ad0d8d8b
Component: engine
2018-01-26 09:18:07 -08:00
62e8f8e9af Merge component 'engine' from git@github.com:moby/moby master 2018-01-26 17:03:45 +00:00
a002f8068e LCOW: Graphdriver fix deadlock
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a44fcd3d27c06aaa60d8d1cbce169f0d982e74b1
Component: engine
2018-01-26 08:57:52 -08:00
b4eb2e9242 Merge pull request #34372 from cpuguy83/more_error_handling_for_pluginrm
Ignore exist/not-exist errors on plugin remove
Upstream-commit: 6d4d3c52ae7c3f910bfc7552a2a673a8338e5b9f
Component: engine
2018-01-25 20:45:17 -08:00
ffe64d412a Merge pull request #36108 from Microsoft/jjh/opengcsv0.3.6
Revendor Microsoft/opengcs @ v0.3.6
Upstream-commit: 3e416acf1d9e295b9d75dc222b7897ecfd22d26e
Component: engine
2018-01-25 16:42:35 -08:00
c49971b835 Merge pull request #36052 from Microsoft/jjh/no-overlay-off-only-one-disk
LCOW: Regular mount if only one layer
Upstream-commit: a8d0e36d0329063af9205b4848d1f5c09bd4c3be
Component: engine
2018-01-25 15:46:16 -08:00
b78f97f4d9 Merge pull request #36116 from yongtang/34655-follow-up
Update API version history for `Init` with `POST /containers/create`
Upstream-commit: 4b9b8d6278b594c26f396044a964a1dd1b32f0f7
Component: engine
2018-01-25 15:36:20 -08:00
96ed38b227 Merge pull request #35979 from emil2k/fix-container-copy-err
Wrap response errors for container copy methods.
Upstream-commit: 1d1845de5464d7ba8e7b735b0d221b1232851ab2
Component: engine
2018-01-25 13:48:49 -08:00
66b09830df Merge pull request #36105 from yongtang/01242018-golint
Golint fix with ro_layer.go
Upstream-commit: 7db39720b27e2028af88b8e692aa056ec0d273eb
Component: engine
2018-01-25 13:22:51 -08:00
2abfa99b63 Update API version history for Init with POST /containers/create
This is a follow up to
https://github.com/moby/moby/pull/34655#pullrequestreview-91096779

to update API version history for `Init` field.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 376658e41485c43de53391000ad52d1281f9c464
Component: engine
2018-01-25 19:05:22 +00:00
39f9f3f6e3 Merge pull request #34655 from nmeyerhans/document-init-api
Add Init API field documentation to swagger
Upstream-commit: 093a5402a041e9648d03d3e6545fa255e8fe96b2
Component: engine
2018-01-25 10:16:27 -08:00
aab82bfc9c Ignore exist/not-exist errors on plugin remove
During a plugin remove, docker performs an `os.Rename` to move the
plugin data dir to a new location before removing to acheive an atomic
removal.

`os.Rename` can return either a `NotExist` error if the source path
doesn't exist, or an `Exist` error if the target path already exists.
Both these cases can happen when there is an error on the final
`os.Remove` call, which is common on older kernels (`device or resource
busy`).

When calling rename, we can safely ignore these error types and proceed
to try and remove the plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 93027b1ff2475b66b6321b5722009fad4def8187
Component: engine
2018-01-25 09:23:54 -08:00
ecf18b66ed Merge component 'engine' from git@github.com:moby/moby master 2018-01-25 17:06:29 +00:00
680f21a8d2 Merge component 'cli' from git@github.com:docker/cli master 2018-01-25 16:43:34 +00:00
32830b59ac Merge pull request #36100 from thaJeztah/update-authors
Update authors
Upstream-commit: a2445fee0cec27cb350c3b80169ec33716a1388e
Component: engine
2018-01-24 20:35:51 -08:00
4772ea5aec Revendor Microsoft/opengcs @ v0.3.6
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ace588284dc17fc9c92c30e1697558d0b2cc1262
Component: engine
2018-01-24 16:09:58 -08:00
0a23b8e672 Merge pull request #35989 from dani-docker/orca-11380
verbose info is missing for partial overlay ID
Upstream-commit: 2b2265acbb7b1457cd6657a5e4e5503472b306d1
Component: engine
2018-01-24 16:01:31 -08:00
0532f832be Merge pull request #827 from thaJeztah/bump-go-1.9.3
Bump Go to 1.9.3
Upstream-commit: 819df0ebf6
Component: cli
2018-01-24 17:34:05 -05:00
077b817634 Bump Go to 1.9.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ffc7648322
Component: cli
2018-01-24 14:25:13 -08:00
e7e06ee745 Merge pull request #34379 from cpuguy83/mount_optimizations
Optimizations for recursive unmount
Upstream-commit: 59e86068e6b2c23f083bd30b9987fea3fe90ba18
Component: engine
2018-01-24 14:00:58 -08:00
1956fc58bd Merge pull request #36096 from cpuguy83/use_rshared_prop_for_daemon_root
Set daemon root to use shared propagation
Upstream-commit: 3ca99ac2f4a7196097d8f5d037ac10ebbcbb5c3c
Component: engine
2018-01-24 12:24:33 -08:00
f813e83349 Merge pull request #36078 from mixja/multiline-max-event-processing
awslogs - don't add new lines to maximum sized events
Upstream-commit: a636ed5ff473d69e9d0cda352fef0823518f016a
Component: engine
2018-01-24 12:06:49 -08:00
61c1474fc0 Merge pull request #35938 from yongtang/35931-filter-before-since
Fix `before` and `since` filter for `docker ps`
Upstream-commit: 25e56670cf7cd69e60c0d58ed25c33dbb21d3d8e
Component: engine
2018-01-24 12:06:19 -08:00
a0a9bd7e22 Merge pull request #36077 from yongtang/35752-verifyNetworking
Verify NetworkingConfig to make sure EndpointSettings is not nil
Upstream-commit: 914ce4fde798b41144ac931619f39a2c96eab261
Component: engine
2018-01-24 12:05:58 -08:00
13bb02e502 Merge pull request #398 from seemethere/bump_ver_18_03_dev
[master] bump version to 18.03.0-ce-dev
2018-01-24 11:39:43 -08:00
8f89082c26 bump version to 18.03.0-ce-dev
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-01-24 19:37:16 +00:00
0093346692 Merge pull request #831 from silvin-lubecki/fix-kubernetes-flags
Fix broken Kubernetes stack flags
Upstream-commit: f9039fe291
Component: cli
2018-01-24 10:45:45 -08:00
ef4aa7ebe5 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-01-24 18:36:44 +00:00
0851fa60de Merge component 'engine' from git@github.com:moby/moby master 2018-01-24 18:36:38 +00:00
4de8cf5f5e Golint fix with ro_layer.go
A small golint fix with ro_layer.go.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 19918b88b7b9fe6fc668847f31c94068c78ef2d1
Component: engine
2018-01-24 18:24:03 +00:00
a42cb7a60a Add Init API field documentation to swagger
Signed-off-by: Noah Meyerhans <nmeyerha@amazon.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 467ea71e5e2a0142c1456e3280d69a9538402fec
Component: engine
2018-01-24 09:46:12 -08:00
896e79bd00 bump libnetwork to 5ab4ab830062fe8a30a44b75b0bda6b1f4f166a4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e37374c0673bf56890e33afed112ad9e3a682203
Component: engine
2018-01-24 09:20:18 -08:00
4c8a9a1b98 Using Flags instead of PersistentFlags, as Kubernetes flags seem not to be defined in the "persistent space".
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 14fcadffb1
Component: cli
2018-01-24 09:17:08 -08:00
60e5b2e6f7 Merge pull request #36004 from cpuguy83/update_libnetwork
Update libnetwork commit
Upstream-commit: f909bf35906ae97c4729ced3e20645df1cc79166
Component: engine
2018-01-24 08:56:27 -08:00
4d4d834cb8 Merge pull request #83 from thaJeztah/bump-go-1.9.3
Update to go 1.9.3
Upstream-commit: 7ea33ac7993e2abfd2404e147d95a3b41a29ccbe
Component: packaging
2018-01-24 08:12:29 -08:00
62d42837f0 bump swarmkit to 713d79dc8799b33465c58ed120b870c52eb5eb4f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a6a51aadcb
Component: cli
2018-01-24 02:13:53 -08:00
6e37587f1a Update runc and image-spec
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8707bde082
Component: cli
2018-01-24 02:10:17 -08:00
dda53861be Bump go-winio to 0.4.6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2bf989e129
Component: cli
2018-01-24 02:04:09 -08:00
b5099bad79 Bump moby/moby to e11bf870a3170a1d2b1e177a0d7ccc66200bd643
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a3be7a6720
Component: cli
2018-01-24 02:01:24 -08:00
30c21da626 Update authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5db971324794b5de65447919dfe5f456d0730199
Component: engine
2018-01-24 00:55:47 -08:00
6fc26d75dd Update to go 1.9.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0e676c4bde1d429d21ea083a8bc9f40c0fc51269
Component: packaging
2018-01-24 00:20:18 -08:00
65d771b644 Merge pull request #36087 from thaJeztah/bump-go-1.9.3
Bump Go to 1.9.3
Upstream-commit: e11bf870a3170a1d2b1e177a0d7ccc66200bd643
Component: engine
2018-01-23 20:09:33 -05:00
f7ee7db603 Static Dev builds should include date and sha
Adds git date plus git commit sha to static builds if the version being
built for is a development version

Output is similar to: `docker-18.02.0-ce-dev-20180120.170357-fa4fb35.tgz`

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 8a86c3a6a54760b19cd67854bf68e408bd2a17fb
Component: packaging
2018-01-24 00:31:50 +00:00
3fe329a3ed Merge pull request #78 from kolyshkin/tasks-max
Uncomment TasksMax=unlimited for recent distros
Upstream-commit: 33325c8a2598c94bc5136a9fe7213e3ebe152dd7
Component: packaging
2018-01-23 16:05:04 -08:00
f46043cd6e Merge pull request #36056 from Microsoft/jjh/opengcsv0.3.5
Revendor Microsoft/opengcs @ v0.3.5
Upstream-commit: e60b68ad21ea47d02a125e7ab5a917331de22ea7
Component: engine
2018-01-23 18:12:02 -05:00
bb193d7289 Merge pull request #36097 from crosbymichael/runc-hang
Update runc to fix hang during start and exec
Upstream-commit: 1b9d1e80eb62e8e9b4bfc1588432314acb523bfc
Component: engine
2018-01-23 18:08:31 -05:00
91c8e6e25b Merge pull request #35966 from yongtang/33661-network-alias
Fix network alias issue with `network connect`
Upstream-commit: 70a0621f2558061b93ad24f04e9491bb5e0b8fdc
Component: engine
2018-01-23 14:56:28 -08:00
b1dfd77fa4 Set daemon root to use shared propagation
This change sets an explicit mount propagation for the daemon root.
This is useful for people who need to bind mount the docker daemon root
into a container.

Since bind mounting the daemon root should only ever happen with at
least `rlsave` propagation (to prevent the container from holding
references to mounts making it impossible for the daemon to clean up its
resources), we should make sure the user is actually able to this.

Most modern systems have shared root (`/`) propagation by default
already, however there are some cases where this may not be so
(e.g. potentially docker-in-docker scenarios, but also other cases).
So this just gives the daemon a little more control here and provides
a more uniform experience across different systems.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a510192b86e7eb1e1112f3f625d80687fdec6578
Component: engine
2018-01-23 14:17:08 -08:00
4798645bfb Update runc to fix hang during start and exec
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d10091c86e75fb78eaba96f433dc2cc06c0a54de
Component: engine
2018-01-23 15:02:31 -05:00
800ee6ea8f Merge pull request #36076 from yongtang/01202018-aws-vendor
Update aws-sdk-go and go-ini
Upstream-commit: 2cd52d074aba841d399bb98ee3a0880808ef4ef4
Component: engine
2018-01-23 11:37:55 -08:00
8dd7e2516b Fix issue where network inspect does not show Created time in swarm scope
This fix tries to address the issue raised in 36083 where
`network inspect` does not show Created time if the network is
created in swarm scope.

The issue was that Created was not converted from swarm api.
This fix addresses the issue.

An unit test has been added.

This fix fixes 36083.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 090c439fb8a863731cc80fcb9932ce5958d8166d
Component: engine
2018-01-23 18:26:51 +00:00
ae55d43f2e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-01-23 17:04:13 +00:00
6c6e8038c9 Merge component 'engine' from git@github.com:moby/moby master 2018-01-23 17:04:07 +00:00
ad2946faa1 Merge component 'cli' from git@github.com:docker/cli master 2018-01-23 16:41:06 +00:00
1530820600 deb/common/rules: fix uncommenting TasksMax
Since systemd version 228, a new setting, `TasksMax`, has appeared,
which limits the number of tasks used by a service (via pids cgroup
controller). Unfortunately, a default for this setting, `DefaultTaskMax`,
is set to 512. In systemd version 231 it is changed to 15% which
practically is 4195, as the value from /proc/sys/kernel/pid_max is
treated like 100%).

Either 512 or 4195 is severily limited value for Docker Engine,
as it can run thousands of containers with thousands of tasks in each,
and the number of tasks limit should be set on a per-container basis
by the Docker user. So, the most reasonable setting for `TasksMax`
is `unlimited`.

Unfortunately, older versions of systemd warn about unknown `TasksMax`
parameter in `docker.service` file, and the warning is rather annoying,
therefore this setting is commented out by default, and is supposed
to be uncommented by the user.

The problem with that is, once the limit is hit, all sorts of bad things
happen and it's not really clear even to an advanced user that this
setting is the source of issues.

Now, `rules` file already contain a hack to check for the systemd
version (during build time) and in case the version is greater than 227,
uncomment the `TasksMax=unlimited` line. Alas, it does not work
during normal builds, the reason being systemd is not installed
into build environments.

An obvious fix would be to add systemd to the list of installed
packages in all Dockerfiles used to build debs. Fortunately,
there is a simpler way, as libsystemd-dev is installed, and
it's a subpackage of systemd built from the same source and
carrying the same version, so it can also be checked.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d80738e4b4459816c64757a2a63e5d8058d0ccf4
Component: packaging
2018-01-22 21:31:09 -08:00
02b6af2e96 rpm/fedora-2x/spec: enable TasksMax in service file
Since systemd version 228, a new setting, `TasksMax`, has appeared, which
limits the number of tasks used by a service (via pids cgroup
controller). Unfortunately, a default for this setting, `DefaultTaskMax`,
is set to 512. In systemd version 231 it is changed to 15% which
practically is 4195, as the value from /proc/sys/kernel/pid_max is
treated like 100%).

Either 512 or 4195 is severily limited value for Docker Engine, as it
can run thousands of containers with thousands of tasks in each, and
the number of tasks limit should be set on a per-container basis by the
Docker user. So, the most reasonable setting for `TasksMax` is `unlimited`.

Unfortunately, older versions of systemd warn about unknown `TasksMax`
parameter in `docker.service` file, and the warning is rather annoying,
therefore this setting is commented out by default, and is supposed to
be uncommented by the user.

The problem with that is, once the limit is hit, all sorts of bad things
happen and it's not really clear even to an advanced user that this
setting is the source of issues.

As Fedora 25 ships systemd 231, it (and later Fedora releases) support
TasksMax, so it makes total sense to uncomment the setting, this is what
this commit does.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 9055832bb0725f05d518c3ebc9b7cc93a69420c7
Component: packaging
2018-01-22 21:31:09 -08:00
544ec9eef9 Merge pull request #36019 from thaJeztah/improve-config-reload
improve daemon config reload; log active configuration
Upstream-commit: 99cfb5f31ad82238573de3475bf5bb0435ac1ebc
Component: engine
2018-01-22 17:58:25 -08:00
d67508be5d Merge pull request #77 from sargun/master
Add pigz to recommended packages
Upstream-commit: a6543ceeff408dfa9cbb4e75d013bc05bda09c32
Component: packaging
2018-01-22 17:35:51 -08:00
dbb0b294c6 Merge pull request #81 from seemethere/add_dev_rpm
Add dev portion to RPM package version
Upstream-commit: 208ba254d788a0d7bfe4dde92b35b9f2f68aa1d6
Component: packaging
2018-01-22 17:35:16 -08:00
bb0dcf69f8 Add integration test for network connect with alias
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 50af4968911483b5a4e09c45a22f8e9153d81696
Component: engine
2018-01-23 01:04:39 +00:00
74da78f854 Fix network alias issue
This fix tries to address the issue raised in 33661 where
network alias does not work when connect to a network the second time.

This fix address the issue.

This fix fixes 33661.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d63a5a1ff593f14957f3e0a9678633e8237defc9
Component: engine
2018-01-23 01:04:33 +00:00
9b8e792488 added check for empty source in bind mount
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>

fixed error by removing punctuation

Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>

removed period

Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>

backtick string to escape double quotes in error messages

Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>

simplified test for bind no source error message

Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Upstream-commit: e76d8c9eae
Component: cli
2018-01-22 18:33:58 -06:00
2b99ce1d23 Merge pull request #816 from dnephin/binary-native
Add dockerfile for building on non-amd64 platforms
Upstream-commit: b6a628c295
Component: cli
2018-01-22 16:14:23 -08:00
9e00f0f8fa fix verbose for partial overlay ID
Signed-off-by: Dani Louca <dani.louca@docker.com>
Upstream-commit: 2e0990f1655d151b741e7f7f78ac55e14398339f
Component: engine
2018-01-22 18:50:49 -05:00
fe9a519a3b Annotate "stack" commands to be "swarm" and "kubernetes"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 93c36eb228
Component: cli
2018-01-22 15:44:47 -08:00
8c17001e4f Merge pull request #826 from dnephin/fix-lint-errors
Fix lint on master
Upstream-commit: f2529443a0
Component: cli
2018-01-22 15:16:38 -08:00
5cec7a6e2f Add dev portion to RPM package version
-dev was being removed, per legacy code, but we'd like to add it back
into the naming so that deb / rpm packages will look mostly the same
when compiled with a `-dev` version.

RPMS end up looking like:

docker-ce-18.02.0.ce-0.0.dev.git20180120.170357.0.fa4fb35.el7.centos.x86_64.rpm

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 65e2c3cf9ff8c3130e628a455e3d02921876cdfc
Component: packaging
2018-01-22 23:10:48 +00:00
bc95dc9fb3 Fix merge conflict
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ae03b006a6
Component: cli
2018-01-22 18:09:47 -05:00
50c6561a9e Merge pull request #35949 from yongtang/34248-carry
Carry #34248 Added tag log option to json-logger and use RawAttrs
Upstream-commit: ea74dbe907f534ba2f59c1173330987c3fa84208
Component: engine
2018-01-22 15:02:54 -08:00
928478219f Merge pull request #36013 from thaJeztah/improve-version-middleware-test
Improve API version-middleware test
Upstream-commit: fbed4eb8c72f56437f2a451f9cd9405814882e2a
Component: engine
2018-01-22 14:59:06 -08:00
e3d68b9fea Merge pull request #780 from thaJeztah/fix-network-add
Fix --network-add adding duplicate networks
Upstream-commit: fbb9de2cfc
Component: cli
2018-01-22 14:45:58 -08:00
e9f8cfe726 Bump Go to 1.9.3
release notes: https://golang.org/doc/devel/release.html#go1.9.minor

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3cc13511f0c8d7f3aeb382f0444e37592a8b5e69
Component: engine
2018-01-22 13:40:19 -08:00
739f4e49fc Merge pull request #79 from seemethere/remove_f25_aarch64
Removes fedora 25 aarch64 Dockerfile
Upstream-commit: 44a1f4887d9ac3b6cbb08ab779c9e84109b906ba
Component: packaging
2018-01-22 12:15:43 -08:00
40f1f3c105 Removes fedora 25 aarch64 Dockerfile
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 9f717788b588a48d494abe42d7c392bf8fe458d9
Component: packaging
2018-01-22 19:10:56 +00:00
a53f2c40a3 Verify NetworkingConfig to make sure EndpointSettings is not nil
This fix tries to address the issue raised in 35752
where container start will trigger a crash if EndpointSettings is nil.

This fix adds the validation to make sure EndpointSettings != nil

This fix fixes 35752.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8d2f4cb24129d87674a13319ca48ce8636ee527a
Component: engine
2018-01-22 16:31:10 +00:00
362cc9aedc Don't append new line for maximum sized events
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: d3e2d55a3d84d41c331151c9633211f0fb6a3096
Component: engine
2018-01-21 14:29:55 +13:00
36e0e57cbe Log active configuration when reloading
When succesfully reloading the daemon configuration, print a message
in the logs with the active configuration:

    INFO[2018-01-15T15:36:20.901688317Z] Got signal to reload configuration, reloading from: /etc/docker/daemon.json
    INFO[2018-01-14T02:23:48.782769942Z] Reloaded configuration: {"mtu":1500,"pidfile":"/var/run/docker.pid","data-root":"/var/lib/docker","exec-root":"/var/run/docker","group":"docker","deprecated-key-path":"/etc/docker/key.json","max-concurrent-downloads":3,"max-concurrent-uploads":5,"shutdown-timeout":15,"debug":true,"hosts":["unix:///var/run/docker.sock"],"log-level":"info","swarm-default-advertise-addr":"","metrics-addr":"","log-driver":"json-file","ip":"0.0.0.0","icc":true,"iptables":true,"ip-forward":true,"ip-masq":true,"userland-proxy":true,"disable-legacy-registry":true,"experimental":false,"network-control-plane-mtu":1500,"runtimes":{"runc":{"path":"docker-runc"}},"default-runtime":"runc","oom-score-adjust":-500,"default-shm-size":67108864,"default-ipc-mode":"shareable"}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8378dcf46d017c70df97d6f851e0196b113b422e
Component: engine
2018-01-21 00:56:02 +01:00
c2b247fce6 Move reload-related functions to reload.go
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6121a8429b9d3a6d20e900c521c2f50fff5db406
Component: engine
2018-01-21 00:55:49 +01:00
d093175f6e Merge pull request #696 from mlaventure/attach-use-containerwait
attach: Use ContainerWait instead of Inspect
Upstream-commit: 44a1168ae5
Component: cli
2018-01-20 23:55:16 +01:00
8adbcf25d6 Update aws-sdk-go and go-ini
This fix updates aws-sdk-go and go-ini to recent versions.
The aws-sdk-go used to be `v1.4.22` which was more than a
year old, and go-ini used to be pre-1.0 release.

This fix updates aws-sdk-go to v1.12.66 and go-ini to v1.25.4:
```
github.com/aws/aws-sdk-go v1.12.66
github.com/go-ini/ini v1.25.4
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 79bedc4f46e7fe5870f7d53f27f05d05d0821697
Component: engine
2018-01-20 19:58:25 +00:00
c9b8ded195 Merge pull request #35919 from yongtang/35333-carry
Carry #35333: Devicemapper: ignore Nodata errors when delete thin device
Upstream-commit: db5c006bc8654ab1e4c24a1a9f460bbe4039686e
Component: engine
2018-01-20 18:47:16 +01:00
fa4fb352fe Merge component 'engine' from git@github.com:moby/moby master 2018-01-20 17:03:57 +00:00
5d42f5ba8b Update API docs to show that /containers/{id}/kill returns HTTP 409
Signed-off-by: Stephan Spindler <shutefan@gmail.com>
Upstream-commit: 3a1bb49b41901dd21ab9489937656ab935a690e0
Component: engine
2018-01-20 17:21:49 +01:00
dbd159de4c Merge pull request #36065 from Microsoft/jjh/bumprs3andlcowsupported
Bump to RS3 final build, and remove LCOW_SUPPORTED
Upstream-commit: ef3f7d18da40cda7f33858b787161773d7656714
Component: engine
2018-01-20 19:53:30 +09:00
bde2b4704d Merge pull request #35830 from cpuguy83/unbindable_shm
Make container shm parent unbindable
Upstream-commit: c162e8eb417bbc124c1f89f676aea081ebb6251f
Component: engine
2018-01-19 17:43:30 -08:00
946a37c1e4 Merge pull request #35744 from ndeloof/35702
closes #35702 introduce « exec_die » event
Upstream-commit: f97256cbf1811740cfa9a72f705c8a70195cd468
Component: engine
2018-01-19 15:03:50 -08:00
2859d16079 Merge pull request #35986 from thaJeztah/bump-containerd-1.0.1-rc1
Bump containerd to 1.0.1 (9b55aab90508bd389d7654c4baf173a981477d55)
Upstream-commit: 47a0dcbcd20aa2924c89a38a16a60907506ae4f2
Component: engine
2018-01-19 15:48:36 -05:00
30c97f4539 Merge pull request #36003 from pradipd/upgrade_fix
Fixing ingress network when upgrading from 17.09 to 17.12.
Upstream-commit: 949ee0e5297408e97c9b5444d500a2cecab06609
Component: engine
2018-01-19 15:46:50 -05:00
5e6be7b1c2 Bump RS3 final build, and remove LCOW_SUPPORTED
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5b24976ad4046a9c071b75df31d9269ad2e84732
Component: engine
2018-01-19 12:22:56 -08:00
12ceea25e6 Merge pull request #36051 from Microsoft/jjh/remotefs-read-return-error
LCOW remotefs - return error in Read() implementation
Upstream-commit: 3c9d023af3428f49241a2e2385dae43151185466
Component: engine
2018-01-19 11:27:13 -08:00
621663ea5d Merge pull request #36061 from adampointer/36060-fix-name-clash
Alias container and network packages to stop name clashes 
Upstream-commit: 507b8be5b3c02d2b99393d5613a6a59071e13786
Component: engine
2018-01-19 09:53:06 -08:00
3cf8a0c442 Carry 34248 Added tag log option to json-logger and use RawAttrs
This fix carries PR 34248: Added tag log option to json-logger

This fix changes to use RawAttrs based on review feedback.

This fix fixes 19803, this fix closes 34248.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e77267c5a682e2c5aaa32469f2c83c2479d57566
Component: engine
2018-01-19 17:51:20 +00:00
9dd65d097b Added tag log option to json-logger
Fixes #19803
Updated the json-logger to utilize the common log option
'tag' that can define container/image information to include
as part of logging.

When the 'tag' log option is not included, there is no change
to the log content via the json-logger. When the 'tag' log option
is included, the tag will be parsed as a template and the result
will be stored within each log entry as the attribute 'tag'.

Update: Removing test added to integration_cli as those have been deprecated.
Update: Using proper test calls (require and assert) in jsonfilelog_test.go based on review.
Update: Added new unit test configs for logs with tag. Updated unit test error checking.
Update: Cleanup check in jsonlogbytes_test.go to match pending changes in PR #34946.
Update: Merging to correct conflicts from PR #34946.

Signed-off-by: bonczj <josh.bonczkowski@gmail.com>
Upstream-commit: 5f50f4f511cd84e79bf005817af346b1764df27f
Component: engine
2018-01-19 17:41:19 +00:00
3c3132fc24 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-01-19 17:04:04 +00:00
06609b9304 Merge component 'engine' from git@github.com:moby/moby master 2018-01-19 17:03:58 +00:00
c973e2ff26 Merge component 'cli' from git@github.com:docker/cli master 2018-01-19 16:41:06 +00:00
d00d4e32b9 Merge pull request #34859 from Microsoft/jjh/singleimagestore
LCOW: Coalesce daemon stores, allow dual LCOW and WCOW mode
Upstream-commit: bb6ce897378b4ebd0131fd835b01ad5f9af3ebb9
Component: engine
2018-01-19 11:38:30 -05:00
ed76e0e519 Alias container and network packages to stop name clashes
Signed-off-by: Adam Pointer <adam.pointer@gmx.com>
Upstream-commit: 7732ca94fc67a28cbd37c292dc29216255685eba
Component: engine
2018-01-19 10:26:41 +00:00
2cf544120b Revendor Microsoft/opengcs @ v0.3.5
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 042f53737cec84e2f1419e20fe37dd0eb1d5a9fa
Component: engine
2018-01-18 19:17:31 -08:00
fdf41db38c Update libnetwork commit
New Commit: fcf1c3b5e57833aaaa756ae3c4140ea54da00319

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d23e8a7da58c119a8dda59484e9b180c6f25daed
Component: engine
2018-01-18 20:59:40 -05:00
ebd586c561 LCOW remotefs - return error in Read() implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6112ad6e7d5d7f5afc698447da80f91bdbf62720
Component: engine
2018-01-18 17:46:58 -08:00
58e2db872f Add pigz to docker-ce spec files
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: cee72837c3dd20296d436c48e48f30c3e7b17e7c
Component: packaging
2018-01-19 00:22:00 +00:00
0b18a391f5 Add pigz to recommended packages
This change is in response to https://github.com/moby/moby/pull/35697
It adds pigz to the recommended binaries that should be installed with
docker-ce.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: 1ca014b9440a92b46e2e03d879c03ddc5c51d4c0
Component: packaging
2018-01-18 15:51:57 -08:00
46bc3ffbc5 Merge pull request #817 from vdemeester/make-manifest-cmd-experimental
Mark docker-manifest command as experimental (cli)
Upstream-commit: da86425e9f
Component: cli
2018-01-18 17:46:15 -05:00
ac28efa249 Mark docker-manifest command as experimental (cli)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2d29732f40
Component: cli
2018-01-18 13:19:33 -08:00
e94c45a5c9 Merge pull request #138 from clnperez/manifest-cmd
Add manifest command
Upstream-commit: 11dfa23a5d
Component: cli
2018-01-18 22:15:49 +01:00
3ca8db9a46 Remove OS() from layer interface
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c94d34f783944ff6586846ccd11e86925fcee171
Component: engine
2018-01-18 12:56:28 -08:00
676b242a5f Merge pull request #71 from ZeuAlex/rpm_build_aarch64
Aarch64 rpm support 
Upstream-commit: 4cc70e4be06cd19edfbcdab4619bc3c271a4a04c
Component: packaging
2018-01-18 12:55:53 -08:00
40b95b8e94 Address feedback from Tonis
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0cba7740d41369eee33b671f26276325580bc07b
Component: engine
2018-01-18 12:30:39 -08:00
942fd3c62c LCOW: Regular mount if only one layer
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 420dc4eeb48b155e6b83fccf62f8727ce4bf5b21
Component: engine
2018-01-18 12:01:58 -08:00
9e8b44781f Merge pull request #35965 from thaJeztah/fix-volume-create-statuscode
Return 400 status instead of 500 for empty volume create body
Upstream-commit: 39377bb96d459d2ef59bd2bad75468638a7f86a3
Component: engine
2018-01-18 20:02:33 +01:00
b4c44961cf Merge pull request #36030 from cpuguy83/quota_update
Ensure CPU quota/period updates are sent to runc
Upstream-commit: 0fa3962b8d8d78020c7e636c4bcea14d618929e1
Component: engine
2018-01-18 19:54:10 +01:00
3fa889eb3f Add dockerfile for building on non-amd64 platforms
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 02ca1c8573
Component: cli
2018-01-18 13:16:58 -05:00
86ca16658d Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-01-18 17:04:03 +00:00
3ee93da859 Merge component 'engine' from git@github.com:moby/moby master 2018-01-18 17:03:57 +00:00
dc08aa82a2 add manifest cmd cli doc
Signed-off-by: Christy Norman Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 6c6ce22447
Component: cli
2018-01-18 10:53:09 -06:00
a654d0d2d6 Merge component 'cli' from git@github.com:docker/cli master 2018-01-18 16:41:08 +00:00
852153685d LCOW: Refactor to multiple layer-stores based on feedback
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: afd305c4b5682fbc297e1685e2b7a49628b7c7f0
Component: engine
2018-01-18 08:31:05 -08:00
33860da10b LCOW: Re-coalesce stores
Signed-off-by: John Howard <jhoward@microsoft.com>

The re-coalesces the daemon stores which were split as part of the
original LCOW implementation.

This is part of the work discussed in https://github.com/moby/moby/issues/34617,
in particular see the document linked to in that issue.
Upstream-commit: ce8e529e182bde057cdfafded62c210b7293b8ba
Component: engine
2018-01-18 08:29:19 -08:00
ce1ad508f6 Merge pull request #35960 from abhi/service
Disable service on release network
Upstream-commit: 6feae060033544985e548dcf1b9127f8f634fe2b
Component: engine
2018-01-18 11:19:47 -05:00
9b47a9d16f Do not make graphdriver homes private mounts.
The idea behind making the graphdrivers private is to prevent leaking
mounts into other namespaces.
Unfortunately this is not really what happens.

There is one case where this does work, and that is when the namespace
was created before the daemon's namespace.
However with systemd each system servie winds up with it's own mount
namespace. This causes a race betwen daemon startup and other system
services as to if the mount is actually private.

This also means there is a negative impact when other system services
are started while the daemon is running.

Basically there are too many things that the daemon does not have
control over (nor should it) to be able to protect against these kinds
of leakages. One thing is certain, setting the graphdriver roots to
private disconnects the mount ns heirarchy preventing propagation of
unmounts... new mounts are of course not propagated either, but the
behavior is racey (or just bad in the case of restarting services)... so
it's better to just be able to keep mount propagation in tact.

It also does not protect situations like `-v
/var/lib/docker:/var/lib/docker` where all mounts are recursively bound
into the container anyway.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9803272f2db84df7955b16c0d847ad72cdc494d1
Component: engine
2018-01-18 09:34:00 -05:00
2096535fce Fixes for libcontainer changes
Libcontainer no longer provides placeholders for
unsupported platforms, which cause the Windows
builds to fail.

This patch moves features that are not supported
to platform-specific files.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d1c34831e930c1f6b3de28cab3f4a358845a79d5
Component: engine
2018-01-18 10:08:12 +01:00
8d6e00613b Bump runc to 7f24b40cc5423969b4554ef04ba0b00e2b4ba010
matching the version that's used by containerd 1.0.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f58aa31075bf74ab8d2369dafb591ae43ed36ee6
Component: engine
2018-01-18 10:07:50 +01:00
c6678dac69 Bump containerd to 1.0.1 (9b55aab90508bd389d7654c4baf173a981477d55)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9047f66b1edd4dffcafc34f9c7f3390ddd65d10b
Component: engine
2018-01-18 10:06:37 +01:00
2138e8ddb5 Merge pull request #73 from seemethere/remove_zesty
Remove Ubuntu Zesty
Upstream-commit: f8f8219caef8a92c6c87b92377d476af44d76b7c
Component: packaging
2018-01-17 15:12:34 -08:00
3e6e651fda Merge pull request #814 from dnephin/fix-builder-env-docs
Improve builder ENV docs
Upstream-commit: 4f550018bb
Component: cli
2018-01-17 23:26:42 +01:00
2b31b5d6e4 libnetwork vendor
Signed-off-by: abhi <abhi@docker.com>
Upstream-commit: dad093cc34497bb7912c769e469a3e79a0c2c63c
Component: engine
2018-01-17 14:20:04 -08:00
2012c45c5a Disable service on release network
This PR contains a fix for moby/moby#30321. There was a moby/moby#31142
PR intending to fix the issue by adding a delay between disabling the
service in the cluster and the shutdown of the tasks. However
disabling the service was not deleting the service info in the cluster.
Added a fix to delete service info from cluster and verified using siege
to ensure there is zero downtime on rolling update of a service.In order
to support it and ensure consitency of enabling and disable service knob
from the daemon, we need to ensure we disable service when we release
the network from the container. This helps in making the enable and
disable service less racy. The corresponding part of libnetwork fix is
part of docker/libnetwork#1824

Signed-off-by: abhi <abhi@docker.com>
Upstream-commit: a042e5a20a7801efc936daf7a639487bb37ca966
Component: engine
2018-01-17 14:19:51 -08:00
33df5a9f66 Update buidler ENV docs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 01b521c002
Component: cli
2018-01-17 16:55:07 -05:00
d782361adb Merge pull request #36043 from Microsoft/jjh/fixopenfilecall
LCOW: Fix OpenFile parameters
Upstream-commit: ef3988a81f5dca972b129df527f3e4f8bba200b8
Component: engine
2018-01-17 12:03:11 -08:00
28df99f4fa Merge pull request #35697 from sargun/use-pgzip
Make image (layer) downloads faster by using pigz
Upstream-commit: 871afbb304422877e683cbafc0ebd0b029b85379
Component: engine
2018-01-17 11:18:20 -08:00
0986b8a32c Fixing ingress network when upgrading from 17.09 to 17.12.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 2d7a50e5855ad0571e76d29cd1ab9f8f3a48433b
Component: engine
2018-01-17 17:11:18 +00:00
b602be47f6 Merge component 'engine' from git@github.com:moby/moby master 2018-01-17 17:04:48 +00:00
1c449fb090 Merge component 'cli' from git@github.com:docker/cli master 2018-01-17 16:41:12 +00:00
5a20e1240c LCOW: Fix OpenFile parameters
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 141b9a74716c016029badf16aca21dc96975aaac
Component: engine
2018-01-17 07:58:18 -08:00
0e51141e24 Merge pull request #35441 from cpuguy83/plugin_timeout
Add timeouts for volume plugin ops
Upstream-commit: f0b0f2038d085066f340f24f3a9a9683bd4aa35f
Component: engine
2018-01-17 14:49:41 +01:00
19e1833a23 Merge pull request #36033 from cpuguy83/improve_zfs_debug_message
Improve zfs init log message for zfs
Upstream-commit: 1338fcf58aafed25c0da4952793fec1c4055c894
Component: engine
2018-01-16 21:03:53 -08:00
eaa41c5725 Merge pull request #36036 from kolyshkin/plugins
daemon.cleanupMetricsPlugins(): fix
Upstream-commit: 991d64eeb3ee97078a03b88185bee177c6551896
Component: engine
2018-01-17 13:54:46 +09:00
dede819b22 Merge pull request #36034 from dnephin/update-gty
update gotestyourself vendor
Upstream-commit: d84b8802b9fab72c0b66520e54a26c605ddee00b
Component: engine
2018-01-16 19:42:54 -08:00
a5a13dc0e0 Merge pull request #36035 from kolyshkin/gometalinter
gometalinter: fix --deadline option
Upstream-commit: 5488cce5d2effca1e9ae82d8d73d667cf878fd14
Component: engine
2018-01-17 12:04:01 +09:00
4a656e30d0 Improve zfs init log message for zfs
Signed-off-by: Drew Hubl <drew.hubl@gmail.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 27b002f4a02e2d9f6eded9004b82cb81f121264f
Component: engine
2018-01-16 21:42:05 -05:00
7da3044682 Add timeouts for volume plugin ops
This protects the daemon from volume plugins that are slow or
deadlocked.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b15f8d2d4f054a87052a7065c50441f7e8479fa9
Component: engine
2018-01-16 20:30:49 -05:00
d8a82d08f1 daemon.cleanupMetricsPlugins(): fix
A linter (vet) found the following bug in the code:

> daemon/metrics.go:124::error: range variable p captured by func literal (vet)

Here a variable p is used in an async fashion by goroutine, and most
probably by the time of use it is set to the last element of a range.

For example, the following code

```go
	for _, c := range []string{"here ", "we ", "go"} {
		go func() {
			fmt.Print(c)
		}()
	}
```

will print `gogogo` rather than `here we go` as one would expect.

Fixes: 0e8e8f0f31 ("Add support for metrics plugins")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 9db2c62488734a44a4f1bb9a0252c520b787acfe
Component: engine
2018-01-16 15:15:11 -08:00
374fd77d92 update gotestyourself
pickup changes which use t.Helper()

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4ac4b690f78a645cc50030b81077fd5319b53501
Component: engine
2018-01-16 17:43:47 -05:00
cd6c81a6fb gometalinter: fix --deadline option
1. Add = between the option and the argument, otherwise the argument
   appears to be passed on to the linters directly, as in:

> DEBUG: [golint.8]: executing /home/kir/go/bin/golint
> -min_confidence 0.800000 ./10m ./api ./api/errdefs <...>

2. Fix setting the default for GOMETALINTER_OPTS -- the default
   was -deadline (rather than --deadline).

Fixes: b96093fa56a9 ("gometalinter: add per-platform configurable options")

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c11508a5f405084da13c35ee7ab62f1670e4da39
Component: engine
2018-01-16 14:37:11 -08:00
837b878f9d Merge pull request #581 from thaJeztah/better-port-range-printing
Improve presentation of published port ranges
Upstream-commit: fab4762941
Component: cli
2018-01-16 17:16:45 -05:00
01a3b0d1ac Merge pull request #812 from thaJeztah/fix-builder-quote
Fix stray quote in builder.md
Upstream-commit: 44094b5219
Component: cli
2018-01-16 23:15:18 +01:00
42cf4bc867 Fix stray quote in builder.md
Signed-off-by: Taylor Brown <taylorb@microsoft.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 90cfa01889
Component: cli
2018-01-16 22:51:57 +01:00
c2691aeef9 Set git sha from parameter
Because we merge master into the branch before running tests, so the
actual git sha does not exist on any git remote.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b2faf24925ea0f820db62e1f3d96ee347972f12a
Component: engine
2018-01-16 16:50:57 -05:00
f088309662 Add code coverage report and codecov config
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e5cce50c7ea727c1c901b6e1443bd4291d62fce3
Component: engine
2018-01-16 16:50:56 -05:00
a19065e951 Make container resource mounts unbindable
It's a common scenario for admins and/or monitoring applications to
mount in the daemon root dir into a container. When doing so all mounts
get coppied into the container, often with private references.
This can prevent removal of a container due to the various mounts that
must be configured before a container is started (for example, for
shared /dev/shm, or secrets) being leaked into another namespace,
usually with private references.

This is particularly problematic on older kernels (e.g. RHEL < 7.4)
where a mount may be active in another namespace and attempting to
remove a mountpoint which is active in another namespace fails.

This change moves all container resource mounts into a common directory
so that the directory can be made unbindable.
What this does is prevents sub-mounts of this new directory from leaking
into other namespaces when mounted with `rbind`... which is how all
binds are handled for containers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: eaa5192856c1ad09614318e88030554b96bb6e81
Component: engine
2018-01-16 15:09:05 -05:00
35c47edb0e Merge pull request #808 from ethan-haynes/698-tmpfs-mode-compose
added support for tmpfs-mode in compose file
Upstream-commit: 14c62f655a
Component: cli
2018-01-16 20:59:17 +01:00
1c29e89e9b Return 400 status instead of 500 for empty volume create body
The `POST /volumes/create` expects a request body to be provided.
If no body was provided, a 500 status was returned. A 500 status
is incorrect, because the request is invalid (it's not a server
error).

Before this change:

    $ curl --unix-socket /var/run/docker.sock -v -X POST http://localhost/volumes/create

    *   Trying /var/run/docker.sock...
    * Connected to localhost (/Users/sebastiaan/Library/Containers/com.dock) port 80 (#0)
    > POST /volumes/create HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.51.0
    > Accept: */*
    >
    < HTTP/1.1 500 Internal Server Error
    < Api-Version: 1.30
    < Content-Length: 18
    < Content-Type: application/json
    < Date: Wed, 19 Jul 2017 11:29:26 GMT
    < Docker-Experimental: true
    < Ostype: linux
    < Server: Docker/17.06.0-ce (linux)
    <
    {"message":"EOF"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

After this change:

    $ curl --unix-socket /var/run/docker.sock -v -X POST http://localhost/volumes/create

    *   Trying /var/run/docker.sock...
    * Connected to localhost (/var/run/docker.sock) port 80 (#0)
    > POST /volumes/create HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 400 Bad Request
    < Api-Version: 1.36
    < Content-Type: application/json
    < Docker-Experimental: false
    < Ostype: linux
    < Server: Docker/dev (linux)
    < Date: Tue, 09 Jan 2018 15:00:13 GMT
    < Content-Length: 42
    <
    {"message":"no body provided in request"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5ad1e4be6bd2fd1033bc2adb5be2fe821787b59c
Component: engine
2018-01-16 20:42:44 +01:00
fd6c5edde8 Merge pull request #755 from kolyshkin/wait
Show container wait error
Upstream-commit: 1620538c49
Component: cli
2018-01-16 14:40:36 -05:00
dec893af4f Add more russian scientists in names-generator.go
Signed-off-by: ASM <cpp.create@gmail.com>
Upstream-commit: e0c3fe7836af1b1648fd61b59bd28691f88cc70b
Component: engine
2018-01-16 21:09:17 +02:00
e9c2f9fe77 Make image (layer) downloads faster by using pigz
The Golang built-in gzip library is serialized, and fairly slow
at decompressing. It also only decompresses on demand, versus
pipelining decompression.

This change switches to using the pigz external command
for gzip decompression, as opposed to using the built-in
golang one. This code is not vendored, but will be used
if it autodetected as part of the OS.

This also switches to using context, versus a manually
managed channel to manage cancellations, and synchronization.
There is a little bit of weirdness around manually having
to cancel in the error cases.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: fd35494a251a497c359f706f61f33e689e2af678
Component: engine
2018-01-16 10:49:18 -08:00
fcc2e6e315 container.waitExitOrRemoved(): add a test case
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 85ddaee5af
Component: cli
2018-01-16 10:16:28 -08:00
2c0a4f1b1f Merge component 'engine' from git@github.com:moby/moby master 2018-01-16 17:04:06 +00:00
96cd62f939 added support for tmpfs-mode in compose file
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Upstream-commit: cd69d082ea
Component: cli
2018-01-16 10:52:26 -06:00
6480a738eb adding tmpfs field to the compose 3.6v file spec and updating binary
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Upstream-commit: b15362ce32
Component: cli
2018-01-16 10:50:40 -06:00
fe856d6a3e Ensure CPU quota/period updates are sent to runc
Fixes an issue where if cpu quota/period is sent via the update API, the
values are updated in the stored container data but not actually sent to
the running container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 86ba63db82e87c943c9dee52559118e46f23defc
Component: engine
2018-01-16 11:50:14 -05:00
596eb2d73f adding config_schema_v3.6.json and updating binary
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Upstream-commit: 2b8cc52409
Component: cli
2018-01-16 10:44:08 -06:00
2d002babe5 Merge component 'cli' from git@github.com:docker/cli master 2018-01-16 16:41:10 +00:00
9ec0657065 Merge pull request #810 from akimd/rmi-eol
Remove: add missing eol when --force is passed
Upstream-commit: 3a69e5d265
Component: cli
2018-01-16 10:29:46 +01:00
a9d5589889 Merge pull request #36021 from yongtang/30897-follow-up
Rename FindUniqueNetwork to FindNetwork
Upstream-commit: be146652108f7145e902c275807f9ef71464b031
Component: engine
2018-01-16 09:38:16 +01:00
c4ee004968 Remove: add missing eol when --force is passed
Signed-off-by: Akim Demaille <akim.demaille@docker.com>
Upstream-commit: f83aa7b705
Component: cli
2018-01-16 09:29:53 +01:00
45b9f9df5c Merge pull request #35983 from yongtang/35980-Dockerfile.simple
Add required pkg-config for Dockerfile.simple
Upstream-commit: 3c7990fb63c546e0d0443e4c74a1ee15b16d005c
Component: engine
2018-01-16 02:41:36 +01:00
04ddd90677 Merge pull request #36025 from yongtang/01152018-golint
Fix golint error
Upstream-commit: 410e95d368cc03363472691bb2b228d3bd5c155a
Component: engine
2018-01-16 02:05:42 +01:00
69f6e83862 Fix golint error
PR #36011 fixed almost all of the golint issues though
there is still one golint error:
https://goreportcard.com/report/github.com/docker/docker#golint
```
Golint is a linter for Go source code.
docker/daemon/reload.go
Line 64: warning: redundant if ...; err != nil check, just return error instead. (golint)
```

This fix fixes the last one.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e02a3d9f5ba3bd9fa7f21596a6ee784bb58053f9
Component: engine
2018-01-15 21:35:30 +00:00
2802ca3c0e Merge pull request #36018 from thaJeztah/remove-deprecated-testenv-functions
Remove deprecated integration-cli/environment functions
Upstream-commit: 8c31aacebff68fe73f4203f86c5681a0fce648f1
Component: engine
2018-01-15 13:24:52 -08:00
d7084e8097 Merge pull request #35638 from cpuguy83/error_helpers2
Add helpers to create errdef errors
Upstream-commit: c36274da8326c59aaa12c48196671b41dcb89e5b
Component: engine
2018-01-15 10:56:46 -08:00
72b954bd11 Rename FindUniqueNetwork to FindNetwork
This fix is a follow up to 30397, with `FindUniqueNetwork`
changed to `FindNetwork` based on the review feedback.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ccc2ed01894a1950eaf47db2ad0860ad87cd78d1
Component: engine
2018-01-15 17:34:40 +00:00
3c68801e6a Merge component 'engine' from git@github.com:moby/moby master 2018-01-15 17:03:57 +00:00
de86612508 Merge pull request #36011 from thaJeztah/golint-fixes
Golint and Ineffassign  fixes
Upstream-commit: a44274f1c033004f0aaaa225aa98c58c018623f6
Component: engine
2018-01-15 08:59:58 -08:00
d1c8c580ed Remove deprecated environment.DaemonPlatform()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 18a771a761654e241ae8d1e85aa0c0a6164c5d27
Component: engine
2018-01-15 15:32:06 +01:00
28a714b165 Remove deprecated environment.MinimalBaseImage()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dfedc9ef6214500526c29fbf9a46aca9cecbeb57
Component: engine
2018-01-15 15:31:02 +01:00
d0afa0d404 Remove deprecated environment.ExperimentalDaemon()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: da8032d7d351a2073f54ec0121a796800b6b1a46
Component: engine
2018-01-15 15:30:05 +01:00
de027de052 Remove deprecated environment.DockerBasePath()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 142b1f8bfb3a1459660a5877b48f2bd7d17ba5d6
Component: engine
2018-01-15 15:29:26 +01:00
1240c39efc Golint: don't use basic untyped string for context key
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dfac74a9e48d1562ec41bc6de194f6593f0e639b
Component: engine
2018-01-15 12:49:14 +01:00
e0f1df2210 Merge pull request #35929 from arm64b/busybox-ls-compatible
Upgrade the frozen images to multi-arch ones
Upstream-commit: 947eb283dc86b67ea487ed3b7c02ede7b1fbbafd
Component: engine
2018-01-15 12:28:13 +01:00
03f0380721 Merge pull request #36009 from ripcurld0/small_nitpick
Small nitpick: create ErrVolumeTargetIsRoot in the volume package
Upstream-commit: fb13aeef0fc9bf8762643a0682df278544e4c933
Component: engine
2018-01-15 12:19:23 +01:00
02da0b9277 Improve API version-middleware test
Some improvements to the test;

- Combine tests to reduce duplicated code
- Add test-cases for empty version in request using the default version
- Add test for valid versions in request actually setting the version

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 63906d8fae8164c8ef00e1edc957a90b22908bcf
Component: engine
2018-01-15 11:50:30 +01:00
621388138c Golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4a63139696aea2c73ec361a9af8b36a118f0423
Component: engine
2018-01-15 00:42:25 +01:00
3b2e22c98e Small nitpick: create ErrVolumeTargetIsRoot in the volume package
Both lcow_parser.go and linux_parser.go are duplicating the error:
"invalid specification: destination can't be '/'"

This commit creates a new error called "ErrVolumeTargetIsRoot"
that is used by both linux_parser and lcow_parser and remove
the duplication in the code.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 62143af5437a29d4b95f971d1905cfef763b0847
Component: engine
2018-01-14 11:41:39 +00:00
4ab8a85d30 Merge component 'engine' from git@github.com:moby/moby master 2018-01-13 17:03:55 +00:00
f9646377ed Merge component 'cli' from git@github.com:docker/cli master 2018-01-13 16:41:07 +00:00
6303353f60 Merge pull request #807 from thaJeztah/golint-fixes
golint: remove redundant ifs
Upstream-commit: 1694921047
Component: cli
2018-01-13 14:55:14 +01:00
2c5689d728 ineffassign: fix unused variables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 63a0e88e8a61b5c0d5f698d5baf37f568ee01d50
Component: engine
2018-01-13 13:35:10 +01:00
4db79d6583 golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d845b4d36a
Component: cli
2018-01-13 13:16:34 +01:00
c3d475f697 Merge pull request #36000 from emil2k/fix-container-log-err
Wrap response error for container logs method.
Upstream-commit: 6415f1dcf5c79da853c604733c56b43ae3d18ced
Component: engine
2018-01-13 03:16:38 +01:00
2c7eb8f0d8 Merge pull request #35998 from arm64b/fix-timeout-multi-services
Fix timeout issue of  multi-services creation on AArch64
Upstream-commit: 86cb53e80060f6028e7847daef5b790fa7b9995f
Component: engine
2018-01-13 03:14:31 +01:00
e19dd094e6 Merge pull request #36001 from tophj-ibm/frozen-z-ci
[ci] use alternate sh comparison
Upstream-commit: bc183a0062c1283cfc47f42ec78501868629dd2b
Component: engine
2018-01-13 01:00:21 +01:00
298483e61f Merge component 'engine' from git@github.com:moby/moby master 2018-01-12 17:04:42 +00:00
e1c32a9951 Merge component 'cli' from git@github.com:docker/cli master 2018-01-12 16:41:09 +00:00
837919cf56 [ci] use alternate bash comparison
The pattern `echo str | grep -qE pattern` likes to fail on the z CI here for
an unknown reason. Use `grep -qE pattern <<< str` instead.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 24da8a0ed415c019179ca2c4f7496cbdffb7e4d0
Component: engine
2018-01-12 11:05:20 -05:00
4f33349d30 Wrap response error for container logs method.
Signed-off-by: Emil Davtyan <emil2k@gmail.com>
Upstream-commit: 2d6fb87ca41c52b255e874be62f2a3c2181a7639
Component: engine
2018-01-12 16:43:51 +01:00
d6831a1fa6 Fix timeout issue of multi-services cration on AArch64
Now we only adjust the timeout value for `arm` while not `arm64`,
actually the avarage duration for this test is about 25s to crate
multiple services on arm64, else the integration test will terminate
with below error:

> --- FAIL: TestCreateServiceMultipleTimes (24.11s)
>         daemon.go:285: [ddc3c7c1476c2] waiting for daemon to start
>         daemon.go:317: [ddc3c7c1476c2] daemon started
>         poll.go:121: timeout hit after 10s: task count at 4 waiting for 0
>         daemon.go:275: [ddc3c7c1476c2] exiting daemon
>         clean.go:108: Removing image sha256:e6a8d12d58602a19277ee5632b7ff9fa56a4ea52ba00eedf1d3f6f5a495fe761
>         clean.go:108: Removing image sha256:876244cc2ecb8fe1b0b2e817e3b78709a2a735edb093bc6849f99aa6c18f3a01

This PR adjusts the timeout value for both `arm64` and `arm` to mitigate
this issue on those 2 platforms.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 4542016cbe985d2af60c25f6a5b24df50bb50aba
Component: engine
2018-01-12 11:52:35 +00:00
2539b89332 Merge pull request #803 from thaJeztah/remove-orchestrator-aliases
Remove aliases for orchestrator
Upstream-commit: b7b3e9a261
Component: cli
2018-01-12 08:59:52 +01:00
d4d0b5c268 Move api/errdefs to errdefs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d453fe35b9b8b52d0677fe0c3cc8373f2f5d30d0
Component: engine
2018-01-11 21:21:43 -05:00
952c29f8da Add helpers to create errdef errors
Instead of having to create a bunch of custom error types that are doing
nothing but wrapping another error in sub-packages, use a common helper
to create errors of the requested type.

e.g. instead of re-implementing this over and over:

```go
type notFoundError struct {
  cause error
}

func(e notFoundError) Error() string {
  return e.cause.Error()
}

func(e notFoundError) NotFound() {}

func(e notFoundError) Cause() error {
  return e.cause
}
```

Packages can instead just do:

```
  errdefs.NotFound(err)
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 87a12421a94faac294079bebc97c8abb4180dde5
Component: engine
2018-01-11 21:21:43 -05:00
a3765ce30c Optimizations for recurrsive unmount
When a recursive unmount fails, don't bother parsing the mount table to check
if what we expected to be a mountpoint is still mounted. `EINVAL` is
returned when you try to unmount something that is not a mountpoint, the
other cases of `EINVAL` would not apply here unless everything is just
wrong. Parsing the mount table over and over is relatively expensive,
especially in the code path that it's in.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: dd2108766017c13a19bdbfd1a56cd1358580e0bb
Component: engine
2018-01-11 16:13:16 -05:00
5127f79a88 Remove aliases for orchestrator
Prefer "strict" values for orchestrator, as it's
easier to add aliases (if we think it's needed) than
to remove them later.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a812995f98
Component: cli
2018-01-11 21:16:37 +01:00
15165b99b6 Add required pkg-config for Dockerfile.simple
This fix tries to address the issue raised in 35980 where
pkg-config was missing and was causing Dockerfile.simple build
to fail.

```
$ docker build -t docker:simple -f Dockerfile.simple .
..........
CGO_ENABLED=1 go build  -tags "seccomp apparmor selinux netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit="b2567b37d7b75eb4cf325b77297b140ea686ce8f" -X main.version=1.0.0-rc4+dev " -o runc .
pkg-config: exec: "pkg-config": executable file not found in $PATH
make: *** [static] Error 2
Makefile:42: recipe for target 'static' failed
The command '/bin/sh -c /tmp/install-binaries.sh runc containerd tini proxy dockercli' returned a non-zero code: 2
```

This fix fixes 35980.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a018046ad0462c78601863784d3b882e77a7281b
Component: engine
2018-01-11 20:12:16 +00:00
4bf05acc16 Merge pull request #35982 from cpuguy83/fix_concurrent_daemon_test_issues
Fix race with concurrent daemon startup in tests
Upstream-commit: 92309e34e42aec3a0e041403bdd3c4fc0dc20269
Component: engine
2018-01-11 14:26:35 -05:00
cfd3975d5f Merge pull request #802 from thaJeztah/fix-yaml-generation
Fix docs YAML generation setting "kubernetes" for "swarm"
Upstream-commit: 41368a84bb
Component: cli
2018-01-11 19:56:36 +01:00
3e7d4bee2e Fix docs YAML generation setting "kubernetes" for "swarm"
Due to a copy/paste error, commands annotated with "swarm"
were incorrectly setting the "kubernetes" property.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6be06a3db2
Component: cli
2018-01-11 18:30:50 +01:00
59912e9e1d Merge component 'engine' from git@github.com:moby/moby master 2018-01-11 17:06:24 +00:00
8bf6743e94 Fix race with concurrent daemon startup in tests
Using parallel tests is nice, however it can cause an issue with
multiple daemons trying to make changes to iptables at the same time
which causes flakey tests.

This just disables iptables for the set of tests since it is not
required.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9e3193810da91d81f6b2dba3171443557f756794
Component: engine
2018-01-11 11:47:21 -05:00
10c2915921 Wrap response errors for container copy methods.
This allows IsErrNotFound and IsErrNotImplemented to work as intended.

Signed-off-by: Emil Davtyan <emil2k@gmail.com>
Upstream-commit: 44369bdd6507006108f39b85b5950f933bf1380a
Component: engine
2018-01-11 13:40:49 +01:00
a64e387daf Merge pull request #35976 from thaJeztah/bump-libnetwork2
Bump libnetwork to a1dfea384b39779552a3b4837ea9303194950976
Upstream-commit: cc79c6c7dab994c72133c782a24c69b5ad0f8993
Component: engine
2018-01-10 22:56:00 -08:00
54836718fd busybox: use '-v' option for 'cat'
Use `cat -v` command instead of `catv` for the latest version of
busybox(V1.28.0) with multi-arch

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: ec6659a1216fbfe3fead759b0220501847d12e28
Component: engine
2018-01-11 06:35:17 +00:00
9251d7a17a busybox: Fix ls compatible issue
BusyBox v1.26.2 (2017-03-09 00:04:38 UTC) supports `-le` option
to get the full date and time information, while BusyBox v1.27.2
(2017-11-01 23:22:25 UTC, which is used by the official multi-arch
image, uses `--full-time` instead of `-e` to get the same data. As
a result, we will get below error for the `DockerSuite.TestBuildLastModified`
test case in case of multi-arch image used:

> docker_cli_build_test.go:446:
>     out2 = cli.DockerCmd(c, "run", name, "ls", "-le", "/file").Combined()
>   o/src/github.com/docker/docker/vendor/github.com/gotestyourself/gotestyourself/icmd/command.go:61:
>     t.Fatalf("at %s:%d - %s\n", filepath.Base(file), line, err.Error())
> ... Error: at cli.go:33 -
> Command:  /usr/local/bin/docker run testbuildlastmodified ls -le /file
> ExitCode: 1
> Error:    exit status 1
> Stdout:
> Stderr:   ls: invalid option -- e
> BusyBox v1.27.2 (2017-11-01 23:22:25 UTC) multi-call binary.

This PR tries to fix the above compatible issue for busybox image.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: f88c2c04ef4dbae20eaddeaf69e605878f498041
Component: engine
2018-01-11 06:34:54 +00:00
5c2e02eb8f Removal of TEST_IMAGE_NAMESPACE
We don't need the test image namespace anymore since we've already
upgrade those images to the latest multi-arch ones.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 662bdb4a5638e56d78e66bb2cb5d7a4a751135c9
Component: engine
2018-01-11 05:16:09 +00:00
c6bfcea4c8 Upgrade the frozen images to multi-arch
Upgrade the frozen images to the multi-arch ones.

Since issue #35963 is not fixed yet on linux/amd64, so we keep the busybox
image on amd64 untouched.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: eaae7750efbc80314c5e028c4d43d3cd9e104edd
Component: engine
2018-01-11 05:14:09 +00:00
932ef79d5b Add test case for before and since filter for docker ps
This fix adds an integration test for `before` and `since` filter for `docker ps`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 52b44b98161872f704f7e3eea16e0f3177ca4e42
Component: engine
2018-01-10 17:42:43 +00:00
f408947b41 Bump libnetwork to a1dfea384b39779552a3b4837ea9303194950976
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4c3afb53e633a832871cada30890e3497fceff02
Component: engine
2018-01-10 18:09:05 +01:00
eae3cf0a12 Merge component 'engine' from git@github.com:moby/moby master 2018-01-10 17:07:15 +00:00
a9d3d30077 Merge component 'cli' from git@github.com:docker/cli master 2018-01-10 16:41:31 +00:00
1682b7c735 Merge pull request #35902 from dnephin/cleanup-graphdriver-quota-tests
Skip graphdriver/quota TestBlockDev if dependencies are not available
Upstream-commit: 88b94d7849c2ec3ab61b179c8bfdeb28507cf451
Component: engine
2018-01-10 05:32:16 -08:00
dc5184e050 Merge pull request #30897 from yongtang/30242-network-duplicate-names
Update `FindNetwork` to address network name duplications
Upstream-commit: 484612f388cabf4b6f4df915f2bf268a8ffdd9fc
Component: engine
2018-01-10 05:30:58 -08:00
b1b02a3b31 Merge pull request #35968 from Microsoft/jjh/go-winio-0.4.6
Revendor Microsoft/go-winio @ v0.4.6
Upstream-commit: 062b4c8013a50afd4c96f4964f0d759c00f000ea
Component: engine
2018-01-10 05:23:50 -08:00
bf3f938c50 Merge pull request #35940 from yongtang/35920-filter-health-starting
Fix issue of filter in `docker ps` where `health=starting` returns nothing
Upstream-commit: 7c7a7c7944a28e16aed4d2a0f2d590541f1c5687
Component: engine
2018-01-10 14:12:47 +01:00
77c9b11634 Merge pull request #35970 from RenaudWasTaken/cli-fix
Fix node-generic-resources CLI typo
Upstream-commit: 178d0278296c9a0778755f0804ced34756ee4fc7
Component: engine
2018-01-10 12:49:00 +01:00
6252dbd48d Merge pull request #35969 from Microsoft/jjh/typo-would
Fix typo 'woudld' to 'would'
Upstream-commit: 7f81894df299fbedee2fe891276ba60ccca897a4
Component: engine
2018-01-09 22:40:30 -05:00
c31e485134 Fix node-generic-resources CLI typo
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
Upstream-commit: 6702ac590e6148cb3f606388dde93a011cb14931
Component: engine
2018-01-10 00:51:47 +01:00
6b1b00bfce Fix typo 'woudld' to 'would'
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d92acd59108565ac2e552e9f04e873decd192e6d
Component: engine
2018-01-09 14:25:33 -08:00
6611bbb002 Revendor Microsoft/go-winio @ v0.4.6
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2956ef1db218f228e6bba5ca8c875aa692092b3d
Component: engine
2018-01-09 13:41:16 -08:00
2f79038e74 Merge pull request #35748 from dnephin/try-new-containerd-cio
Update vendor of containerd, use new containerd/cio
Upstream-commit: 274538c70bfb537430b8543646bc9de36c4d879c
Component: engine
2018-01-09 15:56:05 -05:00
6094444b27 Merge pull request #793 from thaJeztah/bump-version-to-v18.02-dev
Bump version to v18.02.0-dev
Upstream-commit: 4c7749e523
Component: cli
2018-01-09 20:44:53 +01:00
6979911095 Fix --network-add adding duplicate networks
When adding a network using `docker service update --network-add`,
the new network was added by _name_.

Existing entries in a service spec are listed by network ID, which
resulted in the CLI not detecting duplicate entries for the same
network.

This patch changes the behavior to always use the network-ID,
so that duplicate entries are correctly caught.

Before this change;

    $ docker network create -d overlay foo
    $ docker service create --name=test --network=foo nginx:alpine
    $ docker service update --network-add foo test
    $ docker service inspect --format '{{ json .Spec.TaskTemplate.Networks}}' test
    [
      {
        "Target": "9ot0ieagg5xv1gxd85m7y33eq"
      },
      {
        "Target": "9ot0ieagg5xv1gxd85m7y33eq"
      }
    ]

After this change:

    $ docker network create -d overlay foo
    $ docker service create --name=test --network=foo nginx:alpine
    $ docker service update --network-add foo test
    service is already attached to network foo

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e6ebaf55dd
Component: cli
2018-01-09 20:42:09 +01:00
940cce76d9 Merge component 'engine' from git@github.com:moby/moby master 2018-01-09 17:07:27 +00:00
6f88b66c36 Fix libcontainerd/client.Restore() handling of io cleanup
Make the behvious of cleaning up DirectIO more obvious

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9d20d5eb3fd744088e700292b15d56de29a3361d
Component: engine
2018-01-09 12:03:02 -05:00
cf94b87820 Use cio.FIFOSet.Close() to cleanup fifos
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d72dfbfa8db9a99be34c2d7963717a08ab7358c5
Component: engine
2018-01-09 12:00:28 -05:00
097704d16a Remove libcontainerd.IOPipe
replaced with cio.DirectIO

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3fec7c0858a0a3dee5423e6bffc3a3a1b238c30f
Component: engine
2018-01-09 12:00:28 -05:00
9cffb84b7c Update vendor
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f5c47aae4105840a16047b7bca424319a7db709
Component: engine
2018-01-09 12:00:27 -05:00
2e2fe70626 Bump version to v18.02.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1350a08b4f
Component: cli
2018-01-09 10:30:59 +01:00
bcd054dac5 Merge pull request #35957 from crosbymichael/ramdisk
Honor DOCKER_RAMDISK with containerd 1.0
Upstream-commit: 94b8a116fbf1cd90e68d8f5361b520d326a66f9b
Component: engine
2018-01-08 17:38:17 -08:00
207f11f4b6 Merge pull request #35959 from dnephin/remove-str-error-checking
Use errdefs instead of string contains for checking not found
Upstream-commit: 7f6fdce901d51e2692f7d5229d7ba8b4bad6c6a9
Component: engine
2018-01-08 20:33:51 -05:00
ec52ac3e88 Merge pull request #35958 from yongtang/35956-doc-CopyFromContainer
Update doc for CopyFromContainer
Upstream-commit: b4c7017f8d95ab42b1f9aa40260966df2c121cd5
Component: engine
2018-01-08 15:22:40 -08:00
790deda568 Merge pull request #386 from seemethere/bump_ver_18_02_dev
[master] bump VERSION to 18.02.0-ce-dev
2018-01-08 14:15:00 -08:00
adaa8a0f77 bump VERSION to 18.02.0-ce-dev
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-01-08 21:32:48 +00:00
88fc146546 Use errdefs instead of string contains for checking not found
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9b62d4ffa39f7c042f94f9a3670cae2a816535da
Component: engine
2018-01-08 14:32:39 -05:00
58f87a5e9a Cleanup graphdriver/quota test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e3a6323419c8b2a81a21134ed49a1624eb483c81
Component: engine
2018-01-08 13:41:45 -05:00
844b65b181 Update doc for CopyFromContainer
This fix updates doc for CopyFromContainer to explicitly
mention that the content received from the reader is
a TAR archive.

This fix closes 35965.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e330e7a5ce77736c76c36ba77983accfae01c405
Component: engine
2018-01-08 18:29:59 +00:00
7a08117e1e manifest tests
create, annotate, & push

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: db6d87216d
Component: cli
2018-01-08 11:12:57 -06:00
785a293997 Merge component 'engine' from git@github.com:moby/moby master 2018-01-08 17:06:08 +00:00
1f027b4d1b Honor DOCKER_RAMDISK with containerd 1.0
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 54051e9e64185e442e034c7e49a5707459a9eed2
Component: engine
2018-01-08 12:01:03 -05:00
d25231dbba add manifest command
Enable inspection (aka "shallow pull") of images' manifest info, and
also the creation of manifest lists (aka "fat manifests").

The workflow for creating a manifest list will be:

`docker manifest create new-list-ref-name image-ref [image-ref...]`
`docker manifest annotate new-list-ref-name image-ref --os linux --arch
arm`
`docker manifest push new-list-ref-name`

The annotate step is optional. Most architectures are fine by default.

There is also a `manifest inspect` command to allow for a "shallow pull"
of an image's manifest: `docker manifest inspect
manifest-or-manifest_list`.

To be more in line with the existing external manifest tool, there is
also a `-v` option for inspect that will show information depending on
what the reference maps to (list or single manifest).

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 02719bdbb5
Component: cli
2018-01-08 10:43:56 -06:00
4cf72cbba1 Merge component 'cli' from git@github.com:docker/cli master 2018-01-08 16:41:25 +00:00
f81efe6736 vendor updates for manifest cmd
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 17886d7547
Component: cli
2018-01-08 10:40:55 -06:00
476b1d747b Merge pull request #792 from thaJeztah/fix-builder-typo
Fix repeated "for" in docs/reference/builder.md
Upstream-commit: 16cccc30f9
Component: cli
2018-01-08 14:34:14 +01:00
143be37b02 Fix repeated "for" in docs/reference/builder.md
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7e465d1b09
Component: cli
2018-01-08 12:33:06 +01:00
5017f2840c Merge pull request #35593 from ndeloof/master
Improve swagger schema for code generation
Upstream-commit: 16a1736b9b93e44c898f95d670bbaf20a558103d
Component: engine
2018-01-08 12:17:56 +01:00
27f91f80b9 introduce « exec_die » event
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: aa6bb5cb698ebcf6662e6667bc58055b5b5bde23
Component: engine
2018-01-08 11:42:25 +01:00
5857ab9402 Merge pull request #35798 from ndeloof/ProgressDetail
Progress detail
Upstream-commit: 847df43d1df0ef7343d4f623138dcbb4307d6083
Component: engine
2018-01-08 11:28:49 +01:00
f75b092795 Add test case for docker ps -f health=starting
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f509a54bdd29b8f65c17097fde3664c6fad36c21
Component: engine
2018-01-07 05:10:36 +00:00
7ee813acf5 Update and use FindNetwork on Windows.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b249ccb1151a3c2c7e442b6c1a769821afb28fe4
Component: engine
2018-01-07 03:32:37 +00:00
414f8b2aa4 Merge component 'engine' from git@github.com:moby/moby master 2018-01-06 17:06:58 +00:00
ecf8d36483 Merge component 'cli' from git@github.com:docker/cli master 2018-01-06 16:41:31 +00:00
65164d88f6 Fix Volumes property definition in ContainerConfig
Actually the specification was expecting a 'additionalProperties' for the Volumes data, where in fact it's expecting
a map of string pointing to empty object.

Signed-off-by: Joel Wurtz <joel.wurtz@gmail.com>
Upstream-commit: dc883c0486b398eb5ad99f35aef3ff02a5a7dd29
Component: engine
2018-01-06 16:12:05 +01:00
5fe06b3e89 Merge pull request #35033 from chchliang/viservice
Add `namespace method` conver in `TestV1IDService` 
Upstream-commit: c6378920e14638cc281c5513a989fdff82562426
Component: engine
2018-01-06 14:37:48 +01:00
6169dab4e0 Merge pull request #789 from mistyhacks/load-supports-gzip
docker load supports tar and tar.gz files
Upstream-commit: 6764ce922a
Component: cli
2018-01-06 13:23:34 +01:00
d0f281be92 docker load supports tar and tar.gz files
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: ac7a5650f0
Component: cli
2018-01-05 20:33:31 -08:00
df9a679f90 Update FindUniqueNetwork to address network name duplications
This fix is part of the effort to address 30242 where
issue arise because of the fact that multiple networks
may share the same name (within or across local/swarm scopes).

The focus of this fix is to allow creation of service
when a network in local scope has the same name as the
service network.

An integration test has been added.

This fix fixes 30242.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cafed80cd019a8b40025eaa5e5b37459362607fb
Component: engine
2018-01-06 01:55:28 +00:00
836e5c6bd0 Fix before and since filter for docker ps
This fix tries to address the issue raised in 35931 where
`before` and `since` filter for `docker ps` does not work
and returns an error
```
Error response from daemon: no such container <container_name>
```

The issue was that `before` and `since` filter are matched
with `view.Get()` which does not take into considerations
of name match.

This fix fixes the issue by adding additional logic for name
match.

This fix fixes 35931.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9833332dba5cba3709c5d78c28d3dbc52e49bfa9
Component: engine
2018-01-06 00:51:08 +00:00
e6a8744081 Merge pull request #785 from friism/make-config-wording-more-consistent
use 'config' over 'configuration file'
Upstream-commit: a60bdf3bc8
Component: cli
2018-01-05 22:26:48 +01:00
1bed718e52 use 'config' over 'configuration file'
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 99e3b4cd93
Component: cli
2018-01-05 13:19:53 -08:00
0e6233fd86 Merge pull request #681 from mistyhacks/expose-no-protocol
Document EXPOSE UDP syntax
Upstream-commit: 6f09f48bf1
Component: cli
2018-01-05 21:39:21 +01:00
9c4ef1072a Merge pull request #35509 from cpuguy83/splunk_dont_readall
Splunk: limit the reader size on error responses
Upstream-commit: 39faf2a3a83c4abad8ed8030a9b942bbb2978359
Component: engine
2018-01-05 12:34:35 -08:00
233f49e086 Merge pull request #35570 from zemanlx/feature/journald-with-SYSLOG_IDENTIFIER
Add journald tag as SYSLOG_IDENTIFIER
Upstream-commit: d80c13a54114de602c8b75030e3ec9c2cde9575b
Component: engine
2018-01-05 20:56:55 +01:00
656c1163c8 add namespace method conver
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
Upstream-commit: 0446b6a04edaae1bddeb1dfdb82fd0d931fe1198
Component: engine
2018-01-05 16:24:18 +08:00
3887b15050 Merge pull request #35925 from Microsoft/jjh/builder-default-rw-size-bump
Windows: Bump RW layer size
Upstream-commit: fff423289965260c0ca83024059aa30999792c4a
Component: engine
2018-01-04 22:54:38 -08:00
62d7ad0948 Fix issue of filter in docker ps where health=starting returns nothing
This fix tries to address the issue raised in 35920 where the filter
of `docker ps` with  `health=starting` always returns nothing.

The issue was that in container view, the human readable string (`HealthString()` => `Health.String()`)
of health status was used. In case of starting it is `"health: starting"`.
However, the filter still uses `starting` so no match returned.

This fix fixes the issue by using `container.Health.Status()` instead so that it matches
the string (`starting`) passed by filter.

This fix fixes 35920.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 97b16aecf9275f4103c2737b79d0c5e81583aa58
Component: engine
2018-01-05 05:16:09 +00:00
e76ddf0d7b Merge pull request #35737 from tonistiigi/fix-git-submodules
gitutils: fix checking out submodules
Upstream-commit: 50ce54645094a5d337e5d841c037663e9f4e3170
Component: engine
2018-01-05 10:41:04 +08:00
ad4db68af2 Merge pull request #35753 from kolyshkin/netgo
install-containerd-static: use netgo buildtag
Upstream-commit: 51ccedda52413eef2cd4ba8e3948c84501210f3d
Component: engine
2018-01-05 09:05:46 +08:00
40052b6ec6 Document EXPOSE UDP syntax
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: db572ec4ab
Component: cli
2018-01-04 16:16:06 -08:00
d9cc44462d Remove Ubuntu Zesty
Ubuntu Zesty is end of life on January 2018

https://wiki.ubuntu.com/Releases

Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
Upstream-commit: 41086726310e3f78043a4bcf0bcecd5a16d8a144
Component: packaging
2018-01-05 00:02:41 +00:00
0c06f43df3 Merge component 'engine' from git@github.com:moby/moby master 2018-01-04 17:06:40 +00:00
1fbbb4c59b Merge pull request #35924 from Microsoft/32838-partial-fix
Vendor Microsoft/hcsshim @ v0.6.8
Upstream-commit: 4459775eeaa0a3239866fe091014eb1e707bdc2c
Component: engine
2018-01-04 17:49:17 +01:00
c30ceea721 Merge component 'cli' from git@github.com:docker/cli master 2018-01-04 16:41:22 +00:00
8322194c96 Merge pull request #781 from thaJeztah/fix-autogenerated-formatting
Fix gofmt for auto-generated k8s code
Upstream-commit: 220c50abc1
Component: cli
2018-01-04 11:23:32 -05:00
c08c5639be Merge pull request #784 from kizzie/fix/html-for-table
Correct table html with close tag for </thead>
Upstream-commit: 2a4c1ef0c1
Component: cli
2018-01-04 17:12:47 +01:00
Kat
e4754a59e3 Correct table html with close tag for </thead>
Signed-off-by: Kat Samperi <kat.samperi@gmail.com>
Upstream-commit: 57372d18ca
Component: cli
2018-01-04 15:01:28 +00:00
fb52c2003b Windows: Bump RW layer size
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: deb335d04fd47e96fdb7b342dece513174b574bd
Component: engine
2018-01-03 15:59:06 -08:00
39c64668e4 Fix gofmt for auto-generated k8s code
This code kept being modified by my IDE, so fixing
the formatting.

This is auto-generated code, but the code to generate
is not in this repository, so this is a temporary fix
until the code-generation upstream is fixed :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb01064691
Component: cli
2018-01-03 23:57:23 +01:00
fa87c342b2 Vendor Microsoft/hcsshim @ v0.6.8
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 172a442c27ed35778662980809824fdf15a722a6
Component: engine
2018-01-03 10:19:05 -08:00
6f3ae5f1f6 Merge pull request #35772 from arm64b/multi-arch-manifest-support
Download support of images with multi-arch manifest
Upstream-commit: fda904911d87a2b36e6fdcc048726bb6b593d944
Component: engine
2018-01-03 19:03:33 +01:00
da47568e0d Merge component 'engine' from git@github.com:moby/moby master 2018-01-03 17:04:20 +00:00
e2368ae63b Merge component 'cli' from git@github.com:docker/cli master 2018-01-03 16:41:08 +00:00
707c5a8bd6 Merge pull request #35694 from boucher/checkpoint-dir-fix
Don't append the container id to custom directory checkpoints.
Upstream-commit: f72b180ae1f638b878edfbae1b7030f454bb5624
Component: engine
2018-01-03 11:22:21 -05:00
9f589817fd Merge pull request #721 from silvin-lubecki/kube
Add kubernetes support to docker/cli
Upstream-commit: e708c900f8
Component: cli
2018-01-03 17:20:43 +01:00
169f9cc018 Add test case for 35333: Devicemapper: ignore Nodata errors when delete thin device
This fix adds a test case for 35333: Devicemapper: ignore Nodata errors when delete thin device

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7c6ef28042c20fdad23cd461ab49b9cfa0c757df
Component: engine
2018-01-03 15:06:52 +00:00
17341a3ddc Check and return error while creating kubernetes secret and config maps.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 18c44e0829
Component: cli
2018-01-03 15:46:19 +01:00
01e7ddaec8 Merge pull request #35822 from keyolk/35709-fix-docker-build-overlayfs-whiteout
skip container ID remapping, if the file is overlayfs whiteout.
Upstream-commit: 99c22b0034605d283d9ddcfc72b1f450d130c976
Component: engine
2018-01-03 22:21:00 +08:00
3e3e540e8d Fix PR comments
- More strict on orchestrator flag
- Make orchestrator flag more explicit as experimental
- Add experimentalCLI annotation on kubernetes flags
- Better kubeconfig error message
- Prefix service name with stackname in ps and services stack subcommands
- Fix yaml documentation
- Fix code coverage ignoring generated code

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f1b116179f
Component: cli
2018-01-03 10:23:32 +01:00
2bb414da6f skip container ID remapping, if the file is overlayfs whiteout.
Signed-off-by: Chanhun Jeong <chanhun.jeong@navercorp.com>
Upstream-commit: b013c1541d3b58f736bc79269aa88d3bfacda6ea
Component: engine
2018-01-03 17:06:59 +09:00
9c63a8a5b6 Merge pull request #774 from apkd/master
Fix description of filter flag in prune commands
Upstream-commit: 1a64b1b799
Component: cli
2018-01-02 20:02:20 +01:00
257633843b Fix description of filter flag in prune commands
The "-f" flag is an alias for --force, not --filter (as correctly stated at the top of each documents). The system_prune.md didn't have this error.

Signed-off-by: Mateusz Major <apkd@users.noreply.github.com>
Upstream-commit: 8b07518458
Component: cli
2018-01-02 19:40:23 +01:00
c2b1f7ca70 Devicemapper: ignore Nodata errors when delete thin device
if thin device is deteled and the metadata exists, you can not
delete related containers. This patch ignore Nodata errors for
thin device deletion

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Upstream-commit: 8451d03d8ef7457f82112179cd3e300c05a08d3d
Component: engine
2018-01-02 18:04:25 +00:00
bcb9583e82 Merge pull request #773 from thaJeztah/add-authors
Add AUTHORS file and script
Upstream-commit: ae4af7ec32
Component: cli
2018-01-02 18:07:06 +01:00
ce67d6e9b7 Merge component 'engine' from git@github.com:moby/moby master 2018-01-02 17:03:59 +00:00
4360eb4024 Merge component 'cli' from git@github.com:docker/cli master 2018-01-02 16:41:04 +00:00
f8a7c9aa17 Add AUTHORS file and script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 02e7b18fde
Component: cli
2018-01-02 17:00:22 +01:00
7cbef79c0e Merge pull request #772 from muicoder/patch-1
Fix bash completion for "docker swarm"
Upstream-commit: b0efaaeb8b
Component: cli
2018-01-02 15:14:58 +01:00
49ff2398e6 Merge pull request #35840 from kolyshkin/misc-test
Misc test improvements
Upstream-commit: c345c53859a7197deb4722ad4ca5c4a45fab7074
Component: engine
2018-01-02 09:14:20 -05:00
5965f4a425 Merge pull request #768 from thaJeztah/warn-unsupported-pid
Add "pid" to unsupported options list
Upstream-commit: 4a66821309
Component: cli
2018-01-02 15:14:08 +01:00
3b99478053 Merge pull request #35895 from javabrett/docs-contributing-moby-docker-paths
Fixed in-container paths in dev doc: moby/moby -> docker/docker.
Upstream-commit: 30c9cb1ead17e861ad666a25116da64e89dc8594
Component: engine
2018-01-02 13:30:19 +01:00
42bcb27498 Merge pull request #35893 from thaJeztah/cleanup-mailmap
Cleanup mailmap, and update authors
Upstream-commit: ff61d127fe8f39ed1bd888e4dbd3d8c14efc1a03
Component: engine
2018-01-02 12:50:43 +01:00
8e9edf70c7 Cleanup and sort .mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 63c86ad2eade7d0d5128100a6eb1d5cac245adbc
Component: engine
2018-01-02 12:48:14 +01:00
5b7cd70f03 Update mailmap and authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2df19b7c11349b961455b1c75b655a5f017dd7a4
Component: engine
2018-01-02 12:47:47 +01:00
6635d18f37 Merge pull request #35896 from thaJeztah/fix-namespace-filtering
Fix event filter filtering on "or"
Upstream-commit: 431d3d6756f69a84d23ef45186082be1ed93c151
Component: engine
2018-01-02 12:04:32 +08:00
fa250e5c10 Merge pull request #35833 from thaJeztah/fix-mount-creation-on-start
Re-validate Mounts on container start
Upstream-commit: 9d9992b314933b9d93d3ac117b3f8146b9295277
Component: engine
2018-01-02 12:01:58 +08:00
ae19592ca8 Fix bash completion for "docker swarm"
Signed-off-by: muicoder <muicoder@gmail.com>
Upstream-commit: e2f73bb4b7
Component: cli
2018-01-01 12:58:16 +08:00
6aa9598694 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-29 17:17:28 +00:00
25c9e80a84 Merge component 'engine' from git@github.com:moby/moby master 2017-12-29 17:17:22 +00:00
414d05d8c4 Merge pull request #35899 from javabrett/fix-deprecated-typo
Fixed typo DEREPCATED -> DEPRECATED.
Upstream-commit: bb9c273648584993ab5fb326634fd6c5f35e739b
Component: engine
2017-12-29 15:34:11 +01:00
cfc9623c01 Fixed typo DEREPCATED -> DEPRECATED.
Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: 3b80d5789959b790e8f45c984414cc4d2552417b
Component: engine
2017-12-29 06:39:09 -05:00
4b57d7f1d3 Fix event filter filtering on "or"
The event filter used two separate filter-conditions for
"namespace" and "topic". As a result, both events matching
"topic" and events matching "namespace" were subscribed to,
causing events to be handled both by the "plugin" client, and
"container" client.

This patch rewrites the filter to match only if both namespace
and topic match.

Thanks to Stephen Day for providing the correct filter :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 295bb09184fe473933498bb0efb59b8acb124f55
Component: engine
2017-12-29 02:47:56 +01:00
31e8b1c077 Fixed in-container paths in dev doc: moby/moby -> docker/docker.
Further to 355cf9483c1b8ede5ae3ed50add4de2a69d62645 which caught some
of these.  This should fix the remainder in the contributing docs.

Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: e96b33665e58f73a16923b89a9bcc6fe6fcdb6c6
Component: engine
2017-12-28 20:22:02 -05:00
f1638ade2e Merge pull request #35674 from kolyshkin/zfs-rmdir
zfs: fix ebusy on umount etc
Upstream-commit: daded8da9178ec097e59a6b0b2bf12754b5472d8
Component: engine
2017-12-28 15:35:19 -08:00
8befd2d809 TestImportExtremelyLargeImageWorks: optimize DevZero
According to https://github.com/golang/go/issues/5373, go recognizes
(and optimizes for) the following syntax:

```go
for i := range b {
	b[i] = 0
}
```

so let's use it. Limited testing shows ~7.5x speed increase,
compared to the previously used syntax.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: f0cab0e28512de5eecc0412212425cc74d62af71
Component: engine
2017-12-28 13:08:41 -08:00
2a34102708 TestBuildNotVerboseFailureRemote: fix false positive
I got the following test failure on power:

10:00:56
10:00:56
----------------------------------------------------------------------
10:00:56 FAIL: docker_cli_build_test.go:3521:
DockerSuite.TestBuildNotVerboseFailureRemote
10:00:56
10:00:56 docker_cli_build_test.go:3536:
10:00:56     c.Fatal(fmt.Errorf("Test[%s] expected that quiet stderr and
verbose stdout are equal; quiet [%v], verbose [%v]", name,
quietResult.Stderr(), result.Combined()))
10:00:56 ... Error: Test[quiet_build_wrong_remote] expected that quiet
stderr and verbose stdout are equal; quiet [
10:00:56 unable to prepare context: unable to download remote context
http://something.invalid: Get http://something.invalid: dial tcp: lookup
something.invalid on 172.29.128.11:53: no such host
10:00:56 ], verbose [unable to prepare context: unable to download
remote context http://something.invalid: Get http://something.invalid:
dial tcp: lookup something.invalid on 8.8.8.8:53: no such host
10:00:56 ]
10:00:56
10:00:56
10:00:56
----------------------------------------------------------------------

The reason is, either more than one name server is configured, or
nameserver was reconfigured in the middle of the test run. In any case,
different nameserver IP in an error messages should not be treated
as a failure, so let's strip those out.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 3676bd8569f4df28a4f850cd4814e3558d8c03f6
Component: engine
2017-12-28 13:08:41 -08:00
dd0cbe7272 integration-cli/TestCleanupMounts: fix/improve
`TestCleanupMountsAfterDaemonAndContainerKill` was supposedly written
when the container mounts were visible from the host. Currently they
all live in their own mount namespace and the only visible mount is
the tmpfs one for shareable /dev/shm inside the container (i.e.
/var/lib/docker/containers/<ID>/shm), which will no longer be there
in case of `--default-ipc-mode private` is used, and so the test will
fail. Add a check if any container mounts are visible from the host,
and skip the test if there are none, as there's nothing to check.

`TestCleanupMountsAfterDaemonCrash`: fix in a similar way, keeping
all the other checks it does, and skipping the "mounts gone" check
if there were no mounts visible from the host.

While at it, also fix the tests to use `d.Kill()` in order to not
leave behind a stale `docker.pid` files.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: f5e01452d2c2a07bab48b4e05306ef9446770c4a
Component: engine
2017-12-28 13:08:41 -08:00
e25f9d0953 integration-cli/TestRunModeIpcContainer: remove
1. The functionality of this test is superceded by
   `TestAPIIpcModeShareableAndContainer` (see
   integration-cli/docker_api_ipcmode_test.go).

2. This test won't work with --default-ipc-mode private.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 519c06607ca7e8a544afddbd61ad57afe63a98b4
Component: engine
2017-12-28 13:08:41 -08:00
9bf811bf85 Merge pull request #74 from seemethere/move_phony
Move .PHONY targets above actual targets
Upstream-commit: 41ae603d88e02e950ba4f3e227f9f6e972a3c74b
Component: packaging
2017-12-28 13:58:47 -06:00
f63a46268d Move .PHONY targets above actual targets
Was getting annoying to have to write it into one spot so moved them to
above the targets that they specify.

Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
Upstream-commit: a8e527df5d6579cc53372c26ef86fdcf449aa9ae
Component: packaging
2017-12-28 17:53:59 +00:00
f46e42c6ec Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-28 17:05:24 +00:00
0ba6b0ad15 Merge pull request #72 from seemethere/remove_f25
Remove Fedora 25
Upstream-commit: 95eb77209344abe5f29e82ad09ae5ecf7aebe710
Component: packaging
2017-12-28 11:02:42 -06:00
cb8fda044c Activate kubernetes only when experimental cli is enabled
* Refactor tests on version and kubernetes switch
* Fix rebase errors
* Refactor for gocyclo linter

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: ad409767bf
Component: cli
2017-12-28 14:40:10 +01:00
effda473ed Set a global orchestrator flag
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5d375b348a
Component: cli
2017-12-28 14:40:10 +01:00
d7b5fca8a7 Update golang.org/x/net to not panic
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 12c0825a4c
Component: cli
2017-12-28 14:40:09 +01:00
d05eafef63 Remove Fedora 25
Fedora 25 was end of life on December 12, 2017

https://fedoramagazine.org/fedora-25-end-life/

Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
Upstream-commit: 920ab84c8c34594be0ebabdac05ebd7710dc6cd0
Component: packaging
2017-12-27 18:12:51 -06:00
486a48d270 Merge component 'engine' from git@github.com:moby/moby master 2017-12-27 17:03:35 +00:00
c52c03e94f Merge component 'cli' from git@github.com:docker/cli master 2017-12-27 16:41:02 +00:00
d1cf6ac921 Add "pid" to unsupported options list
Services do not support custom "pid"-modes (e.g. `--pid=host`), but this
option was ignored silently when deploying a stack.

This patch adds `pid` to the list of unsupported options so that a warning
is printed;

With this patch applied:

    $ docker stack deploy -c docker-compose.yml foobar
    Ignoring unsupported options: pid

    Creating network foobar_default
    Creating service foobar_test

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 70a29b492d
Component: cli
2017-12-27 12:45:42 +01:00
84f5ef8c85 Merge pull request #765 from thaJeztah/remove-incorrect-link
Remove reference to non-existing "stack config" command
Upstream-commit: a5fe375289
Component: cli
2017-12-26 18:16:37 +01:00
40a74c51c6 Remove reference to non-existing "stack config" command
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 424fe2bb2e
Component: cli
2017-12-26 16:47:45 +01:00
dcfd719f61 Error out on orchestrator command that don't support k8s yet
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1a2244e384
Component: cli
2017-12-26 11:46:59 +01:00
f4626b5de8 Move e2e test on version command to unit tests
* Refactor a little version command

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: ba5d0d8ff5
Component: cli
2017-12-26 11:46:59 +01:00
1d466a29ee Update vendoring
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 61713c42a4
Component: cli
2017-12-26 11:45:56 +01:00
65271c3145 Fix e2e test (and add a comment that it's not the best fix)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3a01d6a40a
Component: cli
2017-12-26 11:45:56 +01:00
b5273bceed Update warning
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f5073f81d2
Component: cli
2017-12-26 11:45:56 +01:00
507de4363e add kubernetes/ README
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0b5883f953
Component: cli
2017-12-26 11:45:56 +01:00
1e23b82bb7 Take @nass review into account
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b5170bde03
Component: cli
2017-12-26 11:45:56 +01:00
baa35d70b2 Refactor stack command
- Define command and subcommands only once
- Use annotations for k8s or swarm specific flags or subcommands

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dedd0db51a
Component: cli
2017-12-26 11:45:56 +01:00
cbbf94a252 Move cli/command/orchestrator to cli/command
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0508c09494
Component: cli
2017-12-26 11:25:22 +01:00
1ebc428804 Move /cli/command/stack/kubernetes/api to /kubernetes
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f960d2d5f3
Component: cli
2017-12-26 11:22:32 +01:00
4dba81f210 Fix some build failures
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1ff277ad8f
Component: cli
2017-12-26 11:22:32 +01:00
4b3a19ed1e Add support for kubernetes in docker cli
- Add support for kubernetes for docker stack command
- Update to go 1.9
- Add kubernetes to vendors
- Print orchestrator in docker version command

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 8417e49792
Component: cli
2017-12-26 11:22:32 +01:00
c88231e80c Merge pull request #35791 from corbin-coleman/libnetwork_vendoring
[AUTOMATED] libnetwork Vendoring
Upstream-commit: 4a804016ab8b9fd55a45cff9687a1de12dee5eb7
Component: engine
2017-12-26 00:17:26 -06:00
0a947da27f Merge pull request #35827 from kolyshkin/vfs-quota
Fix VFS vs quota regression
Upstream-commit: 3e1df952b7d693ac3961f492310852bdf3106240
Component: engine
2017-12-22 12:32:03 -06:00
4cbf52bf35 Merge component 'engine' from git@github.com:moby/moby master 2017-12-22 17:06:13 +00:00
ed8df8d90f Merge component 'cli' from git@github.com:docker/cli master 2017-12-22 16:41:11 +00:00
2ac4f6cd3a Merge pull request #758 from vdemeester/experimental-cli
Add support for experimental Cli configuration
Upstream-commit: 70db7cc0fc
Component: cli
2017-12-22 14:56:40 +01:00
2a46f74679 Add support for experimental Cli configuration
Allow to mark some commands and flags experimental on cli (i.e. not
depending to the state of the daemon). This will allow more flexibility
on experimentation with the cli.

Marking `docker trust` as cli experimental as it is documented so.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 84fe1a1b5b
Component: cli
2017-12-22 14:48:47 +01:00
7c289486a2 Merge pull request #35844 from thaJeztah/remove-test-events-limit
Remove TestEventsLimit(), and minor cleanups
Upstream-commit: c753095bf331b5b8904cd58a2072c93a9b815141
Component: engine
2017-12-22 09:23:19 +01:00
751e6f56a0 Merge pull request #35672 from tonistiigi/onbuild-test
Add testcase for onbuild command in multi stage build
Upstream-commit: b0cffdb10a2fbcec744588caddf3d0ddfc143967
Component: engine
2017-12-22 09:22:51 +01:00
ee811e7a56 Merge pull request #35851 from tonistiigi/test-names
integration-cli: clarify multi-stage tests names
Upstream-commit: 89140ac28cc413d0e961016b78addccdca4d3607
Component: engine
2017-12-22 00:25:17 +01:00
b1a25d1e15 Merge component 'engine' from git@github.com:moby/moby master 2017-12-21 17:03:54 +00:00
3e15d0b417 Merge component 'cli' from git@github.com:docker/cli master 2017-12-21 16:41:00 +00:00
618f1e2388 Merge pull request #761 from sourabhtk37/patch-1
Corrected descriptions for MAC_ADMIN and MAC_OVERRIDE
Upstream-commit: ebb8927a2a
Component: cli
2017-12-21 11:43:21 +01:00
7fa76a7822 Corrected descriptions for MAC_ADMIN and MAC_OVERRIDE
The description for capabilities are mismatched for MAC_ADMIN and MAC_OVERRIDE.

Signed-off-by: T K Sourabh <sourabhtk37@gmail.com>
Upstream-commit: afcc78aae3
Component: cli
2017-12-21 16:06:32 +05:30
87487ae8dd Merge pull request #759 from mistyhacks/link-to-attack-surface
Fix typo in link
Upstream-commit: 2f3b13742f
Component: cli
2017-12-21 08:33:16 +01:00
b8be0fb3b8 Merge pull request #35582 from asottile/use_base_containers_config
Fix environ substitutions in `docker commit --change ...`
Upstream-commit: a5de79b435735f8027ffc98072a33a83fc8dea28
Component: engine
2017-12-20 21:01:53 -08:00
aa8a79c526 Merge pull request #35845 from ndeloof/FIX35843
fix #35843 regression on health check workingdir
Upstream-commit: c36d6f5ab10d0dd4e5216fa3b8e2613de38c3ba2
Component: engine
2017-12-21 10:55:15 +09:00
1f700eda21 Fix typo in link
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 946cb0d4fd
Component: cli
2017-12-20 15:35:22 -08:00
02056dd212 Merge pull request #35838 from marcusmartins/marcus_swarmkit
Vendor docker/swarmkit to 713d79d
Upstream-commit: 9646d07d753b9d92678c625b6f43ed76a71fe83e
Component: engine
2017-12-20 23:47:10 +01:00
c61589a0f0 Add testcase for onbuild command in multi stage build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fe4ed9d78f496df5cac1eb914877f213f3f1c12c
Component: engine
2017-12-20 11:56:41 -08:00
d109b596b8 integration-cli: clarify multi-stage tests names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e90b7c06b4b08ca2935359667cfac4f05e33819b
Component: engine
2017-12-20 11:55:27 -08:00
2af5d43021 Fix environ substitutions in docker commit --change ...
The building machinery was being handed an uninitialized container
Config.  This changes it to use the target container's Config.

Resolves #30538

Signed-off-by: Anthony Sottile <asottile@umich.edu>
Upstream-commit: 0785836c4b440a8d4a5dfdb8df82e50f9f4d23a1
Component: engine
2017-12-20 11:03:38 -08:00
e0ed436e6c Add integration test for healthcheck workdir
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5be2f2be243a52eb1b051c981bac5442b6e85606
Component: engine
2017-12-20 18:48:36 +01:00
e190404195 Merge component 'engine' from git@github.com:moby/moby master 2017-12-20 17:04:25 +00:00
e1e6adb17e Build rpms for aarch64
Upstream-commit: e204caefd93865ae41a863391b394432130e33fa
Component: packaging
2017-12-20 15:24:30 +01:00
2a820c0f5f fix #35843 regression on health check workingdir
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 852a943c773382df09cdda4f29f9e93807523178
Component: engine
2017-12-20 14:04:51 +01:00
88269f42ba Update TestLogEvents to not use deprecated Status field
The `Status` field was deprecated in favor of `Action`.

This patch updates the test to use the `Action` field,
but adds a check that both are set to the same value.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b7d204ef6b1b2d6a3bafb42f844cdc146976e68f
Component: engine
2017-12-20 12:49:51 +01:00
e5199a0f6e Fix GoDoc to match actual events-limit
Commit 59d45c384a2de7bca73296ce1471646db14cb0c8 changed
the `eventsLimit` from 64 to 256, but did not update
the GoDoc accordingly.

This patch updates the GoDoc for `Subscribe` and `SubscribeTopic`
to match the actual limit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fb3935022dbc160fc1531fa43f0ca2db69184800
Component: engine
2017-12-20 12:41:51 +01:00
3b758ede4d Remove TestEventsLimit()
This test was added a long time ago, and over the years has proven to be flaky,
and slow. To address those issues, it was modified to;

- cleanup containers afterwards
- take clock-skew into account
- improve performance by parallelizing the container runs
- _reduce_ parallelization to address platform issues on Windows (twice..)
- adjust the test to take new limits into account
- adjust the test to account for more events being generated by containers

The last change to this test (made in ddae20c032058a0fd42c34c2e9750ee8f62) actually
broke the test, as it's now testing that all events sent by containers
(`numContainers*eventPerContainer`) are received, but the number of events that
is generated (17 containers * 7 events = 119) is less than the limit (256 events).

The limit is already covered by the `TestLogEvents` unit-test, that was added in
8d056423f8c433927089bd7eb6bc97abbc1ed502, and tests that the number of events
is limited to `eventsLimit`.

This patch removes the test, because it's not needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b7ad3e7ea10e285226a0a5b1665e8205b3264128
Component: engine
2017-12-20 12:40:05 +01:00
847487f5da Merge pull request #35778 from estesp/moby-governance
Add Moby TSC references/governance details
Upstream-commit: 267847712e720d624f78ef5364f474ff6635b725
Component: engine
2017-12-20 10:50:47 +01:00
6b042c3e6d install-containerd-static: use netgo buildtag
When compiling containerd binaries statically, linker rightfully
complains:

 + make BUILDTAGS=static_build 'EXTRA_FLAGS=-buildmode pie' 'EXTRA_LDFLAGS=-extldflags "-fno-PIC -static"'
 🇩 bin/ctr
 # github.com/containerd/containerd/cmd/ctr
 /tmp/go-link-343047789/000000.o: In function `_cgo_b0c710f30cfd_C2func_getaddrinfo':
 /tmp/go-build/net/_obj/cgo-gcc-prolog:46: warning: Using 'getaddrinfo'
 in statically linked applications requires at runtime the shared
 libraries from the glibc version used for linking

The same error appears for ctr, containerd, and containerd-stress
binaries.

The fix is to use Go's own DNS resolver functions, rather than
glibc's getaddrinfo() -- this option is turned on by `netgo` build tag.

See https://golang.org/pkg/net/ (look for "Name Resolution") for more
details.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7368ef96c89fd4f6879addf5214c4a09889a05be
Component: engine
2017-12-19 18:25:02 -08:00
50de5d926a Merge pull request #35812 from stevvooe/follow-conventions
daemon, plugin: follow containerd namespace conventions
Upstream-commit: 745278d24280614145819838b763c3a2d5349b7e
Component: engine
2017-12-19 15:55:39 -08:00
f0d368cb33 vfs gd: ignore quota setup errors
This is a fix to regression in vfs graph driver introduced by
commit 7a1618ced359a3ac92 ("add quota support to VFS graphdriver").

On some filesystems, vfs fails to init with the following error:

> Error starting daemon: error initializing graphdriver: Failed to mknod
> /go/src/github.com/docker/docker/bundles/test-integration/d6bcf6de610e9/root/vfs/backingFsBlockDev:
> function not implemented

As quota is not essential for vfs, let's ignore (but log as a warning) any error
from quota init.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 1e8a087850aa9f96c5000a3ad90757d2e9c0499f
Component: engine
2017-12-19 13:55:04 -08:00
3f7322c602 Vendor docker/swarmkit to 713d79d
Revendor swarmkit to 713d79dc8799b33465c58ed120b870c52eb5eb4f to include
https://github.com/docker/swarmkit/pull/2473.

Signed-off-by: Marcus Martins <marcus@docker.com>
Upstream-commit: af73d31e60fd5c26d58bb8275785e628c3febdc0
Component: engine
2017-12-19 13:23:21 -08:00
760baaebbb Merge pull request #35805 from cpuguy83/fix_kill_containers_on_restart
Ensure containers are stopped on daemon startup
Upstream-commit: c3a9f5d00f48a1487ab005693e23bbaba04a0523
Component: engine
2017-12-19 12:19:47 -08:00
b225d1b061 Merge pull request #35726 from jahkeup/awslogs-batching
Fix awslogs batch size calculation
Upstream-commit: c8f7f4489ebac5b5dbf2d4e2b4fc1dd3f2d744dc
Component: engine
2017-12-19 20:44:33 +01:00
0acf31e126 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-19 17:04:12 +00:00
92961327ba Merge component 'engine' from git@github.com:moby/moby master 2017-12-19 17:04:06 +00:00
f1ba211fd1 Merge component 'cli' from git@github.com:docker/cli master 2017-12-19 16:41:15 +00:00
822fd111b3 Merge pull request #35808 from thaJeztah/prevent-panic-in-test
Prevent potential panic in TestLogsAPIUntil
Upstream-commit: 602bce175b40d77abf671b35afa9bf81c96b2b72
Component: engine
2017-12-19 11:16:00 -05:00
50a3444995 Re-validate Mounts on container start
Validation of Mounts was only performed on container _creation_, not on
container _start_. As a result, if the host-path no longer existed
when the container was started, a directory was created in the given
location.

This is the wrong behavior, because when using the `Mounts` API, host paths
should never be created, and an error should be produced instead.

This patch adds a validation step on container start, and produces an
error if the host path is not found.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7cb96ba308dc53824d2203fd343a4a297d17976e
Component: engine
2017-12-19 11:44:29 +01:00
04606e240e Merge pull request #757 from pszczekutowicz/master
Return errors from client in stack deploy configs
Upstream-commit: 2b8eb23b8c
Component: cli
2017-12-19 11:05:49 +01:00
7a36094339 Merge pull request #35823 from thaJeztah/remove-dead-code
Remove dead code and redundant build tags
Upstream-commit: c492e76d13a61b13815475d1a6393ab1da1db5c8
Component: engine
2017-12-18 18:05:05 -06:00
3e7449957b Return errors from client in stack deploy configs
Signed-off-by: Paweł Szczekutowicz <pszczekutowicz@gmail.com>
Upstream-commit: a30dd1b6f3
Component: cli
2017-12-18 21:34:04 +01:00
048a0b941a Ensure containers are stopped on daemon startup
When the containerd 1.0 runtime changes were made, we inadvertantly
removed the functionality where any running containers are killed on
startup when not using live-restore.
This change restores that behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e69127bd5ba4dcf8ae1f248db93a95795eb75b93
Component: engine
2017-12-18 14:33:45 -05:00
c5f1cdf92c projectquota: treat ENOSYS as quota unsupported
If mknod() returns ENOSYS, it most probably means quota is not supported
here, so return the appropriate error.

This is a conservative* fix to regression in vfs graph driver introduced
by commit 7a1618ced359a3ac92 ("add quota support to VFS graphdriver").
On some filesystems, vfs fails to init with the following error:

> Error starting daemon: error initializing graphdriver: Failed to mknod
> /go/src/github.com/docker/docker/bundles/test-integration/d6bcf6de610e9/root/vfs/backingFsBlockDev:
> function not implemented

Reported-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 2dd39b7841bdb9968884bbedc5db97ff77d4fe3e
Component: engine
2017-12-18 10:32:36 -08:00
df88bdc9c9 Merge pull request #69 from BSWANG/master
replace all '-' in version when generate rpm version
Upstream-commit: abc7613e1b7399b3a8012c00a8a3aaa01e1251fa
Component: packaging
2017-12-18 10:08:29 -08:00
fd08bae89c Remove redundant build-tags
Files that are suffixed with `_linux.go` or `_windows.go` are
already only built on Linux / Windows, so these build-tags
were redundant.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ed1163c98703f8dd0693cecbadc84d2cda811c3
Component: engine
2017-12-18 17:41:53 +01:00
ef4dfd2f67 Remove Solaris files
Solaris is no longer being worked on, so these files
are now just dead code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1589cc0a85396e2768bfe9e558c7c2100dc3bc87
Component: engine
2017-12-18 17:22:25 +01:00
7e2ee76b7e Remove unused experimental code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 16fe5a12891984ae5d0b28e737958566a13958ae
Component: engine
2017-12-18 17:07:48 +01:00
15c0c88784 Merge component 'engine' from git@github.com:moby/moby master 2017-12-16 17:04:05 +00:00
f3becf1d35 Merge component 'cli' from git@github.com:docker/cli master 2017-12-16 16:41:09 +00:00
343f73cf3d Merge pull request #35811 from abhi/vendor
Vendoring swarmkit a6519e28ff2a558f5d32b2dab9fcb0882879b398
Upstream-commit: 26bc976ac9e379b4432f71394f069dfb1e4d7baf
Component: engine
2017-12-16 10:40:29 -06:00
435d4943db Merge pull request #35809 from cpuguy83/fix_container_zombies
Fix race conditions in libcontainerd process handling
Upstream-commit: 52656da9500eefedd69361849954e7d44b9a1513
Component: engine
2017-12-16 01:16:50 -08:00
756e315027 fix attribute names on ProgressDetail
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 5e63edfa935e4f87e588d358d7060227745de288
Component: engine
2017-12-16 09:38:34 +01:00
264a31ea91 CreateImage uses ‘id’ to track layers
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: cfa07bffb5e27763fa4bb189133dadd179e4bd23
Component: engine
2017-12-16 09:38:34 +01:00
7b36860dee BuildInfo uses ‘aux’ to document image ID after build
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 9e29d2ea49aaee9cd92fa3fe026ff5f8ab1f8a25
Component: engine
2017-12-16 09:38:33 +01:00
ef43ef8bc9 Merge pull request #35794 from estesp/fix-overlay2-untarinuserns
Fix overlay2 storage driver inside a user namespace
Upstream-commit: 0862014431d40174a7b4e614ddcc0ee6e13ad570
Component: engine
2017-12-15 23:25:15 -08:00
ebbba75d0a daemon, plugin: follow containerd namespace conventions
Follow the conventions for namespace naming set out by other projects,
such as linuxkit and cri-containerd. Typically, they are some sort of
host name, with a subdomain describing functionality of the namespace.
In the case of linuxkit, services are launched in `services.linuxkit`.
In cri-containerd, pods are launched in `k8s.io`, making it clear that
these are from kubernetes.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 521e7eba86df25857647b93f13e5366c554e9d63
Component: engine
2017-12-15 17:20:42 -08:00
f77854ac3c Show container wait error
If container wait has failed, show an error from the engine
and return an appropriate exit code.

This requires engine changes from https://github.com/moby/moby/pull/34999

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 8471742a8a
Component: cli
2017-12-15 14:15:30 -08:00
a67c7bc0ee Merge pull request #713 from albers/completion-512
Fix #512 Bash autocompletion works incorrect with inspect
Upstream-commit: 718a245b6e
Component: cli
2017-12-15 16:33:41 -05:00
e1fb11f9ea Vendoring swarmkit a6519e28ff2a558f5d32b2dab9fcb0882879b398
Signed-off-by: abhi <abhi@docker.com>
Upstream-commit: efae8db785189dc1fe9ce880d190beb2e26cb0fd
Component: engine
2017-12-15 11:37:17 -08:00
fbc087df98 Fix some missing synchronization in libcontainerd
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 647cec4324186faa3183bd6a7bc72a032a86c8c9
Component: engine
2017-12-15 12:54:38 -05:00
b16d6e9f15 Merge component 'engine' from git@github.com:moby/moby master 2017-12-15 17:04:20 +00:00
c687cf1b38 Merge component 'cli' from git@github.com:docker/cli master 2017-12-15 16:41:16 +00:00
72249a1f2e Fix error handling for kill/process not found
With the contianerd 1.0 migration we now have strongly typed errors that
we can check for process not found.
We also had some bad error checks looking for `ESRCH` which would only
be returned from `unix.Kill` and never from containerd even though we
were checking containerd responses for it.

Fixes some race conditions around process handling and our error checks
that could lead to errors that propagate up to the user that should not.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e55bead518e4c72cdecf7de2e49db6c477cb58eb
Component: engine
2017-12-15 10:09:55 -05:00
53eeb39422 Simplify bash completion for service options
Previously, the completions for `--xxx` and the corresponding
`-xxx-add` and `-xxx-rm` options were defined in separate blocks.
This caused a lot of duplicated code.

This PR removes duplication for xxx=config|group|host|placement-pref|secret.

Now the blocks for `create` and `update` only contain completions for
options that either only exist for the particular command or are specific
to it (completions for `--env-rm` and `--env|env-add` differ).

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f2b42bb6a8
Component: cli
2017-12-15 13:49:42 +01:00
a7c2ea2fc4 Fix bash completion for service env, mounts and labels
`service create` and `service update` both used to have `--env`, `--label`
and `--mount` options.
These options now are only valid for `service create`.
`service update` got corresponding `--xxx-add|rm` options instead.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d149c93c0c
Component: cli
2017-12-15 13:49:42 +01:00
5e5a802f6b Merge pull request #753 from thaJeztah/image-shortid
Updated deprecation status for "repository:shortid"
Upstream-commit: 69b11daa77
Component: cli
2017-12-15 01:35:11 -08:00
7ad7bb59be Merge pull request #35790 from thaJeztah/image-shortid
Remove support for referencing images by 'repository:shortid'
Upstream-commit: 6796e740fdcb8f446747a6b7890e71d4057b1082
Component: engine
2017-12-15 01:33:49 -08:00
ba6f88e84d Merge pull request #749 from albers/completion--generic-resource
Add support for generic resources to bash completion
Upstream-commit: 8684b99923
Component: cli
2017-12-15 01:08:42 -08:00
edf70bdb82 Add support for generic resources to bash completion
Adds bash completion for
- `service create --generic-resource`
- `service update --generic-resource-(add|rm)`
- `dockerd --node-generic-resource`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8ec80eec67
Component: cli
2017-12-15 08:56:14 +01:00
58f0e7706b Merge pull request #35793 from Microsoft/33107
Windows: Case-insensitive filename matching against builder cache
Upstream-commit: a59061da5f6d02f16563efc5ec7c561373d1c4e2
Component: engine
2017-12-14 23:48:47 -08:00
b845d8f122 Prevent potential panic in TestLogsAPIUntil
Seen failing on Windows:

    22:27:52 ----------------------------------------------------------------------
    22:27:52 PANIC: docker_api_logs_test.go:152: DockerSuite.TestLogsAPIUntil
    22:27:52
    22:27:52 ... Panic: runtime error: index out of range (PC=0x45AC01)
    22:27:52
    22:27:52 d:/CI/CI-7caa30e89/go/src/runtime/asm_amd64.s:509
    22:27:52   in call32
    22:27:52 d:/CI/CI-7caa30e89/go/src/runtime/panic.go:491
    22:27:52   in gopanic
    22:27:52 d:/CI/CI-7caa30e89/go/src/runtime/panic.go:28
    22:27:52   in panicindex
    22:27:52 docker_api_logs_test.go:175
    22:27:52   in DockerSuite.TestLogsAPIUntil
    22:27:52 d:/CI/CI-7caa30e89/go/src/runtime/asm_amd64.s:509
    22:27:52   in call32
    22:27:52 d:/CI/CI-7caa30e89/go/src/reflect/value.go:434
    22:27:52   in Value.call
    22:27:52 d:/CI/CI-7caa30e89/go/src/reflect/value.go:302
    22:27:52   in Value.Call
    22:27:52 c:/gopath/src/github.com/docker/docker/vendor/github.com/go-check/check/check.go:816
    22:27:52   in suiteRunner.forkTest.func1
    22:27:52 c:/gopath/src/github.com/docker/docker/vendor/github.com/go-check/check/check.go:672
    22:27:52   in suiteRunner.forkCall.func1
    22:27:52 d:/CI/CI-7caa30e89/go/src/runtime/asm_amd64.s:2337
    22:27:52   in goexit
    22:27:54
    22:27:54 ----------------------------------------------------------------------

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e77de7856bf212c764555ab8c2f346f2c529467c
Component: engine
2017-12-14 23:20:44 -08:00
600655d01d Remove support for referencing images by 'repository:shortid'
The `repository:shortid` syntax for referencing images is very little used,
collides with with tag references can be confused with digest references.

The `repository:shortid` notation was deprecated in Docker 1.13 through
5fc71599a0b77189f0fedf629ed43c7f7067956c, and scheduled for removal
in Docker 17.12.

This patch removes the support for this notation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a942c92dd77aff229680c7ae2a6de27687527b8a
Component: engine
2017-12-14 21:10:29 -08:00
eeeede3c5f Vendoring libnetwork_vendoring
Signed-off-by: Corbin <corbin.coleman@docker.com>
Upstream-commit: 1f70d6dd5870c779a4f036db30f5da04ba792b32
Component: engine
2017-12-14 16:57:17 -08:00
e653cda753 Merge pull request #751 from ktrysmt/fix/zsh-completions
Fix error in zsh completion script for docker exec
Upstream-commit: ee3ffd6540
Component: cli
2017-12-14 14:33:04 -08:00
14b537bf91 Updated deprecation status for "repository:shortid"
The `repository:shortid` syntax for referencing images is very little used,
collides with with tag references can be confused with digest references.

The `repository:shortid` notation was deprecated in Docker 1.13, and scheduled
for removal in Docker 17.12.

This patch updates the deprecation status for this feature.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1a21ca12a6
Component: cli
2017-12-14 14:23:17 -08:00
5b55002724 Merge pull request #754 from thaJeztah/fix-on-failure
Fix "on-failure" restart policy being documented as "failure"
Upstream-commit: 1d54f30cbb
Component: cli
2017-12-14 14:20:43 -08:00
3ac0d82798 Fix "on-failure" restart policy being documented as "failure"
Commit ddadd3db49 refactored
the markdown documentation, but accidentally changed
`on-failure` to `failure`.

This patch corrects this change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 43217d7332
Component: cli
2017-12-14 13:50:56 -08:00
57c4619d75 Windows: Case-insensitive filename matching against builder cache
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7caa30e8937b65ad9fd61a8b811bba470d22809f
Component: engine
2017-12-14 13:49:40 -08:00
a49939a820 Merge component 'engine' from git@github.com:moby/moby master 2017-12-14 17:04:42 +00:00
5dfe871bd5 Merge component 'cli' from git@github.com:docker/cli master 2017-12-14 16:41:16 +00:00
6f60e78f91 Download support of images with multi-arch manifest
Currently we only support 'application/vnd.docker.distribution.manifest.v2+json'
manifest images download, with more multi-arch images used, we need to support
download images with 'application/vnd.docker.distribution.manifest.list.v2+json'
format(aka "fat manifest"), else we will fail to download those multi-arch ones.

This PR adds 'application/vnd.docker.distribution.manifest.list.v2+json' manifest
support, thus we can download both multi-arch and legacy images.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 0af5db511ed1ed5beab0feb09a2a96347a263410
Component: engine
2017-12-14 05:37:22 +00:00
feccd72a49 Fix overlay2 storage driver inside a user namespace
The overlay2 driver was not setting up the archive.TarOptions field
properly like other storage backend routes to "applyTarLayer"
functionality. The InUserNS field is populated now for overlay2 using
the same query function used by the other storage drivers.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 05b8d59015f8a5ce26c8bbaa8053b5bc7cb1a77b
Component: engine
2017-12-13 23:38:22 -05:00
63a4263b5f awslogs: Use batching type for ergonomics and correct counting
The previous bytes counter was moved out of scope was not counting the
total number of bytes in the batch. This type encapsulates the counter
and the batch for consideration and code ergonomics.

Signed-off-by: Jacob Vallejo <jakeev@amazon.com>
Upstream-commit: ad14dbf1346742f0607d7c28a8ef3d4064f5f9fd
Component: engine
2017-12-13 15:27:16 -08:00
0ef0e17180 Merge pull request #354 from seemethere/bump_dev_version_18_01
[master] bump version to 18.01.0-ce-dev
2017-12-13 13:58:23 -08:00
5b033215e5 bump version to 18.01.0-ce-dev
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-12-13 21:55:16 +00:00
9626c25157 Add Moby TSC references/governance details
Also added back some of the maintainer processes that were in
MAINTAINERS but moved to docker/opensource repo. I believe this
project's governance should be disconnected from docker/opensource as
project's remaining under docker/opensource will not use the Moby TSC.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 449c870afbd21563a6df04445fbb136d3230629b
Component: engine
2017-12-13 16:51:46 -05:00
f76cba5158 Merge pull request #35788 from yongtang/35609-carry
Carry #35609 (remove import of opencontainers/runc in windows)
Upstream-commit: 1cea9d3bdb427bbdd7f14c6b11a3f6cef332bd34
Component: engine
2017-12-13 15:56:31 -05:00
0834563329 use swagger support for « title » as generated types names for inline schema
align naming convention with x-go-name

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 8e7f9afa471c2be079f2c8897cf3b87e7f60544e
Component: engine
2017-12-13 18:54:37 +01:00
05b6e11768 Merge pull request #748 from thaJeztah/fix-storage-driver-anchors
Fix anchors to "Storage driver options"
Upstream-commit: 6a2b9d0267
Component: cli
2017-12-13 09:53:05 -08:00
4a3429a762 Remove getBlkioWeightDevices in daemon_windows.go as it is not needed
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0866dee5fdb039adf73cd99e23bc5382a3dc8610
Component: engine
2017-12-13 17:31:28 +00:00
e5dd0c19d9 remove import of opencontainers/runc in windows
We are planning to remove supports for non-Linux platform in
runc (https://github.com/opencontainers/runc/pull/1654).  The current
import here is the only thing that i found in docker that is windows-related
so fixing this would remove the rest of windows code in runc.

This changes some functions in daemon_windows to be the same as
daemon_unix to use runtime-spec public API instead of runc.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
Upstream-commit: 4d1d486202a7c3977e51275c2efdba922375b0cd
Component: engine
2017-12-13 17:18:56 +00:00
78fc682ae3 Merge component 'engine' from git@github.com:moby/moby master 2017-12-13 17:04:12 +00:00
1fd0a9d87b Merge component 'cli' from git@github.com:docker/cli master 2017-12-13 16:41:10 +00:00
f1310bd820 Fixed #750
Signed-off-by: Kotaro Yoshimatsu <kotaro.yoshimatsu@gmail.com>
Upstream-commit: db05d8ad79
Component: cli
2017-12-13 17:45:14 +09:00
faf7b2e58e Merge pull request #747 from thaJeztah/17.12-update-deprecated
Update docs and completion-scripts for deprecated features
Upstream-commit: 619c40fac5
Component: cli
2017-12-13 00:02:26 -08:00
4ee5590aac Merge pull request #35773 from arm64b/aarch64-multi-arch-imgs-replacement
Legacy images replacement with multi-arch ones on AArch64
Upstream-commit: 5dc791c2debd561f61f04ec5a947f261fe79b275
Component: engine
2017-12-13 14:56:14 +08:00
dc415e6d5e Merge pull request #35681 from javabrett/docs-contributing-2
Updated developer doc to explain external CLI
Upstream-commit: b59585897709189ccdec5aaa612bc133f2030e24
Component: engine
2017-12-13 12:35:59 +09:00
75b526540d Updated developer doc to explain included static cli and move of cli moby->docker-ce.
Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: b7109162ea5b1ce493144e5ba3116a20fc2fe068
Component: engine
2017-12-13 14:31:34 +11:00
0810853589 Merge pull request #746 from lachlancooper/master
Correct references to --publish long syntax in docs
Upstream-commit: 29ae8cf0e0
Component: cli
2017-12-12 17:31:09 -08:00
ea904b1a94 Fix anchors to "Storage driver options"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 630f8b1254
Component: cli
2017-12-12 17:27:05 -08:00
ee5a10619c Update docs and completion-scripts for deprecated features
- the `--disable-legacy-registry` daemon flag was removed
- duplicate keys with conflicting values for engine labels
  now produce an error instead of a warning.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a119e39f0c
Component: cli
2017-12-12 17:09:38 -08:00
a85f0c817f Merge pull request #35770 from thaJeztah/use-commit-instead-of-version
Use commit-sha instead of tag for containerd
Upstream-commit: a03e7779679043d3aa8acfef47a3554a6703fd38
Component: engine
2017-12-12 18:07:43 -06:00
467a8bb243 Correct references to --publish long syntax in docs
This is the same issue as described at docker/docker.github.io#5370

Signed-off-by: Lachlan Cooper <lachlancooper@gmail.com>
Upstream-commit: 90f44e564b
Component: cli
2017-12-13 10:25:43 +11:00
6959a6fac2 Use commit-sha instead of tag for containerd
The `docker info` command compares the installed version
of containerd using a Git-sha. We currently use a tag for
this, but that tag is not returned by the version-API of
containerd, resulting in the `docker info` output to show:

    containerd version: 89623f28b87a6004d4b785663257362d1658a729 (expected: v1.0.0)

This patch changes the `v1.0.0` tag to the commit that
corresponds with the tag, so that the `docker info` output
does not show the `expected:` string.

This should be considered a temporary workaround; the check
for the exact version of containerd that's installed was needed
when we still used the 0.2.x branch, because it did not have
stable releases yet.

With containerd reaching 1.0, and using SemVer, we can likely
do a comparison for "Major" version, or make this a "packaging"
issue, and remove the check entirely (we can still _print_ the
version that's installed if we think it's usefule).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c8018f4bd7f48bf8f35770dea68f81b9591bb58
Component: engine
2017-12-12 10:43:56 -08:00
aa0cf4fa09 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-12 17:05:27 +00:00
a4823e1268 Merge component 'engine' from git@github.com:moby/moby master 2017-12-12 17:05:22 +00:00
74ffa93aa3 Merge component 'cli' from git@github.com:docker/cli master 2017-12-12 16:41:10 +00:00
5e0f8059c9 Merge pull request #35771 from thaJeztah/fix-flaky-testloTestLogsAPIUntil
Make TestLogsAPIUntil less flaky
Upstream-commit: 1082aa759ebd73971a92a48c6c7b253cf1605ae7
Component: engine
2017-12-12 10:12:35 -06:00
d81d63c977 Legacy images replacement with multi-arch ones on AArch64
Replace those legacy docker images prefixed by 'aarch64/' and 'arm64v8/'
with official multi-arch ones.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 7fc697eb0b62557b4abaa3b9fc0cd44b5c1652ac
Component: engine
2017-12-12 05:47:17 +00:00
ec88074283 Merge pull request #35765 from ghislainbourgeois/35613-update-go-gelf-v2-for-bugfix
Update Graylog2/go-gelf vendoring. Fixes #35613
Upstream-commit: e48e938fc2e7e6c17d96c27e13e4d984ec68a9cb
Component: engine
2017-12-11 21:06:21 -08:00
1aec0724c8 Merge pull request #743 from dnephin/compose-add-name-to-network
Fix external networks in stacks
Upstream-commit: eb5e32e78c
Component: cli
2017-12-11 19:26:55 -08:00
c8a642f128 Make TestLogsAPIUntil less flaky
Commit ee594dcb7d42f95048c9047d86c61447243db3cd removed the
`sleep 0.5` from this test, because sleep has a full-second
precision. However, in some cases, all three log-entries
are output at the same time, causing the `--until` filter
to fail.

This patch adds back a `sleep`, but uses 1 second instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1360f0dc9a5460bccf7974f7718d031435b883f3
Component: engine
2017-12-11 18:28:29 -08:00
35175d99d5 Merge pull request #70 from seemethere/pass_version_static
Pass VERSION to engine static builds
Upstream-commit: 453d9a201fc841ab30ae27246e48f97871b37d95
Component: packaging
2017-12-11 16:15:56 -08:00
5b1b2d3dcf Pass VERSION to engine static builds
VERSION file does not exist anymore for moby/moby so we need to
compensate

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c411321b8870101c227b03e64930260984c862fd
Component: packaging
2017-12-12 00:07:40 +00:00
209f0e3356 Merge pull request #35768 from thaJeztah/fix-healthcheck-typo
Fix typo in log-message
Upstream-commit: b687d6379db06bf0305d75c15f8f0e7f0dbeb921
Component: engine
2017-12-11 17:52:53 -06:00
90cb59fabc Merge pull request #35732 from rhvgoyal/error-info
devmapper: Log fstype and mount options during mount error
Upstream-commit: f5416e76702e8becb34d1e9843d0e2cd0f9f95bf
Component: engine
2017-12-11 14:37:30 -08:00
d586c2cf19 Update Graylog2/go-gelf vendoring. Fixes #35613
Signed-off-by: Ghislain Bourgeois <ghislain.bourgeois@gmail.com>
Upstream-commit: f9f3c49302fc80e586e3cb10af43114929556b47
Component: engine
2017-12-11 15:55:50 -05:00
6c564b6785 Fix vendoring of go-gelf to point to specific commit ID
Signed-off-by: Ghislain Bourgeois <ghislain.bourgeois@gmail.com>
Upstream-commit: 5bc11021250e39e71ca9edf62ce5c33f15c3756f
Component: engine
2017-12-11 15:53:11 -05:00
eae25b27ea Fix typo in log-message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5c3418e38b9603e8ff582d53c2face57f0f01cce
Component: engine
2017-12-11 10:59:51 -08:00
ef0d4a2bec devmapper: Log fstype and mount options during mount error
Right now we only log source and destination (and demsg) if mount operation
fails. fstype and mount options are available easily. It probably is a good
idea to log these as well. Especially sometimes failures can happen due to
mount options.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: f728d74ac5d185adaa5f1a88eadc71217806859f
Component: engine
2017-12-11 13:27:14 -05:00
1e22870b24 Merge pull request #35751 from thaJeztah/disallow-v1-registries
Disallow using legacy (V1) registries
Upstream-commit: 549a2b9bbe757c8cd6d295f51fd67074847b7a94
Component: engine
2017-12-11 10:25:42 -08:00
29bb8562cc Fix external networks
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9da2602f38
Component: cli
2017-12-11 11:29:49 -05:00
ee263ca445 Merge component 'engine' from git@github.com:moby/moby master 2017-12-09 17:04:56 +00:00
099ae9b4b0 Disallow using legacy (V1) registries
Interacting with v1 registries was deprecated in Docker 1.8.3, disabled by default
in Docker 17.06, and scheduled for removal in Docker 17.12.

This patch disallows enabling V1 registry through the `--disable-legacy-registry`
option, and the `"disable-legacy-registry": false` option in the daemon configuration
file. The actual V1 registry code is still in place, and will be removed separately.

With this patch applied:

    $ dockerd --disable-legacy-registry=false
    ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported

Or, when setting through the `daemon.json` configuration file

    $ mkdir -p /etc/docker/
    $ echo '{"disable-legacy-registry":false}' > /etc/docker/daemon.json
    $ dockerd
    ERROR: The 'disable-legacy-registry' configuration option has been removed. Interacting with legacy (v1) registries is no longer supported

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8d6df8a0addc9a37b48c5a1827dd3f65f2ed57cf
Component: engine
2017-12-09 02:24:43 -08:00
1305053a0b Merge pull request #35738 from thaJeztah/bump-api-version
Bump API version to 1.36
Upstream-commit: 3b14e5980ef681c47faf128b5c23cb972fd8851d
Component: engine
2017-12-08 22:18:24 -08:00
fd3779deb1 Update go-swagger installation steps in Dockerfile
The installation steps for go-swagger was a bit noisy, and not consistent with
other installation steps.

This patch makes it similar to other steps, which makes it less noisy, and
makes the image slightly smaller.

Before:

    b53d7aac3200        14 minutes ago      |1 APT_MIRROR=deb.debian.org /bin/sh -c git …   107MB
    fa74acf32f99        2 hours ago         /bin/sh -c #(nop)  ENV GO_SWAGGER_COMMIT=c28…   0B

After:

    6b2454f1a9a5        10 minutes ago      |1 APT_MIRROR=deb.debian.org /bin/sh -c set …   35.2MB
    fa74acf32f99        2 hours ago         /bin/sh -c #(nop)  ENV GO_SWAGGER_COMMIT=c28…   0B

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 29d77acaf8bfb234ee4f0b3db9e28d7410b99d4e
Component: engine
2017-12-08 14:02:32 -08:00
443795270f Merge pull request #35745 from cpuguy83/fix_test_sleep
Remove uneeded sleep in test bash loop
Upstream-commit: 967224c254884d6659ad7ec66bdd9da1b4c7d49f
Component: engine
2017-12-08 14:24:05 -06:00
5b48c4106b gitutils: remove checkout directory on error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4ea320cb8ef71c2fc9ee391e2e8be915ba99b17e
Component: engine
2017-12-08 11:58:13 -08:00
6f58b7f1de Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-08 17:04:13 +00:00
16d5b20e33 Merge component 'engine' from git@github.com:moby/moby master 2017-12-08 17:04:08 +00:00
6fdef05177 Merge component 'cli' from git@github.com:docker/cli master 2017-12-08 16:41:35 +00:00
27e78af99a Merge pull request #35567 from huangyanhong/hyhdocker
modify log in order to be same below
Upstream-commit: c7256dc38ed8fe5a428c85002a674c19754d8dd3
Component: engine
2017-12-08 16:30:51 +01:00
141bc0558d Remove uneeded sleep in test bash loop
This sleep probably doesn't work because sleep typically takes only
whole numbers, to do < 1s you need to use usleep. It also is not really
needed as the loop has a very low bound that will not eat up too much
CPU.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ee594dcb7d42f95048c9047d86c61447243db3cd
Component: engine
2017-12-08 09:25:55 -05:00
cd7f41a503 replace all '-' in version when generate rpm version
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
Upstream-commit: 39c434fb36f66803b107ad410dec6b06875bfe97
Component: packaging
2017-12-08 17:47:43 +08:00
04040622fb Merge pull request #741 from thaJeztah/bump-version
Bump version to 18.01-dev
Upstream-commit: 29d3510d50
Component: cli
2017-12-08 09:04:04 +01:00
7b0f6565c5 Merge pull request #35720 from ripcurld0/weboscket_debug
Add a debug message when client closes websocket attach connection
Upstream-commit: 9f5540f672e618667a8a3f185193232cc4d52617
Component: engine
2017-12-07 16:53:56 -08:00
376d2e9872 Do not terminate on missing build-ids (#68)
Do not terminate on missing build-ids
Upstream-commit: 8457a25900698f1bdef844c22fb19900de1a5bc7
Component: packaging
2017-12-07 16:11:20 -08:00
6edf75f3d5 Do not terminate on missing build-ids
Relates to an upgrade in `rpm` to `14.4.0`, where missing build-ids now
cause builds to self-terminate. May be needed in other distros if/when
the `rpm` package is updated in those repos.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: dcd681da54f2c2b2286cc09d053dd6cb865d3f98
Component: packaging
2017-12-07 23:56:30 +00:00
782ef5e9db Merge pull request #35680 from javabrett/docs-contributing
Changed go vendor from moby/moby to docker/docker in dev docs.
Upstream-commit: 8fe0a759f72442d7582c4453e6306822c53224bf
Component: engine
2017-12-07 15:04:28 -08:00
fd25684fc8 Defaults Makefile VERSION variable to 0.0.0-dev (#67)
When building we should default to a dummy version unless otherwise
specified so we don't get ourselves confused over what is official and
what is not.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: ffcd040b5c3bd4f81e1d1f11c32f9bb81e235ed1
Component: packaging
2017-12-07 14:25:41 -08:00
94fbfde561 gitutils: fix checking out submodules
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a6025255246aab21426a51986b7d138a14d9ac90
Component: engine
2017-12-07 14:25:19 -08:00
c3b54b0b2b Bump version to 18.01-dev
The 17.12.0-rc1 release was cut-off from commit
ace5417954

This patch bumps the version to 18.01-dev to
indicate that any change is now for the upcoming
18.01 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c4875264a3
Component: cli
2017-12-07 13:58:06 -08:00
17ee87b9ed Bump API version to 1.36
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c1e982f2ee85580687e2d355af3ca444ada14d01
Component: engine
2017-12-07 13:52:49 -08:00
4ef94db1ce Merge pull request #35724 from thaJeztah/update-api-changelog
Update API version-history for 1.35
Upstream-commit: 1056d554c5da5d959b551f32ba34a3e2cffd61b2
Component: engine
2017-12-07 09:35:01 -08:00
90f62259ac Merge pull request #35733 from mlaventure/update-mlaventure-details
Update mlaventure email
Upstream-commit: 268226e5461991ed12a5a02d8c5fdd25b120eab0
Component: engine
2017-12-07 09:33:46 -08:00
4343c7deaa Merge component 'engine' from git@github.com:moby/moby master 2017-12-07 17:04:36 +00:00
43ace3ab68 Update mlaventure email
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 2ba8ce708727578752d9838d9c4db945cd008792
Component: engine
2017-12-07 08:41:20 -08:00
b8eda642a7 Splunk: limit the reader size on error responses
Before this patch, if a splunk endpoint returned a non-OK status, the
splunk driver would read the entire response body. This could lead to
excessive memory allocations. Instead put a cap on the amount the driver
will read from the response body.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7f14542ddd1401de734be3ac0331c0ada941c959
Component: engine
2017-12-07 11:22:58 -05:00
6a7f05996f Merge pull request #35728 from tonistiigi/vendor-archive
vendor: update archive/tar
Upstream-commit: 72a37709ade3de1091d208d24ddab0e1168aa5d3
Component: engine
2017-12-06 20:50:27 -08:00
090ce73a5d Changed go vendor from moby/moby to docker/docker in dev docs.
If there is a package-rename forthcoming, it isn't currently evident on master, but seems to show in doc.
Changed doc to show actual docker/docker paths as they occur now instead of moby/moby.

Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: 355cf9483c1b8ede5ae3ed50add4de2a69d62645
Component: engine
2017-12-07 14:06:24 +11:00
704b884e52 Merge component 'engine' from git@github.com:moby/moby master 2017-12-07 02:18:48 +00:00
74dc65818c vendor: update archive/tar
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 13954b0a6282d919c91626a23967377c19ee7aa2
Component: engine
2017-12-06 18:02:45 -08:00
521d1c4f0b Merge component 'cli' from git@github.com:docker/cli master 2017-12-07 01:55:54 +00:00
9b5e4afbf7 Merge pull request #35698 from anshulpundir/vndr
Vendor swarmkit to 4429c763
Upstream-commit: a023a599913439f0a08adffc3f242ce187fd8bdd
Component: engine
2017-12-06 17:53:46 -08:00
c6d5cb9ce0 Merge pull request #35589 from keloyang/close-fd
Close pipe in chrootarchive.invokeUnpack when cmd.Start()/json.NewEncoder failed
Upstream-commit: cefb33700cf0931a6e3f9ea2cb0a122148d10e49
Component: engine
2017-12-06 17:48:02 -08:00
d7a82cda3b Merge pull request #736 from tiborvass/platform-version
Add platform and its components to docker version output
Upstream-commit: ace5417954
Component: cli
2017-12-06 17:31:05 -08:00
b8234e6bfc Sort component details in template
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7138d6e301
Component: cli
2017-12-07 02:04:10 +01:00
aa9a4c4bff Add platform and its components to docker version output
The Server section of version output is now composed of an Engine
component and potentially more, based on what the /version endpoint
returns.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5f4c5f8bb6
Component: cli
2017-12-07 02:04:10 +01:00
29d0c2b494 vendor moby api to get new version types
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: fe3941af7d
Component: cli
2017-12-07 02:04:10 +01:00
96784302eb Merge pull request #35705 from tiborvass/platform-version
api: generalize version information to any platform component
Upstream-commit: a1be987ea9e03e5ebdb1b415a7acdd8d6f0aaa08
Component: engine
2017-12-06 16:43:38 -08:00
6046d5cbe8 Merge pull request #35677 from fcrisciani/netdb-debug-tool
Netdb debug tool
Upstream-commit: 58dec54d1ffef1ac989399acf3b8e107aa55c2a2
Component: engine
2017-12-06 16:30:11 -08:00
c3ea8d4b44 Merge pull request #726 from albers/completion-log-opt-line-only
Add bash completion for `--log-opt line-only`
Upstream-commit: 8053cf67e0
Component: cli
2017-12-06 16:04:26 -08:00
499d1359a4 Merge pull request #730 from BretFisher/729-fix-zsh-node-and-stack-names
Fixing zsh column finding in nodes and stacks.
Upstream-commit: 143f9f0336
Component: cli
2017-12-06 16:03:20 -08:00
9b7822f4af Update API version-history for 1.35
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8a9d926b553345be530ddc51374c9817fcbea784
Component: engine
2017-12-06 15:02:10 -08:00
00a55a319d Fix windows
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: cb8283a6e95f33a93fab0044ca4306cf468faf8c
Component: engine
2017-12-06 23:23:55 +01:00
947ed56f66 Adjust swagger definitions
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 87ebfa11f66d2109054ad3024217a5101b45aa8c
Component: engine
2017-12-06 23:23:55 +01:00
3916dafe17 api: generalize version information to any platform component
This change adds a Platform struct with a Name field and a general
Components field to the Version API type. This will allow API
consumers to show version information for the whole platform and
it will allow API providers to set the versions for the various
components of the platform.

All changes here are backwards compatible.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9152e63290e4a4e586b811cce39082efc649b912
Component: engine
2017-12-06 23:23:55 +01:00
e8e8613267 Merge pull request #35514 from thaJeztah/disable-overlay-without-d_type
Remove support for overlay/overlay2 without d_type
Upstream-commit: bd8a9c25ee257384ca24cf32e61b6b0ef71f521d
Component: engine
2017-12-06 14:13:58 -08:00
9d2c3018e2 Merge pull request #733 from thaJeztah/sync-runc
Bump runc to b2567b37d7b75eb4cf325b77297b140ea686ce8f
Upstream-commit: ddec67c34e
Component: cli
2017-12-06 16:46:33 -05:00
7661258841 Merge pull request #35721 from dnephin/fix-swagger-spec-errors
Fix codegen problems in swagger spec
Upstream-commit: 7f4cf43637067d27a1035d4ff412710ead82bbab
Component: engine
2017-12-06 13:36:52 -08:00
dced91d6f0 Merge pull request #734 from shin-/schema_35_build_shm_size
Add shm_size property to build configuration in Compose schema
Upstream-commit: 4a4db7f20c
Component: cli
2017-12-06 13:35:14 -08:00
02ebcae82d Merge pull request #35146 from masaeedu/27919-removemultitypes
Change multi-type parameters to single type
Upstream-commit: 7db57f7fcac33583403d1d4ccf52b1c27f7e0ad1
Component: engine
2017-12-06 16:22:17 -05:00
da56fc4967 Vendoring netlink library
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 2e75d329773920713e63049ad1a00dfb64abf3c0
Component: engine
2017-12-06 13:19:57 -08:00
8afbe15ccf Vendoring of libnetwork
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: c1e1fb6fa5204bb7014ca9ebab9fe1804c1eb957
Component: engine
2017-12-06 13:19:56 -08:00
4d38282082 Add option to enable networkDB debug
Add a new configuration option to allow the enabling
of the networkDB debug. The option is only parsed using the
reload event. This will protect the daemon on start or restart
if the option is left behind in the config file

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: a97e45794ea8318a08daf763a5b63b04184a886b
Component: engine
2017-12-06 13:19:47 -08:00
f0f2c2b953 Add missing additionalProperties marker on mount definitions
Signed-off-by: Joffrey F <joffrey@docker.com>
Upstream-commit: 88bbaca294
Component: cli
2017-12-06 12:37:38 -08:00
31d8edcd80 Add shm_size property to build configuration in Compose schema
Signed-off-by: Joffrey F <joffrey@docker.com>
Upstream-commit: e49f14cf36
Component: cli
2017-12-06 12:34:12 -08:00
a505f09c7f Validate/sanitize swarmkit spec name.
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
Upstream-commit: 739c4cc6b2bab5c3e27656e0a95d858901ecf6b4
Component: engine
2017-12-06 11:55:04 -08:00
c9781de504 Bump runc to b2567b37d7b75eb4cf325b77297b140ea686ce8f
To match what's used in Moby

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 669b8507be
Component: cli
2017-12-06 11:09:36 -08:00
0aafcdcf36 Merge pull request #732 from ndeloof/8917
closes #8917 introduce `—workdir` option for docker exec
Upstream-commit: 86653f4d57
Component: cli
2017-12-06 10:51:33 -08:00
8f42e63aa7 Merge pull request #711 from dnephin/compose-add-name-to-network
Support network.name in the compose schema
Upstream-commit: 30755cf340
Component: cli
2017-12-06 10:44:03 -08:00
3ef7b79d93 Fix codegen problems in swagger spec
Code generation does't support multiple types

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3648d883556e59392e3e5a05ef5de1b56b68c6fc
Component: engine
2017-12-06 13:38:45 -05:00
7b947af7df update docker/docker for ExecConfig WorkingDir support
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 798ec76223
Component: cli
2017-12-06 19:04:42 +01:00
8f8bda1238 Merge pull request #35708 from schomatis/fix-set-up-dev-env-link
Fix link in Contributing doc
Upstream-commit: d9dbca2e19bde080f9485dc8973e9e6d571e2ee3
Component: engine
2017-12-06 10:04:01 -08:00
378c0c6887 Merge component 'engine' from git@github.com:moby/moby master 2017-12-06 17:04:14 +00:00
4a137d3ed6 Annotate worker option for 1.35 API
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 8dc88ea7b5
Component: cli
2017-12-06 17:24:01 +01:00
d02e9392a1 Because the option takes an argument, a special treatment is required in the preceding case
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: da6b8cb5de
Component: cli
2017-12-06 17:24:01 +01:00
5deca4bbe1 introduce —workdir option for docker exec
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 591a1273fd
Component: cli
2017-12-06 17:24:01 +01:00
c898dfbd95 Support network.name in the compose schema.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d0b8aa7701
Component: cli
2017-12-06 10:05:24 -05:00
1be15401b4 Add a debug message when client closes websocket attach connection
When the client closes websocket connections that sends container
output through websocket, an error message is displayed:
"Error attaching websocket: %!s(<nil>)"

This message is misleading. Thus, this change suggests to check
if error is nil and print the correct message accordingly.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 8f65bb6d90e3a95420bb634e415c3cce36d86201
Component: engine
2017-12-06 16:57:41 +02:00
928454da48 Merge pull request #35714 from jhhwang4195/master
fixed typo (reliablity -> reliability)
Upstream-commit: 040033b89a201c8bb28fb847db994481d4a7f401
Component: engine
2017-12-06 06:00:54 -06:00
41a5926818 Merge pull request #35661 from ndeloof/8917
introduce `workingdir` option for docker exec
Upstream-commit: 5e5fadb3c0201553929d4a6ea8dc8f9d8a1e56fe
Component: engine
2017-12-06 12:40:25 +01:00
1ffad27f0c Merge pull request #35376 from KingEmet/master
Permit a broader range of errors from mirror endpoints when determining whether to fall back
Upstream-commit: 4055bfb3d3031de7077406ddf0f7e529c47852a9
Component: engine
2017-12-06 01:23:00 -08:00
2990f42efe test case to check « exec » works as expected
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 39d5ace6e1c8f3f7a008fcdf328592bfa799a243
Component: engine
2017-12-06 07:42:57 +01:00
8d97955cea Merge pull request #35603 from ericsoderstrom/master
Update docs to reflect working directory name change.
Upstream-commit: a235469f456d6eb869b98c6ede19f2a0763d5580
Component: engine
2017-12-06 10:15:16 +09:00
0ec86524ed fixed typo (reliablity -> reliability)
Signed-off-by: Jihyun Hwang <jhhwang@telcoware.com>
Upstream-commit: 518c50c9b21225ee991d5147cccb687ea8640afc
Component: engine
2017-12-06 09:51:53 +09:00
70c95e6ecb Change TestSwarmServiceTTY to only verify running containers since with swarmkit#b187b24 service deletions/scale-downs don't directly remove the container.
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
Upstream-commit: c5c779adc8c207cfb77a9115450f3e4f1783b26e
Component: engine
2017-12-05 14:51:14 -08:00
e96b772de5 Swarmkit vendoring.
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
Upstream-commit: 9fdbb32fcee24410c64c7897c0d9667202aa7e4f
Component: engine
2017-12-05 14:27:49 -08:00
52db2af288 Merge component 'engine' from git@github.com:moby/moby master 2017-12-05 22:20:02 +00:00
8024cf3175 Merge pull request #35695 from boucher/upgrade-criu
Update CRIU version in the shell Dockerfile
Upstream-commit: c7dd58ffbf268680653b2905f6cd08a1eaf4d9c8
Component: engine
2017-12-05 15:49:02 -06:00
dfe161a946 Merge pull request #35707 from crosbymichael/ctd-1.0
Update to containerd v1.0.0
Upstream-commit: 7a14e267d6496b4843aca6170876e7cf53d71f58
Component: engine
2017-12-05 14:02:23 -06:00
cf5224adb2 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-05 19:13:46 +00:00
8ca0b6eb11 Merge component 'engine' from git@github.com:moby/moby master 2017-12-05 19:13:41 +00:00
9ece0a8dbe Merge pull request #35700 from cpuguy83/plugin_store_rm_test
Add test to check for plugin mounts on remove
Upstream-commit: 27506b353002a2263e753f267e130f133b12c0fc
Component: engine
2017-12-05 10:54:04 -08:00
a394769cf9 Merge component 'cli' from git@github.com:docker/cli master 2017-12-05 18:48:42 +00:00
a369ceccde Merge pull request #724 from dungeonmaster18/723-auto-complete-command
Added auto complete command for fluentd-sub-second-precision.
Upstream-commit: ea854237aa
Component: cli
2017-12-05 10:29:39 -08:00
4d1f5d1e42 Merge pull request #35529 from dungeonmaster18/subsecond-precision-config
Added SubSecondPrecision to config option.
Upstream-commit: 3461289bf0e9147afc88cd829acc0bb8b64e1053
Component: engine
2017-12-05 10:14:14 -08:00
abf2603ea4 Fix link in Contributing doc
Signed-off-by: Lucas Molas <lmolas@fundacionsadosky.org.ar>
Upstream-commit: 1f0572fd1a28d2b5b4566156fa449bb709362b38
Component: engine
2017-12-05 12:31:02 -03:00
d27e345310 Fix event filters
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a27abc619cc18ead61fa89f652871fac1b318658
Component: engine
2017-12-05 09:55:33 -05:00
e1f6e66d66 Update containerd to v1.0.0
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 18a53d03740220aa72e454929ad1d1d6b695888e
Component: engine
2017-12-05 09:44:42 -05:00
12e67ce519 Added SubSecondPrecision flag in fluentd logger
Signed-off-by: dungeonmaster18 <umesh4257@gmail.com>
Upstream-commit: a1ebda09bab5bf22d96a15e71618c4a0ac08bb55
Component: engine
2017-12-05 17:21:57 +05:30
a5a325a05f Fixing zsh column finding in nodes and stacks.
Signed-off-by: Bret Fisher <bret@bretfisher.com>
Upstream-commit: 8b6d6fa974
Component: cli
2017-12-05 01:03:25 -05:00
dfd519caff Add test to check for plugin mounts on remove
Ensures that when a plugin is removed that it doesn't interfere with
other plugins mounts and also ensures its own mounts are cleaned up.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5017b5bef55c31db4c04c8058ef7db8597b11341
Component: engine
2017-12-04 22:01:14 -05:00
0c8a47d019 Allow existing setups to continue using d_type
Even though it's highly discouraged, there are existing
installs that are running overlay/overlay2 on filesystems
without d_type support.

This patch allows the daemon to start in such cases, instead of
refusing to start without an option to override.

For fresh installs, backing filesystems without d_type support
will still cause the overlay/overlay2 drivers to be marked as
"unsupported", and skipped during the automatic selection.

This feature is only to keep backward compatibility, but
will be removed at some point.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a4e793a3da9ba6d20bccfb83f7c48e20a76d895
Component: engine
2017-12-04 18:41:25 -08:00
327b80ad82 Merge pull request #35537 from sargun/vfs-use-copy_file_range
Have VFS graphdriver use accelerated in-kernel copy
Upstream-commit: 4047cede65862aa0ea5616297d7c0f3b12526ad4
Component: engine
2017-12-04 19:34:56 -06:00
e4dde67875 Remove support for overlay/overlay2 without d_type
Support for running overlay/overlay2 on a backing filesystem
without d_type support (most likely: xfs, as ext4 supports
this by default), was deprecated for some time.

Running without d_type support is problematic, and can
lead to difficult to debug issues ("invalid argument" errors,
or unable to remove files from the container's filesystem).

This patch turns the warning that was previously printed
into an "unsupported" error, so that the overlay/overlay2
drivers are not automatically selected when detecting supported
storage drivers.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0abb8dec3f730f3ad2cc9a161c97968a6bfd0631
Component: engine
2017-12-04 17:10:20 -08:00
403fcf5047 Perform fsmagic detection on driver's home-dir if it exists
The fsmagic check was always performed on "data-root" (`/var/lib/docker`),
not on the storage-driver's home directory (e.g. `/var/lib/docker/<somedriver>`).

This caused detection to be done on the wrong filesystem in situations
where `/var/lib/docker/<somedriver>` was a mount, and a different
filesystem than `/var/lib/docker` itself.

This patch checks if the storage-driver's home directory exists, and only
falls back to `/var/lib/docker` if it doesn't exist.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f9c8fa305e1501d8056f8744cb193a720aab0e13
Component: engine
2017-12-04 17:10:07 -08:00
8a469be8e0 fix golint errors
Signed-off-by: Jake Sanders <jsand@google.com>
Upstream-commit: e04375fb8c2f08da158cce21c1591d39d2e68242
Component: engine
2017-12-04 16:44:03 -08:00
cf1d97228e Merge pull request #65 from seemethere/fix_debian_jessie_aarch64
Adds libudev-dev to jessie aarch64 build
Upstream-commit: 6e901d8febcb7c308035952baa760779ab097806
Component: packaging
2017-12-04 16:33:41 -08:00
6ada520445 Update CRIU github repository
Signed-off-by: Ross Boucher <rboucher@gmail.com>
Upstream-commit: f01d2029bbee7327b324ee501a97100ad5506fbf
Component: engine
2017-12-04 18:51:08 -05:00
57c8d64422 Adds libudev-dev to jessie aarch64 build
Failed out otherwise:

```
---> Making bundle: dynbinary (in bundles/dynbinary)
Building: bundles/dynbinary-daemon/dockerd-17.09.0-dev
Package libudev was not found in the pkg-config search path.
```

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 4d8e8855d1008f4705ea6db17e5cd5bc90bd2d81
Component: packaging
2017-12-04 23:36:16 +00:00
2ee063b98e CRIU needs a newer version to work with the updates pulled in by containerd 1.0
Signed-off-by: Ross Boucher <rboucher@gmail.com>
Upstream-commit: 7ffae3d51a452a63c49f8544953a8b0f9781a5e0
Component: engine
2017-12-04 17:45:04 -05:00
7287b1b196 Merge pull request #64 from seemethere/jenkinsfile_label
Change label to one that actually exists
Upstream-commit: 1991b032cb64827c595ad652e6b94b2e49402527
Component: packaging
2017-12-04 13:49:36 -08:00
f28070bdef Merge pull request #35693 from crosbymichael/ctd-rc0
Update containerd to rc0 +
Upstream-commit: 20a42b1f5616b07df524965383528711d24cf6ea
Component: engine
2017-12-04 16:49:29 -05:00
a9ea77004e Change label to one that actually exists
Seems `docker-edge` was removed as label on jenkins.dockerproject.org.

This removes that label and just puts the x86_64 label

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 6765382587e31a93b1e65d2d169b00a42d183ee2
Component: packaging
2017-12-04 21:48:42 +00:00
8d18b0cfab Merge pull request #704 from albers/completion--platform
Add bash completion for `--platform`
Upstream-commit: 83cdc0f1bd
Component: cli
2017-12-04 13:19:37 -08:00
d76f409f13 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-04 21:07:48 +00:00
f70de4cf86 Merge component 'engine' from git@github.com:moby/moby master 2017-12-04 21:07:45 +00:00
8f588eed28 Add aarch64 support (#35)
* add aarch64 support

* use go 1.9 for arm64 support

* fixtypo

* add backports on jessie

* fix path

* delet yakkety

* rm golang-go

* use arm64v8/ images

* fix error made in merge

* remove double architecture

* use arm64v8/

* use go 1.8.5

* Update aarch64 builds to 1.9.2

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 03eac425534002445e666ce0352f1c666151dc89
Component: packaging
2017-12-04 11:53:11 -08:00
a017ada68b Don't append the container id to custom directory checkpoints. Fixes #34601.
Signed-off-by: Ross Boucher <rboucher@gmail.com>
Upstream-commit: e51aec992624fec305176866f3937e0a120cecb8
Component: engine
2017-12-04 14:24:35 -05:00
8b1197a568 Fix nonewmountns for containerd options
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 97b0a9d5f195c7daf16cf9dcfb6c4d62044163fe
Component: engine
2017-12-04 14:17:30 -05:00
08c25433ac Bump containerd to cc969fb42f427a68a8cc6870ef47f17
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: ad2b34f2056ca7d6edab17967a797fb19bf4ed5a
Component: engine
2017-12-04 14:14:42 -05:00
cbec60ecae Merge pull request #35687 from tiborvass/add-derek-bot
project: try alexellis/derek bot to manage PRs and issues
Upstream-commit: d94164867c2df977ceb8d9df3d90364d0a682d05
Component: engine
2017-12-04 09:54:02 -08:00
d47afe4a42 project: try alexellis/derek bot to manage PRs and issues
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 123cb9590739a517caa6821a92d9becb2f723547
Component: engine
2017-12-04 16:11:41 +01:00
14e1e40a4e Add bash completion for --log-opt line-only
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0798d71f38
Component: cli
2017-12-04 10:05:37 +01:00
c05aa2cc73 Minor bash completion improvements/fixes
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 53376b60c6
Component: cli
2017-12-04 09:33:14 +01:00
8583ba4a32 Improve bash completion for images
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5ee3b9b461
Component: cli
2017-12-04 09:33:14 +01:00
c4fbbf057e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-12-04 06:57:03 +00:00
47fdbea6d3 Merge component 'engine' from git@github.com:moby/moby master 2017-12-04 06:57:00 +00:00
bf78150b9b Merge pull request #35600 from nictuku/go_option
Set a go_package on api/types/swarm/runtime to make it Bazel compatible
Upstream-commit: 7ef9266ba090a3230355c39352dddf41aeb5b726
Component: engine
2017-12-01 17:30:12 -08:00
31daed866f Merge pull request #62 from andrewhsu/al
no need to detect arch for alpine image
Upstream-commit: 33ee027e04a43651f953bbc080eb020b84fd53cc
Component: packaging
2017-12-01 15:42:51 -08:00
b2d74e0a1a Merge pull request #63 from andrewhsu/j
set VERSION when building packages
Upstream-commit: d467fd1d6abc13be714896f89218a8e6ca047162
Component: packaging
2017-12-01 15:42:33 -08:00
395b31b896 no need to detect alpine image
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 1b5ac32b06cb05ee61ea1b72e2147e983194ea73
Component: packaging
2017-12-01 15:39:00 -08:00
7534a636c1 Merge pull request #60 from andrewhsu/192
use golang 1.9.2
Upstream-commit: ca48d4109ee2326ed16bbcedfdd8691747b252ab
Component: packaging
2017-12-01 15:35:18 -08:00
469adac6a0 set VERSION when building packages
Setting to something that will not be confused with a version number
that will ever be released. Also, this is required for the deb packages
to build properly

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 0de78bd1251958a9d8916c3944b8f51d0ffb49b7
Component: packaging
2017-12-01 15:19:41 -08:00
9b80ff5665 use pre-compiled golang arm64 toolset
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 30c250b285e758b295e010eee64b726cdac0e7be
Component: packaging
2017-12-01 14:56:19 -08:00
5016fee3dc Merge pull request #35578 from thaJeztah/fix-portbindings-swagger
Fix PortBindings definition in Swagger
Upstream-commit: ac68411f85a1c4540c0d4f5b7db86b0b0422f025
Component: engine
2017-12-01 17:46:38 -05:00
9a7838eb22 Merge pull request #35422 from pradipd/lbfix
Move load balancer sandbox creation/deletion into libnetwork
Upstream-commit: 4bb2c2402df88f0e3e8c47499fc2de5182719e00
Component: engine
2017-12-01 14:08:48 -08:00
29875cbb85 use golang 1.9.2
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 0c04ba6701d462b173ed63bdcd9a55c0e95d8ce1
Component: packaging
2017-12-01 13:59:10 -08:00
f1232b72bc Merge pull request #61 from seemethere/fix_jenkinsfile
Make Jenkinsfile actually function
Upstream-commit: b53c9642495f3c09e2c95791ab6108fe8733fe2b
Component: packaging
2017-12-01 13:58:39 -08:00
3cd9275696 Make directory references absolute
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: bca63242a9c166a944619019da6e0b50f03b4233
Component: packaging
2017-12-01 21:52:00 +00:00
b63d8b8465 Remove fancy github context notifiers
They don't function correctly and they're not worth it

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 3f5a6f288ad7e134abb4ac99e56cbbca17bfae88
Component: packaging
2017-12-01 21:47:49 +00:00
f1cfd038e2 zfs: fix ebusy on umount
This commit is a set of fixes and improvement for zfs graph driver,
in particular:

1. Remove mount point after umount in `Get()` error path, as well
   as in `Put()` (with `MNT_DETACH` flag). This should solve "failed
   to remove root filesystem for <ID> .... dataset is busy" error
   reported in Moby issue 35642.

To reproduce the issue:

   - start dockerd with zfs
   - docker run -d --name c1 --rm busybox top
   - docker run -d --name c2 --rm busybox top
   - docker stop c1
   - docker rm c1

Output when the bug is present:
```
Error response from daemon: driver "zfs" failed to remove root
filesystem for XXX : exit status 1: "/sbin/zfs zfs destroy -r
scratch/docker/YYY" => cannot destroy 'scratch/docker/YYY':
dataset is busy
```

Output when the bug is fixed:
```
Error: No such container: c1
```
(as the container has been successfully autoremoved on stop)

2. Fix/improve error handling in `Get()` -- do not try to umount
   if `refcount` > 0

3. Simplifies unmount in `Get()`. Specifically, remove call to
   `graphdriver.Mounted()` (which checks if fs is mounted using
   `statfs()` and check for fs type) and `mount.Unmount()` (which
   parses `/proc/self/mountinfo`). Calling `unix.Unmount()` is
   simple and sufficient.

4. Add unmounting of driver's home to `Cleanup()`.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a450a575a672b90f02a4b1d3d9300ce1d70a6311
Component: engine
2017-12-01 13:46:47 -08:00
e57d9082bb Merge pull request #57 from seemethere/add_tests
Adds initial Jenkinsfile
Upstream-commit: 20ac959f7f135b20c45b56d8dd50353a0e3a5e52
Component: packaging
2017-12-01 13:17:46 -08:00
5b5e980ec3 Adds initial Jenkinsfile.
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 31a08611f6b87f71d673ab254471826eed225858
Component: packaging
2017-12-01 21:16:46 +00:00
20a2865e53 Fix setting mtimes on directories
Previously, the code would set the mtime on the directories before
creating files in the directory itself. This was problematic
because it resulted in the mtimes on the directories being
incorrectly set. This change makes it so that the mtime is
set only _after_ all of the files have been created.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: 77a2bc3e5bbc9be3fe166ed8321b7cd04e7bd097
Component: engine
2017-12-01 09:12:43 -08:00
f62beecbb7 Added auto complete command for fluentd-sub-second-precision
Signed-off-by: dungeonmaster18 <umesh4257@gmail.com>
Upstream-commit: d5271568a2
Component: cli
2017-12-01 18:39:41 +05:30
148bfd3114 introduce workingdir option for docker exec
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 19f2749d3906707717aeec9da27c499bcdc07da8
Component: engine
2017-12-01 09:06:07 +01:00
6a8cf843af Merge component 'engine' from git@github.com:moby/moby master 2017-12-01 04:12:05 +00:00
559fcde9d4 Disambiguate mirror -> other endpoint fallbacks from V2 -> V1
Signed-off-by: Jake Sanders <jsand@google.com>
Upstream-commit: 305801f58f22c9a26bc05eaa800e399afb212fe3
Component: engine
2017-11-30 20:01:03 -08:00
5f26edda74 Merge component 'cli' from git@github.com:docker/cli master 2017-12-01 03:52:40 +00:00
b611814dc6 Merge pull request #35628 from ikarpovich/35626-le-line-only-legacy
Logentries line-only logopt fix to maintain backwards compatibility
Upstream-commit: 3a9ab941adcc7a39c3ea8c52e3c215cdddb2fe67
Component: engine
2017-11-30 15:48:56 -08:00
f67476ad43 Merge pull request #35645 from crosbymichael/ctd-10
Update containerd to pre-1.0 rc commit
Upstream-commit: 3eb7314519714e0392a4863d6cd4beb3a4b206e8
Component: engine
2017-11-30 15:22:01 -08:00
b8226cb988 Adding test for creating service multiple times.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 791d88b8538b4949153d346ec738139aa6d15280
Component: engine
2017-11-30 13:03:44 -08:00
19fca6eb66 docker changes corresponding to libnetwork changes.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 41071d6648fe5b4649354e806543b9520af45383
Component: engine
2017-11-30 13:03:30 -08:00
553ad48935 vndr libnetwork 64ae58878fc8f95e4a167499d654e13fa36abdc7
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 7de313ac4ec2084aca6c91efc3124b9dbffc5f1a
Component: engine
2017-11-30 13:02:56 -08:00
a8cf119f39 Merge pull request #35516 from mlaventure/reduce-race-on-exit
Add missing lock in ProcessEvent
Upstream-commit: 9d00efb533d3561220d169a86ca9ff965f9a6b2c
Component: engine
2017-11-30 11:30:51 -08:00
4d4ec05575 Merge pull request #35533 from AliyunContainerService/supress-warning-healthcheck-none
Suppress warning when NONE was set for healthcheck
Upstream-commit: 29d6aef3930bf2ba815e27f4507f035a7fb5ba6c
Component: engine
2017-11-30 11:06:05 -08:00
a620b9f6fd Merge pull request #35496 from cpuguy83/add_timeouts_to_splunk_post
Set timeout on splunk batch send
Upstream-commit: 88e36dcc76c08d13fd83f91fa7dbe4a6ff4c83b8
Component: engine
2017-11-30 09:47:48 -08:00
4a8c6447a6 Merge pull request #719 from vdemeester/test-secret-config-indempotence
Add unit tests on config/secret indempotence in stack deploy
Upstream-commit: 6b63d7b96a
Component: cli
2017-11-30 08:39:56 -08:00
25c006f1cc Fix #512 Bash autocompletion works incorrect with inspect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a2d0b6e122
Component: cli
2017-11-30 17:28:33 +01:00
87f648cd90 Merge pull request #35618 from kolyshkin/mkdir-all
Fix MkdirAll* and its usage
Upstream-commit: 72e45fd54e13256c813fdb39b18e26a0de980733
Component: engine
2017-11-30 11:19:29 -05:00
9d718a77b7 Merge pull request #35614 from mlaventure/remove-exec-bypid
Remove ByPid from ExecCommands
Upstream-commit: edbf7d8ed41a88d34dd9ad249ac94f095e0d3385
Component: engine
2017-11-30 11:17:42 -05:00
d99ad61b69 Update containerd to 6bff39c643886dfa3d546e83a90a5
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: c2cb302d1701e0de35930671f61e5d267fcb3e01
Component: engine
2017-11-30 11:16:25 -05:00
ad76847e4b Update daemon code for containerd API changes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: aa3ce07c41e0da9331f0659f28fed7f35846556c
Component: engine
2017-11-30 09:55:03 -05:00
c4cb5e12ad Logentries line-only logopt fix to maintain backwards compatibility
Changed logic to ignore empty value

Fixes #35626

Signed-off-by: Igor Karpovich <igor@karpovich.me>
Upstream-commit: 27a5b878c149fd70ca1e0beebda58edcc19abc73
Component: engine
2017-11-30 13:03:16 +00:00
9818aadf77 Add unit tests on config/secret indempotence in stack deploy
Related PR : https://github.com/docker/cli/pull/509

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5ed399e588
Component: cli
2017-11-30 09:45:32 +01:00
617fb8ceb7 Merge pull request #702 from albers/completion-log--until
Add bash completion for `logs --until`
Upstream-commit: b45a49c83f
Component: cli
2017-11-30 09:40:08 +01:00
3c7ba9bf1b Add bash completion for --platform
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 15f78417b9
Component: cli
2017-11-30 09:29:15 +01:00
a88b24bfeb Merge pull request #35483 from thaJeztah/disallow-nfs-backing-for-overlay
Disallow overlay/overlay2 on top of NFS
Upstream-commit: bdd9668b489c65eb1ef7272d38ad877ffda2041c
Component: engine
2017-11-29 19:24:58 -08:00
1072fa08f7 Merge pull request #35634 from fcrisciani/fix-net-not-found
Restore error type in FindNetwork
Upstream-commit: e0b3ddd4377b9539e6112e57777f4c7b1d0bfc08
Component: engine
2017-11-29 16:26:26 -08:00
d9f34cfcb3 Update containerd to 59bd1967112885c4d49e510e55701
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5bd902b5cfbb360915b02fc2a787ae9e1c183405
Component: engine
2017-11-29 19:15:14 -05:00
3e4063cddb Merge pull request #35501 from cpuguy83/lock_while_stopping_healthcheck
Fix some issues with locking on the container
Upstream-commit: 3d80a692d146e10282bacc0dd2698ffd32dcdaae
Component: engine
2017-11-30 09:01:31 +09:00
006ed302fe Merge pull request #35527 from thaJeztah/feature-detect-overlay2
Detect overlay2 support on pre-4.0 kernels
Upstream-commit: 11e07e7da6023b872788b1e05f83e147f0984fb2
Component: engine
2017-11-29 13:51:26 -08:00
02055337d8 Merge pull request #694 from riyazdf/trust-inspect
docker trust inspect
Upstream-commit: d921d5cc39
Component: cli
2017-11-29 11:33:53 -08:00
ea17d4a2f5 Restore error type in FindNetwork
The error type libnetwork.ErrNoSuchNetwork is used in the controller
to retry the network creation as a managed network though the manager.
The change of the type was breaking the logic causing the network to
not being created anymore so that no new container on that network
was able to be launched
Added unit test

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 51cea0a53c2fd36832277402e9faac81bfb4abd4
Component: engine
2017-11-29 11:22:57 -08:00
f8c7f6621d Use default inspect formatting, remove omitempty, update docs
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: a9428285f0
Component: cli
2017-11-29 10:52:35 -08:00
b1e7ee7a82 support multiple arguments to trust inspect
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 1eb87cc096
Component: cli
2017-11-29 10:52:34 -08:00
7e9b53fd42 add docker trust inspect command for JSON viewing
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: cd38d39d0d
Component: cli
2017-11-29 10:52:34 -08:00
9b7953e812 Merge pull request #718 from dnephin/fix-e2e-docker-build
Fix e2e build test
Upstream-commit: 1b4f2d3b73
Component: cli
2017-11-29 10:30:31 -08:00
a79583a886 Merge pull request #677 from albers/completion-log-opts
Add new log driver options to bash completion
Upstream-commit: 4f009541cb
Component: cli
2017-11-29 10:01:19 -08:00
fe41a825e2 Merge pull request #678 from albers/completion-build--stream
Add bash completion for experimental `build --stream`
Upstream-commit: c428561b63
Component: cli
2017-11-29 10:00:23 -08:00
264f9d5a4f Merge pull request #701 from albers/completion-trust-sign--local
Add bash completion for `trust sign --local`
Upstream-commit: e5d49c0199
Component: cli
2017-11-29 09:44:53 -08:00
40b8aa0152 Merge pull request #467 from estesp/chown-flag-docs
Add docs for Dockerfile ADD/COPY --chown flag
Upstream-commit: 12765c318f
Component: cli
2017-11-29 09:28:30 -08:00
29f2890225 Fix e2e build test
The build output changed in 17.11

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 16cd84024c
Component: cli
2017-11-29 11:02:40 -05:00
cbde088d23 Merge pull request #716 from vdemeester/bump-go
Bump Go to 1.9.2
Upstream-commit: 8abb266043
Component: cli
2017-11-29 09:42:58 -05:00
1433c3b1eb Bump Go to 1.9.2
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6859a7387b
Component: cli
2017-11-29 09:16:03 +01:00
5a1411dbf0 Merge pull request #35606 from cbirajdar/master
added more awesome and notable women to names-generator.go
Upstream-commit: c8441b186e8bc5d7994a922782cc3b6e2c462893
Component: engine
2017-11-28 21:37:17 -08:00
1901e3d893 Merge pull request #35619 from Microsoft/jjh/testrunservicingcontainer
Disable TestRunServicingContainer on RS4+ builds
Upstream-commit: 99e4eb103d67422ff10809079e2b810cd3dfce99
Component: engine
2017-11-28 21:34:15 -08:00
856222b133 Merge pull request #35620 from fcrisciani/libnetwork-vendoring
Libnetwork vendoring
Upstream-commit: 235c10573612d856300ffeb5c05ac0ca343609a6
Component: engine
2017-11-28 21:11:14 -08:00
bac9dc2670 Merge pull request #35631 from Microsoft/jjh/heightwidth
Windows: Fix width/height swap
Upstream-commit: 29708da9077fc37554bac10b17fe0446bed07af9
Component: engine
2017-11-28 21:02:46 -08:00
87cfb875f7 Merge pull request #34948 from euank/public-mounts
Fix EBUSY errors under overlayfs and v4.13+ kernels
Upstream-commit: 09eb7bcc3624f5bd70135d6d24021b40c1095b46
Component: engine
2017-11-29 12:48:39 +09:00
a0c42a8dee Merge pull request #35622 from asottile/update_integration_cli_docs
Change references from test-integration-cli to test-integration
Upstream-commit: debc1fbee8d86948deed5939bb73f2a175151fb1
Component: engine
2017-11-29 12:47:52 +09:00
7f2221039e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-11-28 18:03:52 -08:00
6be246bf8b Merge component 'engine' from git@github.com:moby/moby master 2017-11-28 18:03:40 -08:00
67203bb69e Merge pull request #429 from RenaudWasTaken/generic-resource
Integrated Generic resource in service create
Upstream-commit: 97b148b440
Component: cli
2017-11-28 18:01:42 -08:00
99c53b25ef Merge component 'cli' from git@github.com:docker/cli master 2017-11-28 17:01:27 -08:00
6d8eeeb431 Merge pull request #35586 from ndeloof/patch-1
`memory` is an int64 (long)
Upstream-commit: 9243c28ba541281eaba43e51658f8dd032679ebc
Component: engine
2017-11-28 16:32:04 -08:00
0569c43fe3 Merge pull request #35632 from anusha-ragunathan/fix-panic
Fix potential panic during plugin set.
Upstream-commit: f943df7d4824424bd648d7a165e89be8a65a952e
Component: engine
2017-11-28 15:50:12 -08:00
877f5d0f1f Fix bug, where copy_file_range was still calling legacy copy
There was a small issue here, where it copied the data using
traditional mechanisms, even when copy_file_range was successful.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: 0eac562281782257e6f69d58bcbc13fa889f1759
Component: engine
2017-11-28 14:59:56 -08:00
608a03b9d5 Have VFS graphdriver use accelerated in-kernel copy
This change makes the VFS graphdriver use the kernel-accelerated
(copy_file_range) mechanism of copying files, which is able to
leverage reflinks.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: d2b71b26604370620630d8d3f35aba75ae474f3f
Component: engine
2017-11-28 14:59:56 -08:00
85f5db8154 Fix copying hardlinks in graphdriver/copy
Previously, graphdriver/copy would improperly copy hardlinks as just regular
files. This patch changes that behaviour, and instead the code now keeps
track of inode numbers, and if it sees the same inode number again
during the copy loop, it hardlinks it, instead of copying it.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: b467f8b2ef21dc2239dcd136a29283ea6c3a0aee
Component: engine
2017-11-28 14:59:56 -08:00
efd7b774aa Detect overlay2 support on pre-4.0 kernels
The overlay2 storage-driver requires multiple lower dir
support for overlayFs. Support for this feature was added
in kernel 4.x, but some distros (RHEL 7.4, CentOS 7.4) ship with
an older kernel with this feature backported.

This patch adds feature-detection for multiple lower dirs,
and will perform this feature-detection on pre-4.x kernels
with overlayFS support.

With this patch applied, daemons running on a kernel
with multiple lower dir support will now select "overlay2"
as storage-driver, instead of falling back to "overlay".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 955c1f881ac94af19c99f0f7d5635e6a574789f2
Component: engine
2017-11-28 13:55:33 -08:00
b7dabb480c Fix potential panic during plugin set.
Plugin config can have Mounts without a 'Source' field. In such cases,
performing a 'plugin set' on the mount source will panic the daemon. Its
the same case for device paths as well. This detects the case and
returns error.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 6572e27df7f3483cfed7a8294c1f6d9cf157809a
Component: engine
2017-11-28 13:06:24 -08:00
2598a6cd6a Added support of Generic resources in compose file
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: 1ff73f867d
Component: cli
2017-11-28 21:52:09 +01:00
6025db4712 Windows: Fix width/height swap
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f11f351ae77e4090f0d80e9cccfd77287b1f6b17
Component: engine
2017-11-28 12:19:46 -08:00
00e6357d85 Disable TestRunServicingContainer on RS4+ builds
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1293303bda56f9f6f5a0d99921a5368e0e527509
Component: engine
2017-11-28 10:29:43 -08:00
405736f2fc Merge pull request #714 from doncicuto/patch-1
Update Flocker plugin link
Upstream-commit: e004dc01d4
Component: cli
2017-11-28 10:20:10 -08:00
77a39cce80 Added support for generic resource update
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: 20a6ff32ee
Component: cli
2017-11-28 18:03:10 +01:00
025793bb76 Added docs for service create
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: 4a6da88f7a
Component: cli
2017-11-28 18:03:10 +01:00
4ba8859964 Added docs for dockerd
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: fe07ca70d6
Component: cli
2017-11-28 18:03:10 +01:00
2eb0bb6fa6 Added Generic Resource tests
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: 51c7cd91cf
Component: cli
2017-11-28 18:03:10 +01:00
6c65651aa2 Updated GenericResource CLI
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: 7ddd5f3434
Component: cli
2017-11-28 18:03:10 +01:00
f62d716bb0 Revendored swarmkit
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: 7843aec98c
Component: cli
2017-11-28 18:03:10 +01:00
a94e4ed04a Merge pull request #35572 from arm64b/big-image-imp-test-aarch64
image: skip the import test on AArch64
Upstream-commit: c307e0ce49d63d1b1f479560955dca3956f005ec
Component: engine
2017-11-28 13:51:15 +01:00
0637acf0b1 Update Flocker plugin link
ClusterHQ shutted down at the end of 2016. It seems that ScatterHQ is a group of ClusterHQ former employees that have forked Flocker. It seems that no code has been commited in the last months but if somebody comes to this Docker page it should be referenced to ScatterHQ.

Signed-off-by: Miguel Angel Alvarez Cabrerizo <doncicuto@gmail.com>
Upstream-commit: 3e6e54a90f
Component: cli
2017-11-28 13:51:08 +01:00
94ae8f10c7 Change references from test-integration-cli to test-integration
Signed-off-by: Anthony Sottile <asottile@umich.edu>
Upstream-commit: b6eed3dca2e57705cb75895cad0b5337c79686d9
Component: engine
2017-11-27 19:01:14 -08:00
016b82fbf3 image: skip the import test on AArch64
The commit '0a13f827a10d3bf61744d9b3f7165c5885a39c5d' introduces an
import test for CVE-2017-14992, it uses a 8GB image to make sure we
don't revert CVE-2017-14992, but unfortunately this test can't finish
in 5-min on AArch64, as a fact, in most cases we have to crate a very
big image to make the test effective on AArch64, but this will result
in a test panic, so now we skip it order to avoid termination of others
tests followed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 6395b8b3dcc43be6750e0d90d9bab0a83e4eb20b
Component: engine
2017-11-28 01:48:49 +00:00
2ddb9ceeba Merge pull request #35528 from thaJeztah/ignore-empty-graphdirs
Skip empty directories on prior graphdriver detection
Upstream-commit: 9ae697167c8b90b40d5248e99a8f0a0fc304637e
Component: engine
2017-11-27 17:37:39 -08:00
bc89af9929 Simplify/fix MkdirAll usage
This subtle bug keeps lurking in because error checking for `Mkdir()`
and `MkdirAll()` is slightly different wrt to `EEXIST`/`IsExist`:

 - for `Mkdir()`, `IsExist` error should (usually) be ignored
   (unless you want to make sure directory was not there before)
   as it means "the destination directory was already there"

 - for `MkdirAll()`, `IsExist` error should NEVER be ignored.

Mostly, this commit just removes ignoring the IsExist error, as it
should not be ignored.

Also, there are a couple of cases then IsExist is handled as
"directory already exist" which is wrong. As a result, some code
that never worked as intended is now removed.

NOTE that `idtools.MkdirAndChown()` behaves like `os.MkdirAll()`
rather than `os.Mkdir()` -- so its description is amended accordingly,
and its usage is handled as such (i.e. IsExist error is not ignored).

For more details, a quote from my runc commit 6f82d4b (July 2015):

    TL;DR: check for IsExist(err) after a failed MkdirAll() is both
    redundant and wrong -- so two reasons to remove it.

    Quoting MkdirAll documentation:

    > MkdirAll creates a directory named path, along with any necessary
    > parents, and returns nil, or else returns an error. If path
    > is already a directory, MkdirAll does nothing and returns nil.

    This means two things:

    1. If a directory to be created already exists, no error is
    returned.

    2. If the error returned is IsExist (EEXIST), it means there exists
    a non-directory with the same name as MkdirAll need to use for
    directory. Example: we want to MkdirAll("a/b"), but file "a"
    (or "a/b") already exists, so MkdirAll fails.

    The above is a theory, based on quoted documentation and my UNIX
    knowledge.

    3. In practice, though, current MkdirAll implementation [1] returns
    ENOTDIR in most of cases described in #2, with the exception when
    there is a race between MkdirAll and someone else creating the
    last component of MkdirAll argument as a file. In this very case
    MkdirAll() will indeed return EEXIST.

    Because of #1, IsExist check after MkdirAll is not needed.

    Because of #2 and #3, ignoring IsExist error is just plain wrong,
    as directory we require is not created. It's cleaner to report
    the error now.

    Note this error is all over the tree, I guess due to copy-paste,
    or trying to follow the same usage pattern as for Mkdir(),
    or some not quite correct examples on the Internet.

    [1] https://github.com/golang/go/blob/f9ed2f75/src/os/path.go

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 516010e92d56cfcd6d1e343bdc02b6f04bc43039
Component: engine
2017-11-27 17:32:12 -08:00
ccb264e334 Libnetwork vendoring
- removed support for Solaris
- networkdb fixed race on node management

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 2e5d5c1d325662ac56de4772e4e1fe3a9c7a2d19
Component: engine
2017-11-27 14:57:45 -08:00
dcbc5aef35 Merge pull request #35612 from ikarpovich/35610-le-line-only
Logentries driver line-only=true []byte output fix
Upstream-commit: c75c45b18858cf34669b43e8cec25f70bd5803ea
Component: engine
2017-11-27 14:33:02 -08:00
44cd9b0708 Remove ByPid from ExecCommands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 6f3e86e906a8955d3dc3ddc2a6be51b17e7a097f
Component: engine
2017-11-27 14:27:40 -08:00
03d850d672 idtools.MkdirAs*: error out if dir exists as file
Standard golang's `os.MkdirAll()` function returns "not a directory" error
in case a directory to be created already exists but is not a directory
(e.g. a file). Our own `idtools.MkdirAs*()` functions do not replicate
the behavior.

This is a bug since all `Mkdir()`-like functions are expected to ensure
the required directory exists and is indeed a directory, and return an
error otherwise.

As the code is using our in-house `system.Stat()` call returning a type
which is incompatible with that of golang's `os.Stat()`, I had to amend
the `system` package with `IsDir()`.

A test case is also provided.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 2aa13f86f0c9cf3ed58a648a7b1506d4b06f3589
Component: engine
2017-11-27 13:25:44 -08:00
5c33ebfbc1 Merge pull request #33892 from thaJeztah/bump-golang-19
Bump Go to 1.9.2
Upstream-commit: c672fbd69cb2b375011867860b3f46220655d3fe
Component: engine
2017-11-27 11:44:06 -08:00
9a7fb33c58 Merge pull request #35579 from dnephin/fix-layer-dne
Fix layer DNE with duplicate layers
Upstream-commit: 9fe48f081dafbff467643ce1119c7963f57d9ee8
Component: engine
2017-11-27 09:40:54 -08:00
c3f989d26b This fixes casting of log message []byte into string with --log-opt line-only=true
Signed-off-by: Igor Karpovich <igor@karpovich.me>
Upstream-commit: 440e50b6c702b5e13fff9424ef656b6bb6a259f0
Component: engine
2017-11-27 14:26:53 +00:00
249ba5d150 added more awesome and notable women to names-generator.go
Signed-off-by: Chetan Birajdar <birajdar.chetan@gmail.com>
Upstream-commit: 7c50d394808da05ebe40966246ae3c03a443fb1a
Component: engine
2017-11-26 21:40:02 -08:00
d07549fe22 modify log in order to be same below
Signed-off-by: 黄艳红00139573 <huang.yanhong@zte.com.cn>
Signed-off-by: huangyanhong <huang.yanhong@zte.com.cn>
Upstream-commit: fe8bcb1a8e5ab0426822d512df97eebed268dfc4
Component: engine
2017-11-27 08:43:05 +08:00
6b9bdea9e7 Update docs to reflect working directory name change.
Signed-off-by: Eric Soderstrom <ericsoderstrom@gmail.com>
Upstream-commit: f72ece01866ffc1df7c9b33a89ed243c42468bd4
Component: engine
2017-11-26 13:12:16 -08:00
59e5477bf3 Set a go_package on api/types/swarm/runtime to make it Bazel compatible
Signed-off-by: Yves Junqueira <yves.junqueira@gmail.com>
Upstream-commit: 44f61e0f860447e198ca044f1cbdac73c5aa2bbf
Component: engine
2017-11-25 04:26:16 -08:00
01d480da3c duplicate definitions for API response with just an ID
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: d6935a8f1a4003c0b6f1b89a0e28e721d0756ac9
Component: engine
2017-11-24 11:41:04 +01:00
749a92c1a6 schema is missing CanRemove & DetachKeys
example demonstrates they are expected

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 74cb739766e517115c5af9cee2202613661238a0
Component: engine
2017-11-24 11:40:12 +01:00
52ebdfbe5d Close pipe in chrootarchive.invokeUnpack when cmd.Start()/json.NewEncoder failed.
Signed-off-by: y00316549 <yangshukui@huawei.com>
Upstream-commit: f5f8f008608e579e9164647910ef6f976e91e297
Component: engine
2017-11-24 13:41:08 +08:00
c7f0d04c5e Merge pull request #33731 from runcom/rt-fix-update
container: update real-time resources
Upstream-commit: dfe2c023a34de3e1731e789f4344ef4d85070bc6
Component: engine
2017-11-23 18:30:22 -08:00
b02966efb1 Merge pull request #35563 from soccerGB/driveroptionpersist
Added support for persisting Windows network driver specific options …
Upstream-commit: 1f3f111b4577b29613b0ffef8f001679c2a62d6f
Component: engine
2017-11-23 16:31:46 -08:00
a737bf6704 Fix layer DNE with duplicate layers.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 936ef0c4c97737066ae1e028f04b5188022a91b8
Component: engine
2017-11-23 15:41:59 -05:00
8a8ecdb59d Merge pull request #709 from dnephin/e2e-docker-build
Add e2e test for docker build
Upstream-commit: 6476524c74
Component: cli
2017-11-23 13:54:41 -05:00
c34d673f0c Merge pull request #689 from thaJeztah/remove-daemon-subcommand
Remove deprecated "daemon" subcommand
Upstream-commit: 227dfea9e1
Component: cli
2017-11-23 11:10:50 -05:00
12aa8ed3d8 memory is an int64 (long)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 5ad85b1d4d69806754d1814f019b03b57e40d6da
Component: engine
2017-11-23 14:24:43 +01:00
dd75028635 Merge pull request #35576 from tophj-ibm/add-main-to-image-tests
[integration] add main_test for image test
Upstream-commit: fe8aac6f5ae413a967adb0adad0b54abdfb825c4
Component: engine
2017-11-22 14:42:56 -08:00
7830091c4b graphdriver/overlay{,2}: remove 'merged' on umount
This removes and recreates the merged dir with each umount/mount
respectively.
This is done to make the impact of leaking mountpoints have less
user-visible impact.

It's fairly easy to accidentally leak mountpoints (even if moby doesn't,
other tools on linux like 'unshare' are quite able to incidentally do
so).

As of recently, overlayfs reacts to these mounts being leaked (see

One trick to force an unmount is to remove the mounted directory and
recreate it. Devicemapper now does this, overlay can follow suit.

Signed-off-by: Euan Kemp <euan.kemp@coreos.com>
Upstream-commit: af0d589623eff9f8cefced8b527dbd7cf221ce61
Component: engine
2017-11-22 14:32:30 -08:00
cb2dc1cb0b graphdriver/overlay: minor doc comment cleanup
Signed-off-by: Euan Kemp <euan.kemp@coreos.com>
Upstream-commit: 1e214c09524c0cf32c3e8005631bbcf3e1afa506
Component: engine
2017-11-22 14:17:08 -08:00
b88ff8a5c2 container: update real-time resources
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: dca82b9e5c53e96d1e34bec03e78e17feb8d6fdb
Component: engine
2017-11-22 22:21:40 +01:00
db4f5614fc Merge pull request #668 from ilyasotkov/667-secret-config-names
Add "name" field to secrets and configs to allow interpolation in Compose files
Upstream-commit: 8d41ba082b
Component: cli
2017-11-22 13:33:59 -05:00
3ceb534c1b Fix PortBindings definition in Swagger
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a50cf8aa44f2a5abb5900d39008d075d2e8c2850
Component: engine
2017-11-22 17:55:37 +01:00
9f84ce63a5 [integration] add main_test for image test
Adds a main_test for the image integration test, so we can download
frozen images, and clean up after the image test is ran

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: be83f42612e3be42fcd60726d48d7346befc9449
Component: engine
2017-11-22 11:13:32 -05:00
34cc3d6434 Remove duplication for secrets / configs, combine 3.5 loader tests, remove extraneous error call, regenerate schema correctly
Signed-off-by: Ilya Sotkov <ilya@sotkov.com>
Upstream-commit: ec47003ecb
Component: cli
2017-11-22 13:41:16 +02:00
3d2eab6bf0 Add tests for secret.name in compose files.
Signed-off-by: Ilya Sotkov <ilya@sotkov.com>
Upstream-commit: 1f10b31017
Component: cli
2017-11-22 13:18:05 +02:00
2dae51fa3d Add secret.name and config.name in compose.
Signed-off-by: Ilya Sotkov <ilya@sotkov.com>
Upstream-commit: 4f7f3d2f61
Component: cli
2017-11-22 13:18:05 +02:00
26b47c13d1 Merge pull request #35467 from kolyshkin/dup-mnt
Fix "duplicate mount point" when --tmpfs /dev/shm is used
Upstream-commit: d032264e1365a1cea621b7105e1ca521cb4218ef
Component: engine
2017-11-22 12:13:06 +01:00
e56d0513c6 Add journald tag as SYSLOG_IDENTIFIER
Signed-off-by: Vlastimil Zeman <vlastimil.zeman@diffblue.com>
Upstream-commit: ae557f9d85f41e009229d1a33844f06f7ad1fb99
Component: engine
2017-11-22 08:51:23 +00:00
4a5f32be3b Merge pull request #35541 from thaJeztah/remove-deprecated-mkdirallas
Remove uses of deprecated MkdirAllAs(), MkdirAs()
Upstream-commit: 84b1f813a4ada3c19eea84f9e98c56c0768d9da2
Component: engine
2017-11-22 17:49:37 +09:00
e6fc3af770 Added support for persisting Windows network driver specific options over reboot or service restart
Signed-off-by: Cheng-mean Liu <soccerl@microsoft.com>
Upstream-commit: cef1578ac46e02d05c86621505631b3be7ca9d72
Component: engine
2017-11-21 14:11:12 -08:00
86481c358f Merge pull request #35559 from thaJeztah/remove-testutil
Remove unused "testutil" package
Upstream-commit: ce452fb72ffcdb7605ce98bde9302238f47c63c5
Component: engine
2017-11-21 21:00:04 +01:00
605885e518 Bump Go to 1.9.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d6e1cc32d309ee237342975388e729570343a974
Component: engine
2017-11-21 20:57:02 +01:00
7ed4a89d21 Merge pull request #35554 from darrenstahlmsft/RevendorHcsshim
Update hcsshim to v0.6.7 for go1.9 support
Upstream-commit: fb89afb6898fc830b8f660931f54145f85b971c7
Component: engine
2017-11-21 20:55:40 +01:00
6a9797ecaa Add e2e test for docker build
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7adb4c4b1e
Component: cli
2017-11-21 13:24:37 -05:00
b26b223eb7 Fix some issues with locking on the container
- Fix OOM event updating healthchecks and persisting container state
without locks
- Fix healthchecks being updated without locks on container stop

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 972cb4978795029131697bd3b3746e321eec5c13
Component: engine
2017-11-21 12:41:43 -05:00
c9b8719b0b Merge pull request #59 from seemethere/add_f27
Adds packaging for Fedora 27
Upstream-commit: 3519a3532cf9da379db073452a3f55c7d894961a
Component: packaging
2017-11-21 09:39:51 -06:00
a653d42fdb Skip empty directories on prior graphdriver detection
When starting the daemon, the `/var/lib/docker` directory
is scanned for existing directories, so that the previously
selected graphdriver will automatically be used.

In some situations, empty directories are present (those
directories can be created during feature detection of
graph-drivers), in which case the daemon refuses to start.

This patch improves detection, and skips empty directories,
so that leftover directories don't cause the daemon to
fail.

Before this change:

    $ mkdir /var/lib/docker /var/lib/docker/aufs /var/lib/docker/overlay2
    $ dockerd
    ...
    Error starting daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: overlay2, aufs; Please cleanup or explicitly choose storage driver (-s <DRIVER>)

With this patch applied:

    $ mkdir /var/lib/docker /var/lib/docker/aufs /var/lib/docker/overlay2
    $ dockerd
    ...
    INFO[2017-11-16T17:26:43.207739140Z] Docker daemon                                 commit=ab90bc296 graphdriver(s)=overlay2 version=dev
    INFO[2017-11-16T17:26:43.208033095Z] Daemon has completed initialization

And on restart (prior graphdriver is still picked up):

    $ dockerd
    ...
    INFO[2017-11-16T17:27:52.260361465Z] [graphdriver] using prior storage driver: overlay2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1262c57714e694193be6bbcbed83e859dc246c2f
Component: engine
2017-11-21 15:42:04 +01:00
6063e62a1f Remove unused "testutil" package
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 47af9f625d3f9e94729ec5aee4abcce813914d07
Component: engine
2017-11-21 15:09:23 +01:00
d0d7235731 Remove deprecated MkdirAllAs(), MkdirAs()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 38b3af567f676c4c35e80e493aa97b7346ae75e4
Component: engine
2017-11-21 13:53:54 +01:00
9282ca8404 Minor refactor in idtools
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ce66470f5404872db2cbaa7fbd59970700144be2
Component: engine
2017-11-21 13:49:58 +01:00
d4007aa747 Update idtools tests to test non-deprecated functions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9aba019b72611119578ea32adb03fa49f73da522
Component: engine
2017-11-21 13:47:17 +01:00
4e6f892dc4 Merge pull request #708 from dnephin/update-cobra
Update spf13/cobra, fixes usages in generated man pages
Upstream-commit: 2d0e2d22ca
Component: cli
2017-11-21 10:51:25 +01:00
c051f4a135 Merge pull request #35547 from thaJeztah/fix-make-test
Fix "make test" failing on missing "test-unit"
Upstream-commit: dc7ba2ca3ba7abd1aa4dbbcb3c42dace1b6d3545
Component: engine
2017-11-21 10:49:38 +01:00
6e7cb1931d Fix "duplicate mount point" when --tmpfs /dev/shm is used
This is a fix to the following issue:

$ docker run --tmpfs /dev/shm busybox sh
docker: Error response from daemon: linux mounts: Duplicate mount point '/dev/shm'.

In current code (daemon.createSpec()), tmpfs mount from --tmpfs is added
to list of mounts (`ms`), when the mount from IpcMounts() is added.
While IpcMounts() is checking for existing mounts first, it does that
by using container.HasMountFor() function which only checks container.Mounts
but not container.Tmpfs.

Ultimately, the solution is to get rid of container.Tmpfs (moving its
data to container.Mounts). Current workaround is to add checking
of container.Tmpfs into container.HasMountFor().

A unit test case is included.

Unfortunately we can't call daemon.createSpec() from a unit test,
as the code relies a lot on various daemon structures to be initialized
properly, and it is hard to achieve. Therefore, we minimally mimick
the code flow of daemon.createSpec() -- barely enough to reproduce
the issue.

https://github.com/moby/moby/issues/35455

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 1861abdc4a31efad202a5c3d89a895bb7a62799a
Component: engine
2017-11-20 18:48:27 -08:00
69bca6d97b container.NetworkMounts(): don't lookup mounts twice
The code in question looks up mounts two times: first by using
HasMountFor(), and then directly by looking in container.MountPoints.
There is no need to do it twice.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: eab3ac3e70a510b97f9399efd13e3dc01a07c413
Component: engine
2017-11-20 18:48:27 -08:00
63aefcb844 Update hcsshim to v0.6.7 for go1.9 support
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 0bee8049c78c635b8a38064483e4c3c788779345
Component: engine
2017-11-20 16:29:01 -08:00
3cf67e0ba5 Merge pull request #35517 from stevvooe/protect-the-health-status
container: protect the health status with mutex
Upstream-commit: 9de84a78d76ed2ffe386fe21466f7401cf5d2e9d
Component: engine
2017-11-20 21:51:47 +01:00
325141c0ef Merge pull request #35495 from simonferquel/isolation-validation
Added validation of isolation settings on daemon.verifyContainerSettings
Upstream-commit: a9aeb18a0996eed4b3402ba0431269d46f5ad497
Component: engine
2017-11-20 12:09:40 -08:00
276378cfb9 Fix "make test" failing on missing "test-unit"
Commit dbf580be57a4bb854d7ce20d313e3a22ea337be5 removed
this helper script because it's no longer used in CI.

However, the "make test" target in the Makefile still
called this helper, resulting it to fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a17071e88f15625a6be19f80c697ab1c3471381b
Component: engine
2017-11-20 19:12:25 +01:00
408fe754a6 Merge pull request #705 from scipio3000/patch-1
Docs - Typo in volume plugin doc
Upstream-commit: 10e04c4b72
Component: cli
2017-11-20 18:55:51 +01:00
5289d7ae1c Disable adding [flags] to UseLine in man pages
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5b4af39b8d
Component: cli
2017-11-20 12:48:10 -05:00
1da9654cd5 Update spf13/cobra
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c01f642800
Component: cli
2017-11-20 12:42:11 -05:00
454988ca17 Merge pull request #35542 from masaeedu/patch-1
Fix consumes MIME type for NetworkConnect
Upstream-commit: 4f4a0279084921756d2b2157ad272610d7adc0ae
Component: engine
2017-11-20 18:13:26 +01:00
c23d72ffe9 Docs - Typo in volume plugin doc
There is a typo in the `plugins_volume.md#volumedriverpath` section.
The `/VolumeDriver.Path` response (v1) should be `Mountpoint`and not `Mountpoin`.

Signed-off-by: scipio3000 <gunther@gameslabs.net>
Signed-off-by: Günther Jungbluth <gunther@gameslabs.net>
Upstream-commit: e575b8e756
Component: cli
2017-11-20 15:56:09 +01:00
38076c34e8 Added validation of isolation settings on daemon.verifyContainerSettings
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: e6bfe9cdcb32e97f38b53781eb1f9d7bd2ef5971
Component: engine
2017-11-20 10:34:20 +01:00
be9497fbf4 Fix consumes MIME type for NetworkConnect
This route expects `application/json`. Sending a content type header of `application/octet-stream` results in an error.

Signed-off-by: Asad Saeeduddin <masaeedu@gmail.com>
Upstream-commit: 876b32861789a0424557c640622bde47eedd2d98
Component: engine
2017-11-18 22:34:23 -05:00
3acd4904bf Fix TestAttachExitCode
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bace33d7a8
Component: cli
2017-11-17 18:12:48 -08:00
1a65d7d84f attach: Use ContainerWait instead of Inspect
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 66661761d5
Component: cli
2017-11-17 18:12:46 -08:00
23f0e9211c Merge pull request #35522 from kolyshkin/gd-custom
graphdriver: custom build-time priority list
Upstream-commit: edc204b1ffd53252649917fe54daa0b8419ed4ec
Component: engine
2017-11-17 15:48:26 -08:00
e533bd8d7a Merge pull request #35526 from brauner/2017-11-16/docker_xfs_quota_userns
skip xfs quota tests when running in user namespace
Upstream-commit: 8124d21d2ad7666e73551fcc317c109c6a02e122
Component: engine
2017-11-17 13:41:58 -05:00
5ddac3b8e8 Merge pull request #700 from rodolfoortiz/patch-1
Fixed misspelling
Upstream-commit: f6395c848c
Component: cli
2017-11-17 19:20:57 +01:00
efb2ed5d5e Add bash completion for logs --until
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 667dead8b7
Component: cli
2017-11-17 18:45:05 +01:00
afb12468a8 Add bash completion for trust sign --local
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c29459c284
Component: cli
2017-11-17 18:30:38 +01:00
0acfb79b17 Fixed misspelling
Signed-off-by: Rodolfo Ortiz <rodolfo.ortiz@definityfirst.com>
Upstream-commit: c7d8561508
Component: cli
2017-11-17 11:27:49 -06:00
f9712fa620 Merge pull request #426 from simonferquel/service-isolation
--isolation for setting swarm service isolation mode
Upstream-commit: 5e2be6584a
Component: cli
2017-11-17 15:39:43 +01:00
c5471a4a0e Add isolation mode on service update/create and compose files
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 47cf2ea683
Component: cli
2017-11-17 15:31:13 +01:00
7e12c15274 Preparing for compose schema v3.5
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 787e30d57a
Component: cli
2017-11-17 15:30:32 +01:00
94aae8ab65 Skip further checks for quota in user namespaces
Commit 7a1618ced359a3ac921d8a05903d62f544ff17d0 regresses running Docker
in user namespaces. The new check for whether quota are supported calls
NewControl() which in turn calls makeBackingFsDev() which tries to
mknod(). Skip quota tests when we detect that we are running in a user
namespace and return ErrQuotaNotSupported to the caller. This just
restores the status quo.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Upstream-commit: 7e35df0e0484118740dbf01e7db9b482a1827ef1
Component: engine
2017-11-17 12:57:27 +01:00
6937a74b64 Supress warning when NONE was set for healthcheck
Change-Id: I9ebcf49e9e8ac76beb037779ad02ac6020169849
Signed-off-by: Li Yi <denverdino@gmail.com>
Upstream-commit: e987c554c9ff0740b9945e68228b141031bb31c6
Component: engine
2017-11-17 19:43:59 +08:00
3be11a0388 Merge pull request #697 from squeegels/patch-1
Fixed typo under User section
Upstream-commit: d981bfa964
Component: cli
2017-11-17 09:31:06 +01:00
83579492a6 Fixed typo under User section
Signed-off-by: root <root@clientele.co.za>
Signed-off-by: Squeegels <lmscrewy@gmail.com>
Signed-off-by: Squeegels <1674195+squeegels@users.noreply.github.com>
Upstream-commit: 032f676717
Component: cli
2017-11-17 09:47:41 +02:00
0db60dff81 graphdriver: custom build-time priority list
Add a way to specify a custom graphdriver priority list
during build. This can be done with something like

  go build -ldflags "-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper"

As ldflags are already used by the engine build process, and it seems
that only one (last) `-ldflags` argument is taken into account by go,
an envoronment variable `DOCKER_LDFLAGS` is introduced in order to
be able to append some text to `-ldflags`. With this in place,
using the feature becomes

  make DOCKER_LDFLAGS="-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper" dynbinary

The idea behind this is, the priority list might be different
for different distros, so vendors are now able to change it
without patching the source code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 17708e72a7ef29fb1d4b03fbded1c5e4c08105fd
Component: engine
2017-11-16 19:43:34 -08:00
a1c54edb95 container: protect the health status with mutex
Adds a mutex to protect the status, as well. When running the race
detector with the unit test, we can see that the Status field is written
without holding this lock. Adding a mutex to read and set status
addresses the issue.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 7db30ab0cdf072956d2ceda833b7de22fe17655c
Component: engine
2017-11-16 15:04:01 -08:00
884d22e3a4 Merge pull request #695 from mistyhacks/update-service-port-syntax
Add info about new port mapping syntax
Upstream-commit: 0fe5dcd2f2
Component: cli
2017-11-16 17:36:44 +01:00
42bb16a0de Merge pull request #35512 from cpuguy83/replace_plugun_integration_with_unit
Replace vol plugin integration test w/ unit test
Upstream-commit: ab90bc296155f341f8315a265b3c6d8112512db2
Component: engine
2017-11-16 17:35:23 +01:00
4d629f82fb Add missing lock in ProcessEvent
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 6c03aa317404703a300ef25c3b5dc18d8e9cc64c
Component: engine
2017-11-15 19:19:26 -08:00
f78101e94a Add info about new port mapping syntax
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 9ef7caa6fe
Component: cli
2017-11-15 17:58:13 -08:00
e26667240b Merge pull request #693 from eiais/e2e
Add e2e testing for Trust revoke
Upstream-commit: 9022ea549d
Component: cli
2017-11-15 20:39:53 +01:00
ac513c6164 Merge pull request #671 from dnephin/remove-secret-config-duplication
Remove secret/config duplication in cli/compose
Upstream-commit: 801ddee343
Component: cli
2017-11-15 19:29:39 +01:00
9ef2726179 Replace vol plugin integration test w/ unit test
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 00d801dd85b486eb46eff7bd041c33f04e373699
Component: engine
2017-11-15 13:13:22 -05:00
8771152e42 Merge pull request #35429 from dnephin/build-fails-on-long-label
Fix dockerfile parser failing silently on long tokens
Upstream-commit: 7c53e732530642f817c83e1ad303f8f9f7018def
Component: engine
2017-11-15 18:48:50 +01:00
cffc0c967c Merge pull request #35492 from thaJeztah/bump-docker-py
Bump docker-py to 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a
Upstream-commit: a5c679baf66488e89ccf93c2282b96673acbcb0e
Component: engine
2017-11-15 07:31:14 -08:00
55c5f024c9 Merge pull request #35504 from kolyshkin/sep-o2
daemon/graphdriver/register: separate overlay2
Upstream-commit: fa1054843f9a8a32ca33be6b73167069a8344ecf
Component: engine
2017-11-15 09:21:08 -05:00
3647d18f55 Merge pull request #35499 from cpuguy83/erroneous_errors
Cancelation errors should not be logged
Upstream-commit: 7c16e4d41769bcedfd987507ac150f516358a120
Component: engine
2017-11-15 11:34:28 +01:00
ce594a83b1 daemon/graphdriver/register: separate overlay2
Make it possible to disable overlay and overlay2 separately.

With this commit, we now have `exclude_graphdriver_overlay` and
`exclude_graphdriver_overlay2` build tags for the engine, which
is in line with any other graph driver.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d014be5426c869d429c1a11cad9e76321dd7a326
Component: engine
2017-11-15 00:06:00 -08:00
ae3d074947 Cancelation errors should not be logged
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b86746d60d4c43dcadd3b95fc4b2da7c03323d84
Component: engine
2017-11-14 20:32:20 -05:00
005014677c Merge pull request #34896 from cpuguy83/store_labels_when_exists
Create labels when volume exists only remotely
Upstream-commit: f62aeae97791b4c2318791a9b621d7da4c17ac32
Component: engine
2017-11-14 17:05:40 -08:00
6ad432f442 Merge pull request #35482 from stevvooe/protect-health-monitor-channel
container: protect health monitor channel
Upstream-commit: e4d0fe84f9ea88b0e0cfd847412c9f29442cc62d
Component: engine
2017-11-14 11:25:14 -08:00
8b37566333 Adds packaging for Fedora 27
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: ca096b9620cf1d8c1d0a34f052e3a3d33840fab3
Component: packaging
2017-11-14 19:13:47 +00:00
cf38fd827e Merge pull request #74 from jamiehannaford/until-logging
Add new CLI option for --until
Upstream-commit: 026c6db6f6
Component: cli
2017-11-14 18:49:46 +01:00
68402034cc Set timeout on splunk batch send
Before this change, if the splunk endpoint is blocked it will cause a
deadlock on `Close()`.
This sets a reasonable timeout for the http request to send a log batch.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 24087399d95d60be4184b9ed3eba56466878b4e1
Component: engine
2017-11-14 12:32:52 -05:00
e9b472f2e1 Add docs
Signed-off-by: Jamie Hannaford <jamie@limetree.org>
Upstream-commit: 0450a2f437
Component: cli
2017-11-14 18:04:10 +01:00
4bd3446b2b Merge pull request #35231 from sargun/add-vfs-quota-support
Add vfs quota support
Upstream-commit: 0defc6981322e16863e068f99b98326394b8cbd0
Component: engine
2017-11-14 15:05:02 +00:00
d8cda430a7 Bump docker-py to 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d1a0773d3a834a4bfa98deb07ae3f87dd6438da6
Component: engine
2017-11-14 14:17:44 +01:00
15db98f6fa Merge pull request #35465 from cpuguy83/update_containerd
Update containerd to v1 beta3
Upstream-commit: b4fbcd80c796f384eba800d1dc89892ab77c58e5
Component: engine
2017-11-14 14:01:48 +01:00
2cc0ade7cc Merge pull request #35484 from tonistiigi/clear-state
libcontainerd: fix leaking container/exec state
Upstream-commit: 1c99bc481be6abf40d4fd287d1b6634a6108a211
Component: engine
2017-11-14 11:15:30 +01:00
6f6f835501 Merge pull request #35316 from kolyshkin/facepalm
Fix honoring tmpfs-size for user /dev/shm mount
Upstream-commit: f70c715be01f5d5f4a8be4ab1b2c6e1464b478a7
Component: engine
2017-11-14 11:13:59 +01:00
523ff46adb Merge pull request #35456 from dnephin/make-runconfig-copy-deep
[Builder] Make copyRunConfig deep copy
Upstream-commit: f520822453a01673f38ed6b0ce86c52d71e43a0d
Component: engine
2017-11-14 11:12:26 +01:00
7b0db0e401 Merge pull request #691 from PatrickLang/patricklang-user
Docs - Adding note about creating Windows users
Upstream-commit: 50d218bd06
Component: cli
2017-11-14 11:10:56 +01:00
31c1f92623 integration: test case for #35271
This test case is checking that the built-in default size for /dev/shm
(which is used for `--ipcmode` being `private` or `shareable`)
is not overriding the size of user-defined tmpfs mount for /dev/shm.

In other words, this is a regression test case for issue #35271,
https://github.com/moby/moby/issues/35271

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 2e0a98b605fa278ee1f348c68fe7e07aed57b834
Component: engine
2017-11-13 22:08:23 -08:00
ca97ddf678 add e2e testing for trust revoke
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: 4a93f207a3
Component: cli
2017-11-13 17:18:10 -08:00
146e3d30b9 e2e tests: refactor using fixtures
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: cbd78572a7
Component: cli
2017-11-13 17:18:04 -08:00
ce5c429be8 libcontainerd: fix leaking container/exec state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6c4ce7cb6c62fb82ed2db1d4ee3a02bc5148cdee
Component: engine
2017-11-13 15:48:21 -08:00
2ca8cee39b Disallow overlay/overlay2 on top of NFS
From https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt:

> The lower filesystem can be any filesystem supported by Linux and does
> not need to be writable. The lower filesystem can even be another
> overlayfs. The upper filesystem will normally be writable and if it
> is it must support the creation of trusted.* extended attributes, and
> must provide valid d_type in readdir responses, so NFS is not suitable.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 90dfb1d0cc59d79ccb272997d735864615010785
Component: engine
2017-11-13 23:24:23 +01:00
10c7697134 container: protect health monitor channel
While this code was likely called from a single thread before, we have
now seen panics, indicating that it could be called in parallel. This
change adds a mutex to protect opening and closing of the channel. There
may be another root cause associated with this panic, such as something
that led to the calling of this in parallel, as this code is old and we
had seen this condition until recently.

This fix is by no means a permanent fix. Typically, bugs like this
indicate misplaced channel ownership. In idiomatic uses, the channel
should have a particular "owner" that coordinates sending and closure.
In this case, the owner of the channel is unclear, so it gets opened
lazily. Synchronizing this access is a decent solution, but a refactor
may yield better results.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 5b55747a523671fa6e626848060460a48d058451
Component: engine
2017-11-13 13:31:28 -08:00
60d1b81b0d Add deepCopyRunConfig for copying buidler runConfig
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9bcd5d2574fe0c84542d2fa18232c34e2a9c0cac
Component: engine
2017-11-13 14:51:17 -05:00
66527d3a87 Adding note about creating Windows users
Signed-off-by: Patrick Lang <plang@microsoft.com>
Upstream-commit: cc35724c17
Component: cli
2017-11-13 11:43:38 -08:00
293c21ca60 Remove deprecated "daemon" subcommand
The `docker daemon` subcommand was only present for
backward compatibility, but deprecated in v1.13,
and scheduled for removal in v17.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c6a3199236
Component: cli
2017-11-13 19:01:35 +01:00
6a81f7db2e Merge pull request #35473 from charrywanganthony/rm_stringutils
Split and remove pkg/stringutils
Upstream-commit: aea31ab242a1e5f489f1597a726267ed190a3095
Component: engine
2017-11-13 18:10:32 +01:00
2ee46bd08b Merge pull request #685 from eiais/e2e
docker trust sign: add e2e testing
Upstream-commit: 365c525fab
Component: cli
2017-11-13 17:31:42 +01:00
628966a8d4 Bump runc vendor
Updates runc to b2567b37d7b75eb4cf325b77297b140ea686ce8f which removes
some cross-repo dependencies.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: af248a3fe087805907e4b69ab017ef60d44ce093
Component: engine
2017-11-13 08:57:09 -05:00
e18edc6a6b add test for logs
Signed-off-by: Jamie Hannaford <jamie@limetree.org>
Upstream-commit: 9c9303e113
Component: cli
2017-11-13 10:57:44 +01:00
ca631a390a Merge pull request #35470 from thaJeztah/error-on-duplicate-labels
Remove deprecated support for duplicate label-keys
Upstream-commit: d5b9da206ae57255d8de490a7db8eb3ddbb590bd
Component: engine
2017-11-13 10:57:28 +01:00
f9f5db27c1 Fix user mount /dev/shm size
Commit 7120976d74195 ("Implement none, private, and shareable ipc
modes") introduces a bug: if a user-specified mount for /dev/shm
is provided, its size is overriden by value of ShmSize.

A reproducer is simple:

 docker run --rm
	--mount type=tmpfs,dst=/dev/shm,tmpfs-size=100K \
	alpine df /dev/shm

This commit is an attempt to fix the bug, as well as optimize things
a but and make the code easier to read.

https://github.com/moby/moby/issues/35271

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 31d30a985d99a0eef92116a22159727f5c332784
Component: engine
2017-11-12 21:42:59 -08:00
8369aeca8e Split and remove pkg/stringutils
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com>
Upstream-commit: 97e406678c8d695ee6eaefce41b83e9e27e239c7
Component: engine
2017-11-13 10:01:11 +08:00
aa1c9fab4f Remove deprecated support for duplicate label-keys
Support for duplicate labels (but different values) was
deprecated in commit e4c9079d091a2eeac8a74a0356e3f348db873b87
(Docker 1.13), and scheduled for removal in 17.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8c6322338c91cdb88b1fef4def393d9a7b670366
Component: engine
2017-11-12 03:11:37 +01:00
6729c4835f Merge pull request #686 from mvasin/patch-1
Fix grammar
Upstream-commit: 48f4003591
Component: cli
2017-11-11 15:45:39 +01:00
7cf0bd287e Fix grammar
Signed-off-by: Mikhail Vasin <michaelvasin@gmail.com>
Upstream-commit: bdd1b1e279
Component: cli
2017-11-11 16:15:15 +03:00
8fc8b79463 *: switch to -buildmode=pie
Go has supported PIC builds for a while now, and given the security
benefits of using PIC binaries we should really enable them. There also
appears to be some indication that non-PIC builds have been interacting
oddly on ppc64le (the linker cannot load some shared libraries), and
using PIC builds appears to solve this problem.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 1f4e37cf4bd2f73dc5257d791cc4dba294ddd156
Component: engine
2017-11-11 21:59:49 +11:00
f5ae1accb6 Add e2e testing for docker trust sign
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: eb025800bd
Component: cli
2017-11-10 14:26:11 -08:00
5aa9076d56 Add unit tests for some convert/service
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f1cc679618
Component: cli
2017-11-10 16:28:39 -05:00
50743f5357 Remove duplication in compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a68c940f1a
Component: cli
2017-11-10 15:56:11 -05:00
a1783b999b Remove duplication in loader
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7bd26ed690
Component: cli
2017-11-10 15:56:11 -05:00
9379e66070 Update containerd to v1 beta3
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d3f934e304d78296e606d6e3a2ca523d249e954c
Component: engine
2017-11-10 15:44:10 -05:00
75f89d26b4 sign test: fix imports
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: a570e9b355
Component: cli
2017-11-10 11:34:04 -08:00
a754767196 Merge pull request #684 from mistyhacks/fix-spaces-service-create
Remove extra spaces from service creation examples
Upstream-commit: 70da09aac2
Component: cli
2017-11-10 11:18:15 -08:00
d77f572b3a Remove extra spaces from service creation examples
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 80211acee9
Component: cli
2017-11-10 10:14:56 -08:00
d94b0d4775 Merge pull request #35342 from charrywanganthony/inslice
Copy Inslice() to those parts that use it
Upstream-commit: 97be2a075225945ca7b92d75f85048cfd05a3a71
Component: engine
2017-11-10 07:26:42 -08:00
dcbe5b1182 Add new CLI option for --until
Signed-off-by: Jamie Hannaford <jamie.hannaford@rackspace.com>
Upstream-commit: 6f309316e2
Component: cli
2017-11-10 12:38:08 +01:00
98da414257 Copy Inslice() to those parts that use it
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com>
Upstream-commit: 5c154cfac89305f7ca9446854e56700e8a660f93
Component: engine
2017-11-10 13:42:38 +08:00
32672a8e2b Merge pull request #35453 from cpuguy83/update_fsnotify
Update fsnotify to fix deadlock in removing watch
Upstream-commit: dc90c3047e1cc59770395ded86128305e3d24543
Component: engine
2017-11-09 18:29:31 -08:00
8d5384d97c Merge pull request #35454 from cpuguy83/move_env_declaration
COPY should be the last op in the Dockerfile
Upstream-commit: 45e9630b48b99ab86a88dd9a593604810b8400b6
Component: engine
2017-11-10 10:17:21 +09:00
366ab9966c COPY should be the last op in the Dockerfile
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 503b03a3f090550052af960ece2e71d54c1fdf0e
Component: engine
2017-11-09 16:00:28 -05:00
2f7df6c0dd Update fsnotify to fix deadlock in removing watch
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e8aa22645baf8f8254cc435e772314d4a5dee92c
Component: engine
2017-11-09 15:17:22 -05:00
7918ee610f Create labels when volume exists only remotely
Before this, if a volume exists in a driver but not in the local cache,
the store would just return a bare volume. This means that if a user
supplied options or labels, they will not get stored.

Instead only return early if we have the volume stored locally. Note
this could still have an issue with labels/opts passed in by the user
differing from what is stored, however this isn't really a new problem.

This fixes a problem where if there is a shared storage backend between
two docker nodes, a create on one node will have labels stored and a
create on the other node will not.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4d8598ad0506b29c12632c1b8ed92eb58fc2f0e2
Component: engine
2017-11-09 15:14:06 -05:00
84fe2b7d9a Fix remote build target as Dockerfile
The test was passing previously because the preamble was already buffered. After
the change to return Scanner.Err() the final read error on the buffer was no
longer being ignored.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a74cc833450dfc48cc95b2b109cbcb24feff4929
Component: engine
2017-11-09 15:05:26 -05:00
ca892e4f1a Fix dockerfile parser failing silently on long tokens
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 59ad3a36e2684bd36a4b02179949bd17f1406918
Component: engine
2017-11-09 15:03:20 -05:00
2bb50cbf78 Merge pull request #35250 from joppich/patch-1
Update names-generator.go
Upstream-commit: a4bdb304e29f21661e8ef398dbaeb8188aa0f46a
Component: engine
2017-11-09 06:21:02 -08:00
c716c066e5 Merge pull request #35442 from Microsoft/jjh/sysfirmware
Don't special case /sys/firmware in masked paths
Upstream-commit: d4239a6e286f546f5eda507437f643b5a1548c5d
Component: engine
2017-11-08 20:02:01 -08:00
bcc50083eb Merge pull request #35073 from mle-ii/master
Add gelf log driver plugin to Windows build
Upstream-commit: 72e179aa04999c141db96688adabfe5bcdac8293
Component: engine
2017-11-08 14:53:56 -08:00
61e5c2b6ed Merge pull request #35427 from sjeeva/master
fixed special character
Upstream-commit: 9cd6ce18af3444af58544fac3405c01818e0d388
Component: engine
2017-11-08 23:36:01 +01:00
e0e98f749d Don't special case /sys/firmware in masked paths
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b023a46a074c14d34e09d774c9e847343541a220
Component: engine
2017-11-08 12:10:42 -08:00
6dd3e92796 Merge pull request #679 from thaJeztah/revendor-moby
Bump moby to f4d4f5863156b82ef146b6ff1e845f8dcf019f12
Upstream-commit: 458ce53f18
Component: cli
2017-11-08 14:55:54 -05:00
e52bfcca39 fixed special character
`scope`=<string> local or swarm had special character, which was breaking the Swagger UI

Signed-off-by: Jeeva S. Chelladhurai <sjeeva@gmail.com>
Upstream-commit: a21654c34b741656582b09e09127821311909dcd
Component: engine
2017-11-08 19:17:24 +00:00
8a571d7e05 Bump moby to f4d4f5863156b82ef146b6ff1e845f8dcf019f12
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5735fff6fc
Component: cli
2017-11-08 17:50:58 +01:00
3e8332108b Merge pull request #34573 from cyphar/dm-dos-prevention-remove-mountpoint
devicemapper: remove container rootfs mountPath after umount
Upstream-commit: bbc4f78ba9c77f5a2e177c69870efed0eb7e8ba2
Component: engine
2017-11-08 17:08:07 +01:00
1fce7e41ce Add bash completion for experimental build --stream
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c852393bff
Component: cli
2017-11-08 14:32:14 +01:00
ce00560e17 Add --log-opt awslogs-credentials-endpoint to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1390ae6022
Component: cli
2017-11-08 14:07:05 +01:00
49cfe581ba Add support for GELF tcp connections to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c231c381fe
Component: cli
2017-11-08 13:54:51 +01:00
96ed9e5d58 Merge pull request #35423 from thaJeztah/bump-image-spec
Bump opencontainers/image-spec to v1.0.0
Upstream-commit: f4d4f5863156b82ef146b6ff1e845f8dcf019f12
Component: engine
2017-11-08 09:37:16 +09:00
95cc30e089 devmapper: add a test for mount leak workaround
In order to avoid reverting our fix for mount leakage in devicemapper,
add a test which checks that devicemapper's Get() and Put() cycle can
survive having a command running in an rprivate mount propagation setup
in-between. While this is quite rudimentary, it should be sufficient.

We have to skip this test for pre-3.18 kernels.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 1af8ea681fba1935c60c11edbbe19b894c9b286f
Component: engine
2017-11-08 11:02:11 +11:00
dfd681c198 Merge pull request #35424 from cyphar/tar-split-cve_2017_14992
vendor: update to github.com/vbatts/tar-split@v0.10.2
Upstream-commit: bd8ed57506a82a8ec3d69cd272ef8f5942c4b977
Component: engine
2017-11-07 23:09:38 +01:00
edb2c3c5b1 Merge pull request #575 from eiais/local-flag
trust sign: add --local flag
Upstream-commit: ee0615dc97
Component: cli
2017-11-07 14:15:53 -05:00
22a9ee4f49 image: add import test for CVE-2017-14992
To ensure that we don't revert CVE-2017-14992, add a test that is quite
similar to that upstream tar-split test (create an empty archive with
lots of junk and make sure the daemon doesn't crash).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 0a13f827a10d3bf61744d9b3f7165c5885a39c5d
Component: engine
2017-11-08 05:37:52 +11:00
dbf5fa6264 Merge pull request #35265 from cpuguy83/32609_defreference_voldriver_on_error
Fixup some issues with plugin refcounting
Upstream-commit: 5745a8531e7a52d4db09f2eafde0391b59a13b4b
Component: engine
2017-11-07 09:47:07 -08:00
c18684ecbe internal: testutil: add DevZero helper
This helper acts like /dev/zero (outputs \x00 indefinitely) in an
OS-independent fashion. This ensures we don't need to special-case
around Windows in tests that want to open /dev/zero.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 2f8d3e1c33f77187c68893803018756d43daff15
Component: engine
2017-11-08 03:45:55 +11:00
755085f5c8 Merge pull request #35419 from johnstep/handle-scratch-image-os
Set OS on scratch image and prevent panic if empty
Upstream-commit: 2f22f64d5561dc39e70353566ba4f84f02b980c7
Component: engine
2017-11-07 08:32:27 -08:00
19146bf34e vendor: update to github.com/vbatts/tar-split@v0.10.2
Update to the latest version of tar-split, which includes a change to
fix a memory exhaustion issue where a malformed image could cause the
Docker daemon to crash.

  * tar: asm: store padding in chunks to avoid memory exhaustion

Fixes: CVE-2017-14992
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: e0ff7cccc3cac73da41ec9ef007b0e4e97c55d01
Component: engine
2017-11-08 02:50:52 +11:00
e49f1e9075 Bump opencontainers/image-spec to v1.0.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c5ccc7f73fecfa881a8ff9ddc5032892223204ee
Component: engine
2017-11-07 16:16:09 +01:00
72aededa94 Merge pull request #35326 from RenaudWasTaken/swarmkit-revendored
Revendored Swarmkit 
Upstream-commit: eec662bbee7eace06f4fa7088dd2311a03a65858
Component: engine
2017-11-07 06:56:15 -08:00
22f416c376 Merge pull request #670 from dnephin/cleanup-compose-volume-name
Only warn on volume.external.name for version 3.4
Upstream-commit: 025f51ca93
Component: cli
2017-11-07 14:29:22 +01:00
ce8d7a3b24 Merge pull request #474 from jhowardmsft/jjh/apis-for-platform
LCOW: CLI changes to add platform flag - pull, run, create and build
Upstream-commit: 042575aac9
Component: cli
2017-11-07 14:26:31 +01:00
9302e76682 Merge pull request #657 from dnephin/add-test-for-container-cp
Adding unit tests for container cp
Upstream-commit: 21d88629df
Component: cli
2017-11-07 14:22:22 +01:00
7cfb40e0bf Set OS on scratch image and prevent panic if empty
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: a97817b673cbd3bfaf6e752282c4992ac43ff594
Component: engine
2017-11-06 18:22:15 -08:00
bab1ef9f35 Add quota support to VFS graphdriver
This patch adds the capability for the VFS graphdriver to use
XFS project quotas. It reuses the existing quota management
code that was created by overlay2 on XFS.

It doesn't rely on a filesystem whitelist, but instead
the quota-capability detection code.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: 7a1618ced359a3ac921d8a05903d62f544ff17d0
Component: engine
2017-11-06 15:53:51 -08:00
127d797434 Only warn on volume.external.name for version 3.4
Also remove use of volume.external.name

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: aea9544db5
Component: cli
2017-11-06 17:04:36 -05:00
aee7705a5f Added NodeGenericResource config tests
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: 734346a37e0cd5d2576f759d302beed5033ff14e
Component: engine
2017-11-06 21:47:26 +01:00
e5124fd7ef Updated GenericResource CLI
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: ebe14310b7728cca6d092ff66236577a3f3016d5
Component: engine
2017-11-06 21:47:26 +01:00
ae808b0eb3 Merge pull request #35398 from thaJeztah/fix-api-version-for-until-option
Move "until" option to correct API version
Upstream-commit: b00b1b1c40750dd0239fb30e421686b63b4183bd
Component: engine
2017-11-05 07:23:42 -05:00
f0b2e74732 Merge pull request #35394 from chris-crone/e2e-add-headers
Add missing headers for e2e test image build
Upstream-commit: ee21669f5329733cced55e1c678cd6cee393a6e4
Component: engine
2017-11-05 09:50:54 +01:00
59e0e866f3 Merge pull request #34162 from cpuguy83/move_logread_logic
Move jsonlog read logic
Upstream-commit: edaba571bac5d9dfaaa1b0b7c601ad712cae58d3
Component: engine
2017-11-04 13:53:36 -07:00
63e16f39ad Merge pull request #35244 from joyce/joyce/todo-fixes
fix todo for printing error messages
Upstream-commit: 48694a3f880650a1b41765ab0bebb373d0b73a22
Component: engine
2017-11-04 13:52:45 -07:00
dff2ac1e17 Move json log reading into log file object
This allows much of the read logic to be shared for other things,
especially for the new log driver proposed in
https://github.com/moby/moby/issues/33475

The only logic for reads in the json logger is around decoding log
messages, which gets passed into the log file object.

This also helps with implementing compression as it allows us to
simplify locking strategies.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 16f7cd674902b69b97692de2a83915a1a6be2cdb
Component: engine
2017-11-04 08:31:58 -04:00
70ca1da8d3 Refactor log file writer
Make the `*RotateFileWriter` specifically about writing
`logger.Message`'s, which is what it's used for.

This allows for future changes where the log writer can cache details
about log entries such as (e.g.) the timestamps included in a particular
log file, which can be used to optimize reads.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 52d82b4fbc9f0fe00f63e2df9a3d2a49d4095bda
Component: engine
2017-11-04 08:15:20 -04:00
18aef1e39d Merge pull request #35404 from tonistiigi/stream-ctx-fix
builder: fix long stream sync
Upstream-commit: 2c1043c913b3d2313e5558825f3dc8fc1727042b
Component: engine
2017-11-04 01:07:06 +01:00
6d69a9855a Enable HotAdd for Windows
Signed-off-by: Madhan Raj Mookkandy <madhanm@microsoft.com>
Upstream-commit: 5c1cfb1d27a1a7f7c0cb9092e69c3f70717fbbef
Component: engine
2017-11-03 14:24:10 -07:00
b9b2e53e40 builder: fix long stream sync
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c6703b722e1c0914342d61ca6af77aea93150873
Component: engine
2017-11-03 12:53:17 -07:00
cffa465570 Merge pull request #35399 from justincormack/mask-scsi
Add /proc/scsi to masked paths
Upstream-commit: a8cefcf6af6c6bfa1d60a2d9deb80a01ce008690
Component: engine
2017-11-03 11:58:20 -07:00
6edab5bbbd fix todo for printing error messages
Signed-off-by: Joyce <mail@joycejang.com>
Upstream-commit: 883ab41ce8f5163ba8ce0450ffff1e63c266f23b
Component: engine
2017-11-03 11:35:41 -07:00
61e2a38de5 Add /proc/scsi to masked paths
This is writeable, and can be used to remove devices. Containers do
not need to know about scsi devices.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: a21ecdf3c8a343a7c94e4c4d01b178c87ca7aaa1
Component: engine
2017-11-03 15:12:22 +00:00
84f5991ee5 Move "until" option to correct API version
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6f34bd6f968be243659ad62976822036f4f4eb17
Component: engine
2017-11-03 16:11:07 +01:00
5de35938b7 Merge pull request #32914 from jamiehannaford/until-logging
Add --until flag for docker logs; closes #32807
Upstream-commit: 68a4552529c2eafb7093dc2bc25e7fc243bf363f
Component: engine
2017-11-03 16:08:30 +01:00
ab9214e3c9 Merge pull request #35368 from dnephin/remove-version-file
Remove version file
Upstream-commit: 47a1786be2a2f1458eea5e39e8e93c375cd6fdaa
Component: engine
2017-11-03 07:58:37 -07:00
7264e2410c Revendored swarmkit
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
Upstream-commit: b3960fc1c450961ef3f31d6db21ac237d1b4d99d
Component: engine
2017-11-03 15:43:50 +01:00
fc04cb890d Merge pull request #35365 from Microsoft/jjh/removeduplicateoomscoreadj
Remove duplicate redundant setting of OOMScoreAdj in OCI spec
Upstream-commit: f5c70c5b75238804be39f048eef6aad9cc0cd166
Component: engine
2017-11-03 13:59:51 +00:00
593039ced7 Merge pull request #35383 from thaJeztah/new-misty-handle
Update Misty's GitHub handle
Upstream-commit: 7801be2eee987013cc20148d0335f42bec618835
Component: engine
2017-11-03 12:59:47 +01:00
ca401e539a Merge pull request #35168 from justincormack/update-contributing
First pass updating CONTRIBUTING
Upstream-commit: dfbf0f2e915696740e4d4dd3fb9877f676ead9f0
Component: engine
2017-11-03 12:57:21 +01:00
4aac83aaac First pass updating CONTRIBUTING
This largely removes references to Docker where possible.

The HOWTO guides are still Docker docs and refer to Docker not
moby, so the next step is to rework these as Moby docs and put
them in `docs/` in this repo.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: cecd0de3a9f783b34f75ca5e6394b9a0c123999e
Component: engine
2017-11-03 11:54:55 +00:00
73e10347de Merge pull request #35344 from rhatdan/readonly-/dev
/dev should not be readonly with --readonly flag
Upstream-commit: 7d8affa3ef1ec904c1f10814f17406f39ff55fc9
Component: engine
2017-11-03 12:54:51 +01:00
d055b6f5d3 Merge pull request #35388 from tonistiigi/rlock-fix
cluster: avoid recursive readlock on swarm info
Upstream-commit: 47b3209f687c240dc2841bcfc147b2ffa341a7fe
Component: engine
2017-11-03 18:09:16 +09:00
fc26552dd2 e2e: Add missing headers for build
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 37553a6963455fc0d5cea1ae218575cc28d3d251
Component: engine
2017-11-03 10:09:06 +01:00
5ead3bed6b Merge pull request #35389 from thaJeztah/improve-containerd-version-parsing
Use containerd API to get version
Upstream-commit: 4063bbd08877af9d2b75b863c2b469e6cb8f4fa9
Component: engine
2017-11-03 18:06:22 +09:00
e3495e0554 Merge pull request #35382 from thaJeztah/fix-api-version
Fix API version
Upstream-commit: a9182202f76be31a7bec510dd00cf24677e58c7e
Component: engine
2017-11-03 09:52:55 +01:00
d2b0c1cba5 Merge pull request #35375 from cpuguy83/update_dockerpy
Update docker-py commit
Upstream-commit: f5a2f3b40c46979e45559f75c37dfc85f97335a6
Component: engine
2017-11-02 18:42:18 -07:00
4a715bb927 Use containerd API to get version
The `docker info` code was shelling out to obtain the
version of containerd (using the `--version` flag).

Parsing the output of this version string is error-prone,
and not needed, as the containerd API can return the
version.

This patch adds a `Version()` method to the containerd Client
interface, and uses this to get the containerd version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fec2b144feaaa18998ec2ed34c9bc843c4c29abd
Component: engine
2017-11-03 01:46:58 +01:00
304c69a1ec cluster: avoid recursive readlock on swarm info
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ee1be71e9dc52db8a7ac951ba96f18a5c894806a
Component: engine
2017-11-02 16:34:00 -07:00
9136cbe399 temporarily move docker-py tests for faster feedback
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 073dd7ab39da342793c30c08192a8005498e0ffd
Component: engine
2017-11-02 18:05:38 -04:00
cbad1c68f7 Update docker-py commit
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 16d83571f5f8f833aca123874cbb34ff023df995
Component: engine
2017-11-02 18:02:52 -04:00
0cd754e14e Merge pull request #34224 from estesp/no-chown-nwfiles-outside-metadata
Only chown network files within container metadata
Upstream-commit: 462d79165f48f838102d4206af70e64c1e3d6a6d
Component: engine
2017-11-02 15:00:42 -07:00
633f82e30c Merge pull request #664 from thaJeztah/new-misty-handle
Update Misty's GitHub handle
Upstream-commit: e2ada663d2
Component: cli
2017-11-02 17:57:08 +01:00
fd4c48b1d3 Update Misty's GitHub handle
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 14b1535dfe
Component: cli
2017-11-02 16:50:38 +01:00
9f6163c9a9 Update Misty's GitHub handle
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 30b4b5640e7117fc38755a7d5aae0d9a872efaaf
Component: engine
2017-11-02 16:46:37 +01:00
3e0fab4d2e /dev should not be readonly with --readonly flag
/dev is mounted on a tmpfs inside of a container.  Processes inside of containers
some times need to create devices nodes, or to setup a socket that listens on /dev/log
Allowing these containers to run with the --readonly flag makes sense.  Making a tmpfs
readonly does not add any security to the container, since there is plenty of places
where the container can write tmpfs content.

I have no idea why /dev was excluded.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Upstream-commit: 5f3bd2473ee2a1b9f37ba0130e934133d0e01f89
Component: engine
2017-11-02 10:28:51 -04:00
c2ca3d9c02 Merge pull request #35371 from thaJeztah/remove-version-matrix
Remove Docker/API version matrix
Upstream-commit: 4bc5a5765288c797bb6989a9e08938b5327236dc
Component: engine
2017-11-02 06:10:20 -07:00
b878f3dd1f Fix API version
Commit 3ba1dda1914fa7d380d9d3220c3b158a41f90cba bumped
the API version, but forgot to actually bump the version
in code.

This patch fixes the version to match those changes :-)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7f8dbe4a86650b02ffb490098b9f3bf0912c575d
Component: engine
2017-11-02 13:08:27 +01:00
564091fdbb Merge pull request #35373 from yongtang/11012017-solaris
Remove solaris build tag and `contrib/mkimage/solaris`
Upstream-commit: 76531ccdeb5850156150b88c6a4a56bb8c35dc44
Component: engine
2017-11-02 16:39:02 +09:00
eefbd135ae Remove solaris build tag and `contrib/mkimage/solaris
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4785f1a7ab7ec857dc3ca849ee6ecadf519ef30e
Component: engine
2017-11-02 00:01:46 +00:00
7559d4940b Merge pull request #35369 from thaJeztah/fix-api-changes
Move Isolation API changes to the correct version
Upstream-commit: deae42863209d742ddf96c922e12268c6d887033
Component: engine
2017-11-02 00:38:19 +01:00
4380d9b1d1 Merge pull request #35363 from yongtang/11012017-Dockerfile.solaris
Remove Dockerfile.solaris reference
Upstream-commit: 64e1d4a1f0081f669fff8ed0ad630b202c0cda8a
Component: engine
2017-11-01 16:36:00 -07:00
bd820b2e31 Remove Docker/API version matrix
The Swagger file contained a version matrix to
find which API version is used by which version
of Docker.

Given that Docker is a downstream of the Moby project,
we should not be maintaining such a matrix in this
repository.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3fb228ba50ccb921148e0174e5e5e45ab650c3e5
Component: engine
2017-11-01 22:29:26 +01:00
a1f2fd42a7 Move Isolation API changes to the correct version
Commit d91c5f42eb37c6f88cec4021c10c0a1ded1785c3 added
support for "Isolation" mode for services, but didn't
get merged before API 1.34.

This patch moves the description in the API version
history to the correct API version (1.35), and does
a slight rewording of the functionality.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4533a16fa98785c8c18bf9b9a32da5390fc74757
Component: engine
2017-11-01 22:13:10 +01:00
45def429d3 Merge pull request #34424 from simonferquel/swarm-service-isolation
Added support for swarm service isolation mode
Upstream-commit: d91c5f42eb37c6f88cec4021c10c0a1ded1785c3
Component: engine
2017-11-01 16:41:10 -04:00
9a9cb24385 Remove version file
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1e1ad008db1af4f415b9ef9b8d6d225a09ab42e1
Component: engine
2017-11-01 16:25:03 -04:00
a60239224c Merge pull request #35364 from dnephin/remove-w2l-scripts
Remove W2L scripts
Upstream-commit: d1d69524c25fdc729f1a35826ffce5d37038f141
Component: engine
2017-11-01 15:56:04 -04:00
b9e1e46d81 Merge pull request #35360 from thaJeztah/fix-autogen-warning
Fix .go-autogen warnings
Upstream-commit: a17bfb78e8c33f67338f480637948f537cb69f40
Component: engine
2017-11-01 15:12:09 -04:00
89d76e74a5 Merge pull request #35341 from tklauser/utsname-x-sys
Simplify Utsname string conversion
Upstream-commit: 0bcca5ea863d8e100ede8b7e48d8209cc4620fec
Component: engine
2017-11-01 11:36:38 -07:00
242504f367 Remove dupl setting of OOMScoreAdj in OCI spec
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f0b44881b5d43b18871dee2ecc2bb313046038f6
Component: engine
2017-11-01 11:01:43 -07:00
8146500811 Remove W2L scripts
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6d87d178131429217dec0621263d43c848dc7589
Component: engine
2017-11-01 13:09:09 -04:00
d488311b88 Merge pull request #35351 from dnephin/remove-packaging-scripts
Remove packaging scripts
Upstream-commit: be6a523bb9cebe739005327279ad7c090f6c87bf
Component: engine
2017-11-01 17:37:47 +01:00
4d81559763 Remove Dockerfile.solaris reference
Remove Dockerfile.solaris reference in `hack/make/.detect-daemon-osarch`
as `Dockerfile.solaris` has been removed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d157d98a5fbfc98f4adec20ce510b99c795b0d9c
Component: engine
2017-11-01 16:26:29 +00:00
0faeccd9ce Merge pull request #35357 from ripcurld0/small_nitpick
Nitpick plugin/manager.go: use loop to create directories
Upstream-commit: f6700d52244de7ee121c0acc564d38753cadaf7c
Component: engine
2017-11-01 16:33:23 +01:00
86be218c45 Only chown network files within container metadata
If the user specifies a mountpath from the host, we should not be
attempting to chown files outside the daemon's metadata directory
(represented by `daemon.repository` at init time).

This forces users who want to use user namespaces to handle the
ownership needs of any external files mounted as network files
(/etc/resolv.conf, /etc/hosts, /etc/hostname) separately from the
daemon. In all other volume/bind mount situations we have taken this
same line--we don't chown host file content.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 42716dcf5c986e4cbb51f480f2782c05e5bd0b41
Component: engine
2017-11-01 10:14:01 -04:00
a92483bbdf Fix .go-autogen warnings
The `.integration-test-helpers` script was sourced by `/etc/bash/bash.rc`.
However, the `$SCRIPTDIR` environment variable is set through `hack/make.sh`,
so will not be set when calling the `.integration-test-helpers` script directly.

Before this patch;

    make BIND_DIR=. shell
    ...
    bash: /make/.go-autogen: No such file or directory

After this patch, the warning is no longer printed

Also removed sourcing `.go-autogen` from test-integration and build-integration-test-binary,
as they already sourced `.integration-test-helpers` (which sources
`.go-autogen`).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6d5e468db1f07c12140af0cf36ba0d1a09bb4ca9
Component: engine
2017-11-01 12:03:32 +01:00
0bcfa85080 Nitpick plugin/manager.go: use loop to create directories
Instead of duplicating the same if condition per plugin manager directory,
use one if condition and a for-loop.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: d75f1d848721f04fdc703a2e88a98600f29933a6
Component: engine
2017-11-01 11:29:37 +02:00
fb29de3583 Add --until flag for docker logs; closes #32807
Signed-off-by: Jamie Hannaford <jamie.hannaford@rackspace.com>
Upstream-commit: e8d9a61f4c9e1f3cfdf1c889c541c9dc72a4bb40
Component: engine
2017-11-01 10:08:49 +01:00
2f5eef6e9a Merge pull request #35348 from thaJeztah/bump-selinux
bump opencontainers/selinux to b29023b86e4a69d1b46b7e7b4e2b6fda03f0b9cd
Upstream-commit: ba99c19b593bdb9e7b90793681fe89b0a91781ed
Component: engine
2017-10-31 20:12:34 -07:00
0954691f2f Remove packaging scripts
These scripts have not been used for a while now, and should not be used again
because they are for releasing docker, not moby

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: eef85648e43fef2ec73462fd3d734947384cb16e
Component: engine
2017-10-31 18:37:05 -04:00
7bfb66c670 Merge pull request #35347 from lioncruise/patch-1
Fix grammatical problems in several annotations
Upstream-commit: 100ec844ccad6b79bcb11650e32e9a05ff51a441
Component: engine
2017-10-31 15:25:27 -07:00
7afaa41128 Merge pull request #35350 from crosbymichael/ctd-static
Add containerd static compile
Upstream-commit: 842bbeb63d82a55ee6ce537f860e9b37c146481c
Component: engine
2017-10-31 14:01:16 -07:00
31ecf1d5a7 Merge pull request #661 from thaJeztah/bump-golang-to-1.8.5
Bump Go to 1.8.5
Upstream-commit: 5a4fe7fe05
Component: cli
2017-10-31 16:24:27 -04:00
8126d722b0 Merge pull request #55 from seemethere/add_artful
Add Ubuntu 17.10, Artful
Upstream-commit: 7b2f5e75e1b30ab70bee294e0215f399ffe32d25
Component: packaging
2017-10-31 13:19:41 -07:00
dbab169d62 Bump Go to 1.8.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bc8282a235
Component: cli
2017-10-31 21:04:59 +01:00
9e1b28e972 Merge pull request #35343 from thaJeztah/bump-api-version-1.35
Bump API version to 1.35
Upstream-commit: 3ba1dda1914fa7d380d9d3220c3b158a41f90cba
Component: engine
2017-10-31 12:37:12 -07:00
5e3a8a19fe Update to 1.8.5
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c16053e90143cd8a9a559b749407d938f0cb4456
Component: packaging
2017-10-31 11:22:44 -07:00
cf57f4873b Merge pull request #58 from thaJeztah/bump-golang-to-1.8.5
Bump Golang to 1.8.5
Upstream-commit: 798ac05bb417d6f51fba3da55d1b9a9c7b686d61
Component: packaging
2017-10-31 11:22:37 -07:00
f9bbb79bc5 Bump Golang to 1.8.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f7e22edc5125feab9887cf6cd6b94a153a88ed89
Component: packaging
2017-10-31 18:57:28 +01:00
7fe5d41e3a Merge pull request #53 from thaJeztah/bump-golang-to-1.8.4
Bump Go to 1.8.4
Upstream-commit: 18b39977570d17368c9d03e862e0ce264f7ef082
Component: packaging
2017-10-31 10:54:14 -07:00
77f73751db LCOW: Add --platform= CLI flag to pull/create/run/build
Signed-off-by: John Howard <jhoward@microsoft.com>

This is the CLI updates for the document discussed in https://github.com/moby/moby/issues/34617
to support Linux Containers on Windows. It adds --platform= as CLI flags to the four
commands listed above. Import still to be completed (needs daemon changes).
Upstream-commit: d8b782560e
Component: cli
2017-10-31 09:50:43 -07:00
b1394ae4a5 Merge pull request #34271 from tonistiigi/build-symlink-hash
builder: fix build cache hash for broken symlink
Upstream-commit: 3ab20a87fa10360df891a67b8307399cdf1ab429
Component: engine
2017-10-31 09:38:57 -07:00
d76235b88c bump opencontainers/selinux to b29023b86e4a69d1b46b7e7b4e2b6fda03f0b9cd
This vendoring fixes two issues.

1. When a user specifies an SELinux MCS Label (level) to override moby picking
   an unigue MCS label, the code currently picks a label then overrides with the
   user selected. This works fine, except the unique MCS Label is leaked and will
   not be used until the daemon is restarted.
2. The override label, is not reserved. This could potentially cause an issue
   where the daemon could pick the same MCS Label again for a different container.
   (~ 1/500,000 Chance).

The updated selinux go bindings, now release the overriden unigue label, and reserve
the one specified by the user.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 73c82386148fe14a47cc515c622bd23b9b7d99b9
Component: engine
2017-10-31 16:54:16 +01:00
3c035adcf7 Add containerd static compile
Fixes #35349

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 007db062f0c39bf31e1150aa26d045778ab7d24e
Component: engine
2017-10-31 11:50:29 -04:00
bf8eb18312 Merge pull request #660 from thaJeztah/bump-version-to-v17.12-dev
Bump version to 17.12.0-dev
Upstream-commit: 1dc89aa98f
Component: cli
2017-10-31 16:37:42 +01:00
95c878aac5 Fix grammatical problems in several annotations
Signed-off-by: qinshijun <272700767@qq.com>
Upstream-commit: 3c376a882b89bc1ff4f7b47667f49440a516bd70
Component: engine
2017-10-31 22:47:58 +08:00
b5133b1bd8 Update names-generator.go to include Cédric Villani and Valentina
Tershkova

Signed-off-by: Jorit Kleine-Möllhoff <joppich@bricknet.de>
Upstream-commit: f69f8f367987717a154d4c95ea9261bc9416734a
Component: engine
2017-10-31 15:38:57 +01:00
06a81bf15d Merge pull request #658 from arehman199/fix-a-number-of-typos
fix a number of minor typos
Upstream-commit: a0140b4ddb
Component: cli
2017-10-31 15:07:51 +01:00
6b11145c27 Bump API version to 1.35
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ba6b5aa7f28dbc76c6e0c494eb228a652a0d55a7
Component: engine
2017-10-31 12:57:14 +01:00
356175fe57 Bump version to 17.12.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a195685bac
Component: cli
2017-10-31 12:33:06 +01:00
379ed62f4b Merge pull request #609 from albers/completion-trust
Add bash completion for `docker trust` commands
Upstream-commit: d0197347ea
Component: cli
2017-10-31 11:24:35 +01:00
70aedb437f fix a number of minor typos
Fix 19 typos, grammatical errors and duplicated words.

These fixes have minimal impact on the code as these are either in the
doc files or in comments inside the code files.

Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
Upstream-commit: c3fe9d85ef
Component: cli
2017-10-31 15:21:51 +05:00
f64b1b1e67 Simplify Utsname string conversion
Update golang.org/x/sys to 95c6576299259db960f6c5b9b69ea52422860fce in
order to get the unix.Utsname with byte array instead of int8/uint8
members.

This allows to use simple byte slice to string conversions instead of
using charsToString or its open-coded version.

Also see golang/go#20753 for details.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 6d068bc25b35a420e63e295ea4ab4ac4a6e6665b
Component: engine
2017-10-31 10:59:32 +01:00
f85a09c5e7 Merge pull request #654 from dnephin/pr-fix-image-rm
Fix behaviour of `rmi -f` with unexpected errors
Upstream-commit: 6e04da39b8
Component: cli
2017-10-31 10:38:38 +01:00
f817bbeeb6 Merge pull request #35335 from dnephin/remove-a-test
Remove a test that was moved to docker/cli
Upstream-commit: 147ec3be2e7fe5d35553401990317cf49088ec86
Component: engine
2017-10-31 07:56:03 +01:00
57801c5154 trust sign: add --local flag
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: f5a50650d6
Component: cli
2017-10-30 16:06:03 -07:00
b617f5a57f Remove a test that was moved to docker/cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1a03bd396b21f0c291499e1c5bd185d23e20ffc1
Component: engine
2017-10-30 18:39:11 -04:00
b96759ddb9 Adding unit tests for cp
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b7b62ca26a
Component: cli
2017-10-30 18:33:28 -04:00
7cbbc92838 Merge component 'engine' from git@github.com:moby/moby master 2017-10-30 21:52:27 +00:00
b9bd420700 Merge component 'cli' from git@github.com:docker/cli master 2017-10-30 21:32:56 +00:00
c0bf3ebcc8 Merge pull request #35177 from sargun/add-quota-tests
Add tests to project quotas and detection mechanism
Upstream-commit: 226eb8004e0e9b1cd55b37ce4c235c0f19ca9a14
Component: engine
2017-10-30 21:08:38 +01:00
de8f897ce4 Merge pull request #651 from thaJeztah/fix-extra-host-sorting
Preserve sort-order of extra hosts, and allow duplicate entries
Upstream-commit: 96b8d15bdd
Component: cli
2017-10-30 20:38:10 +01:00
89f40238db Merge pull request #34888 from jahkeup/sized-logger
logger: copy to log driver's bufsize, fixes #34887
Upstream-commit: dfc2d62632d32f9d38166ea477f0ca033a5c91c2
Component: engine
2017-10-30 12:37:41 -07:00
2700d23ec3 Merge pull request #35102 from ripcurld0/doc_31926
Elaborate more about port allocation in docs
Upstream-commit: a6f09a7509cd77b4ce0bf26845a253a7d9997d11
Component: engine
2017-10-30 20:28:36 +01:00
0e0f534e7d Merge pull request #652 from thaJeztah/move-notary
Move notary to its new location
Upstream-commit: 7ca234fe24
Component: cli
2017-10-30 14:05:59 -04:00
7878df6b36 Merge pull request #655 from eiais/extraQuote
Remove extra quotes from docker trust sign
Upstream-commit: 65398de1a6
Component: cli
2017-10-30 13:53:18 -04:00
7b52a0b8c0 Merge pull request #648 from thaJeztah/fix-host-add-description
Fix flag description for --host-add
Upstream-commit: a79e742bfc
Component: cli
2017-10-30 13:52:29 -04:00
17ef49339b Merge component 'cli' from git@github.com:docker/cli master 2017-10-30 17:32:31 +00:00
48cf1a4fab Remove extra quotes from docker trust sign
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: 291fdcfdbe
Component: cli
2017-10-30 10:31:21 -07:00
74cd535226 Use t.Run() for tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b900676523
Component: cli
2017-10-30 13:00:03 -04:00
0f02c6fd5a docker rm -f exits with 1 if the image was not removed
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 125302cfa6
Component: cli
2017-10-30 12:50:19 -04:00
bd61323342 logger: copy to log driver's bufsize
Log drivers may have an internal buffer size that can be accommodated
by the copier as it is more effective to buffer and send fewer though
larger messages that the log driver can consume.

This eliminates the need for Partial handling for drivers that do not
support the concept (ie: awslogs, which can only have events up to
service limits).

Signed-off-by: Jacob Vallejo <jakeev@amazon.com>
Upstream-commit: e1ada0b885b31de0bb0e79b4d99ae4d48b65f721
Component: engine
2017-10-30 16:25:09 +00:00
095f04e761 Move notary to its new location
The https://github.com/docker/notary repository has moved to
https://github.com/theupdateframework/notary

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6cd58063fa
Component: cli
2017-10-30 17:21:41 +01:00
dd79157d92 Merge pull request #566 from riyazdf/docker-trust-2
docker trust: interact with signers and keys
Upstream-commit: 0c4fa699eb
Component: cli
2017-10-30 17:03:58 +01:00
c75c0e3626 Merge component 'engine' from git@github.com:moby/moby master 2017-10-30 16:00:31 +00:00
2f9ed9f2a3 review feedback: updating for windows, error paths
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: e189a21a25
Component: cli
2017-10-30 16:55:59 +01:00
fb29d9eb55 update to stderr instead of stdout, update tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 079471ebeb
Component: cli
2017-10-30 16:55:59 +01:00
80651d6c61 revendor notary for updated import/export packages, update with rebase
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: b4ef2ddb8b
Component: cli
2017-10-30 16:55:59 +01:00
aeaef10882 refactoring and adding tests for EC key types
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 2d8cc3cd80
Component: cli
2017-10-30 16:55:59 +01:00
506e33cdf2 trust: move signer and key commands down one level
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 532d223db4
Component: cli
2017-10-30 16:53:54 +01:00
222f56b982 docs: add docs for new trust subcommands
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 4e797eaa04
Component: cli
2017-10-30 16:53:54 +01:00
d01ed820ce trust: key-load and key-generate code
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 604bc3f22d
Component: cli
2017-10-30 16:53:53 +01:00
cfe9deca16 trust: add signer-add and signer-remove command
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: dde9f614a7
Component: cli
2017-10-30 16:53:53 +01:00
a2d940cc8d Merge component 'cli' from git@github.com:docker/cli master 2017-10-30 15:41:05 +00:00
1377e81acb Added support for swarm service isolation mode
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: f28cb422e69bd4239401e6ea32b65b56485d6691
Component: engine
2017-10-30 16:16:18 +01:00
88e8779c7d Merge pull request #623 from johndmulhausen/master
Removing titles from md files
Upstream-commit: 92afc3f474
Component: cli
2017-10-30 14:01:58 +01:00
c5ffc78d5e Preserve sort-order of extra hosts, and allow duplicate entries
Extra hosts (`extra_hosts` in compose-file, or `--hosts` in services) adds
custom host/ip mappings to the container's `/etc/hosts`.

The current implementation used a `map[string]string{}` as intermediate
storage, and sorted the results alphabetically when converting to a service-spec.

As a result, duplicate hosts were removed, and order of host/ip mappings was not
preserved (in case the compose-file used a list instead of a map).

According to the **host.conf(5)** man page (http://man7.org/linux/man-pages/man5/host.conf.5.html)

    multi  Valid values are on and off.  If set to on, the resolver
      library will return all valid addresses for a host that
      appears in the /etc/hosts file, instead of only the first.
      This is off by default, as it may cause a substantial
      performance loss at sites with large hosts files.

Multiple entries for a host are allowed, and even required for some situations,
for example, to add mappings for IPv4 and IPv6 addreses for a host, as illustrated
by the example hosts file in the **hosts(5)** man page (http://man7.org/linux/man-pages/man5/hosts.5.html):

    # The following lines are desirable for IPv4 capable hosts
    127.0.0.1       localhost

    # 127.0.1.1 is often used for the FQDN of the machine
    127.0.1.1       thishost.mydomain.org  thishost
    192.168.1.10    foo.mydomain.org       foo
    192.168.1.13    bar.mydomain.org       bar
    146.82.138.7    master.debian.org      master
    209.237.226.90  www.opensource.org

    # The following lines are desirable for IPv6 capable hosts
    ::1             localhost ip6-localhost ip6-loopback
    ff02::1         ip6-allnodes
    ff02::2         ip6-allrouters

This patch changes the intermediate storage format to use a `[]string`, and only
sorts entries if the input format in the compose file is a mapping. If the input
format is a list, the original sort-order is preserved.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dbdf8f6468
Component: cli
2017-10-30 01:48:09 +01:00
3090f62b5d Merge pull request #35313 from charrywanganthony/RandomAlpha
Separate the GenerateRandomAlphaOnlyString function from stringutils
Upstream-commit: ba3bf8191e3390745420ada6b7f79483eb7e7be0
Component: engine
2017-10-29 22:33:57 +01:00
b3821c58fe Merge pull request #34999 from kolyshkin/wait-on-rm
ContainerWait on remove: don't stuck on rm fail
Upstream-commit: 220d6c4aff7e3c8887f8c39e8f47b4aca21ab22f
Component: engine
2017-10-29 11:04:41 -07:00
a313f92089 Merge pull request #35289 from zuiurs/namesgeneratorCmd
Fix a names-generator binary
Upstream-commit: e8730d052e625af3666176f7c1f596bb07fccbe2
Component: engine
2017-10-28 13:16:33 -07:00
6a734a478e Merge pull request #35314 from thaJeztah/improve-devicemapper-info
Improve devicemapper driver-status output
Upstream-commit: 1f5bcb1b8812abd832fee3721dd29ef431ddc32a
Component: engine
2017-10-28 11:15:59 -07:00
772cdcbf0c Fix flag description for --host-add
The `--host-add` flag adds a new `host:ip` mapping. Even though
adding an entry is idempotent (adding the same mapping multiple
times does not update the service's definition), it does not
_update_  an existing mapping with a new IP-address (multiple
IP-addresses can be defined for a host).

This patch removes the "or update" part from the flag's
description.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 79b19cba16
Component: cli
2017-10-28 16:47:53 +02:00
be3cbac37e Separate the GenerateRandomAlphaOnlyString function from stringutils
Signed-off-by: chaowang <chaowang@localhost.localdomain>
Upstream-commit: 7c35a2418265336a572976e2ced378ef4b6f1666
Component: engine
2017-10-28 09:03:02 +08:00
a4aced17f9 Merge pull request #646 from jadametz/add_unpause_output
Adds unpause output to docs
Upstream-commit: 7ed96d3b2b
Component: cli
2017-10-28 02:00:40 +02:00
4e5eea8827 Merge pull request #35320 from Microsoft/jjh/lcow-set-oci-root
Fixes LCOW after containerd 1.0 introduced regressions
Upstream-commit: 2613c3d53cee46d8e0dc8e1aba83686f259985e4
Component: engine
2017-10-28 09:02:00 +11:00
e947e4d4f1 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-10-27 11:27:43 -07:00
fdcaaa2daa Merge component 'engine' from git@github.com:moby/moby master 2017-10-27 11:27:30 -07:00
320e3a6526 Add tests to project quotas and detection mechanism
This adds a mechanism (read-only) to check for project quota support
in a standard way. This mechanism is leveraged by the tests, which
test for the following:
 1. Can we get a quota controller?
 2. Can we set the quota for a particular directory?
 3. Is the quota being over-enforced?
 4. Is the quota being under-enforced?
 5. Can we retrieve the quota?

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: 6966dc0aa9134c518babcbf1f02684cae5374843
Component: engine
2017-10-27 11:07:37 -07:00
ac1bfe09d7 Merge component 'cli' from git@github.com:docker/cli master 2017-10-27 10:23:42 -07:00
67f37f6e34 Fixes LCOW after containerd 1.0 introduced regressions
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 71651e0b801ae874b4a899e3c47add9e3fbc2400
Component: engine
2017-10-27 09:55:43 -07:00
b829f463d9 Merge pull request #636 from dnephin/fix-trust-output-stream
Fix stdout and errors in image/trust
Upstream-commit: 54e1378e04
Component: cli
2017-10-27 11:31:01 -04:00
b09454312c Merge pull request #35307 from thaJeztah/bump-golang-to-1.8.5
Bump Golang to 1.8.5
Upstream-commit: ecf4125b85e0faa57d2739348e0d453c1d24d10c
Component: engine
2017-10-27 06:10:09 -07:00
ab4fa07bf0 Merge pull request #621 from charrywanganthony/displaystringutils
Refactor stringutils and fix docker search output form
Upstream-commit: e4940cb8d2
Component: cli
2017-10-27 11:08:36 +02:00
4251785d24 Merge pull request #645 from dnephin/use-upstream-spf13-cobra
Hide help flag from help output
Upstream-commit: 6aedafd195
Component: cli
2017-10-27 11:00:07 +02:00
b238ed565f Improve devicemapper driver-status output
Do not print "Data file" and "Metadata file" if they're
not used, and sort/group output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8f702de9b705ced68b6244239ac81d86ebdd6b0a
Component: engine
2017-10-27 10:12:39 +02:00
e0db409186 Adds unpause output to docs
Signed-off-by: Jesse Adametz <jesseadametz@gmail.com>
Upstream-commit: 8bf99be0c7
Component: cli
2017-10-26 23:55:03 -07:00
9a3be7b972 Refactor stringutils and fix docker search output form when the description has CJK character
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com>
Upstream-commit: 926b20fcb5
Component: cli
2017-10-27 11:15:10 +08:00
6a1f8e5780 Merge pull request #633 from seemethere/switch_to_multi_arch_images
Switch to golang:1.8.4-alpine3.6
Upstream-commit: 50e1161744
Component: cli
2017-10-26 17:08:08 -07:00
d815178654 Bump Golang to 1.8.5
go1.8.5 (released 2017/10/25) includes fixes to the compiler, linker, runtime,
documentation, go command, and the crypto/x509 and net/smtp packages. It
includes a fix to a bug introduced in Go 1.8.4 that broke go get of non-Git
repositories under certain conditions. See the Go 1.8.5 milestone on our issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.8.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 503fe408da376a046c37c4940f7f3af0cfa81c38
Component: engine
2017-10-27 01:18:00 +02:00
9797d6fc52 Update to multi-arch image for golang
golang:1.8.4-alpine does not have multi-arch images available in the
manifest. (s390x, ppc64le, etc.)

This makes it so that if you are trying to compile on different
arches you aren't forced to have to write your own Dockerfile and can
instead use the one bundled with the CLI repo.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 9d1d9f2fa3
Component: cli
2017-10-26 11:42:13 -07:00
f845101532 Merge pull request #617 from dnephin/update-gometalinter
Update gometalinter
Upstream-commit: b087b13cae
Component: cli
2017-10-26 13:08:00 -04:00
2b624e8f54 Update gometalinter
and enable the new WarnUnmatchedDirective to warn if a nolint is unnecessary.
remove some unnecessary nolint

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c0d004f7cf
Component: cli
2017-10-26 12:21:02 -04:00
06ddf7146d Merge pull request #601 from dnephin/compose-cast-after-interpolate
[Compose] Cast values to expected type after interpolating values
Upstream-commit: b68c3d007f
Component: cli
2017-10-26 12:20:04 -04:00
e585bc4a87 Hide help flag from help output.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f50345a26c
Component: cli
2017-10-26 12:17:50 -04:00
52f9a6e75e Change multi-type parameters to single type
Signed-off-by: Asad Saeeduddin <masaeedu@gmail.com>
Upstream-commit: c6d32bebe5b6a0919fcb530692092dd5516e5b54
Component: engine
2017-10-26 06:10:24 -04:00
6c4fe5e7de Merge pull request #642 from dnephin/use-upstream-spf13-cobra
Use upstream spf13 cobra
Upstream-commit: e59f3e2925
Component: cli
2017-10-26 10:05:11 +02:00
2613cd4235 Merge pull request #644 from thaJeztah/fix-daemon-config-example
Fix daemon.json runtime example
Upstream-commit: 41797e1753
Component: cli
2017-10-26 09:31:57 +02:00
c8091c3807 Merge pull request #641 from cpuguy83/35295_memusage_pagecache_note
Add note about reported memory stats on linux
Upstream-commit: ecf06bba21
Component: cli
2017-10-26 02:28:06 +02:00
5c9abffbcf Fix daemon.json runtime example
The example in the documentation used "runc", which is a
reserved runtime name (as it's the default).

This patch updates the example, and uses a different name.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1e5d013064
Component: cli
2017-10-26 02:15:49 +02:00
7c4d9074f1 Fix UseLine
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8e600e10f7
Component: cli
2017-10-25 18:22:04 -04:00
7184497162 Merge pull request #35283 from darrenstahlmsft/revendorLibnetwork
Update libnetwork
Upstream-commit: 074b1fc47b12ef18cbdd972597d5c3d706bd3709
Component: engine
2017-10-26 00:03:33 +02:00
a3b0929c08 Add note about reported memory stats on linux
Since the API and the CLI both have a "Usage" field for memory, clarify
that the CLI does additional calculations to avoid confusion of API
consumers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a6acacc533
Component: cli
2017-10-25 16:50:43 -04:00
8efb0e1631 ContainerWait on remove: don't stuck on rm fail
Currently, if a container removal has failed for some reason,
any client waiting for removal (e.g. `docker run --rm`) is
stuck, waiting for removal to succeed while it has failed already.
For more details and the reproducer, please check
https://github.com/moby/moby/issues/34945

This commit addresses that by allowing `ContainerWait()` with
`container.WaitCondition == "removed"` argument to return an
error in case of removal failure. The `ContainerWaitOKBody`
stucture returned to a client is amended with a pointer to `struct Error`,
containing an error message string, and the `Client.ContainerWait()`
is modified to return the error, if any, to the client.

Note that this feature is only available for API version >= 1.34.
In order for the old clients to be unstuck, we just close the connection
without writing anything -- this causes client's error.

Now, docker-cli would need a separate commit to bump the API to 1.34
and to show an error returned, if any.

[v2: recreate the waitRemove channel after closing]
[v3: document; keep legacy behavior for older clients]
[v4: convert Error from string to pointer to a struct]
[v5: don't emulate old behavior, send empty response in error case]
[v6: rename legacy* vars to include version suffix]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: f963500c544daa3c158c0ca3d2985295c875cb6b
Component: engine
2017-10-25 13:11:56 -07:00
2e5b6e24c7 Update code for upstream cobra
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4205416c9b
Component: cli
2017-10-25 14:49:26 -04:00
bf87c9c8da Update vendor of spf13/pflag and spf13/cobra
Use upstream isntead of fork for cobra.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0f2ebae056
Component: cli
2017-10-25 12:50:37 -04:00
21f2b39427 Merge pull request #35294 from vdemeester/docker-function-name
Remove Docker from some functions
Upstream-commit: 0e037717e06f4f260f4e76d90675ccd1e9a6bed3
Component: engine
2017-10-25 08:25:26 -07:00
373458dd9c Merge pull request #34670 from sargun/use_copy_file_range
Use In-kernel File Copy for Overlayfs and VFS on Linux
Upstream-commit: ce5800c329510bbf38c6899c3386633823acefcd
Component: engine
2017-10-25 17:10:44 +02:00
7f1869d232 Merge pull request #35285 from crosbymichael/solaris
Remove solaris files
Upstream-commit: 17bb1d3663f6586e83b453670526e3186bb56dd3
Component: engine
2017-10-25 15:14:04 +02:00
1fe3d1bde0 Merge pull request #35293 from vdemeester/small-docker-to-moby-rename
Rename a few docker to moby
Upstream-commit: 61d1bd8a807de3411b62eb1c3af88fec6021a688
Component: engine
2017-10-25 14:57:29 +02:00
bec5e89f59 Remove Docker from some functions
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: de5c80b4f3ca51343fb4b698362ad232478b43be
Component: engine
2017-10-25 14:39:51 +02:00
e1ac8beab7 Merge pull request #35030 from tossmilestone/34459-fix-network-create-conflict-errcode
Fix returned error code for network creation from 500 to 409
Upstream-commit: e309f98b84fd3aaf527512a925e2b7d066135a4d
Component: engine
2017-10-25 14:29:20 +02:00
aa769fd9a0 Rename a few docker to moby
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d040d637a950b10843a4535c6dbc1c66cc84dde7
Component: engine
2017-10-25 13:56:12 +02:00
61ad1e458b Fix a names-generator binary
To ensure that namesgenerator binary outputs random name
by initializing Seed.

Signed-off-by: Mizuki Urushida <z11111001011@gmail.com>

not use init function.

Signed-off-by: Mizuki Urushida <z11111001011@gmail.com>
Upstream-commit: eaab2f715039e212dd67c71c30f1f8a8cfc03ded
Component: engine
2017-10-25 18:21:17 +09:00
4883b5d512 Merge pull request #638 from BastianHofmann/patch-1
Fix json formating in dockerd docs
Upstream-commit: 9b7656cc05
Component: cli
2017-10-25 10:56:21 +02:00
25caba7d97 Fix json formatting in dockerd docs
Fix another json formatiing error.

Signed-off-by: Bastian Hofmann <bastianhofmann@me.com>
Upstream-commit: c7867f5cc6
Component: cli
2017-10-25 08:50:34 +02:00
f5ef703efd Merge pull request #35284 from tophj-ibm/download-frozen-images-with-integration-cli-tests
[integration-cli] ensureFrozenImages here too
Upstream-commit: d85f5e73203a1f8537b7db02e1eadcb6d75798b2
Component: engine
2017-10-24 16:43:55 -07:00
a04c3458dc Add zero-copy support to copy module
This changeset allows Docker's VFS, and Overlay to take advantage of
Linux's zerocopy APIs.

The copy function first tries to use the ficlone ioctl. Reason being:
 - they do not allow partial success (aka short writes)
 - clones are expected to be a fast metadata operation
See: http://oss.sgi.com/archives/xfs/2015-12/msg00356.html

If the clone fails, we fall back to copy_file_range, which internally
may fall back to splice, which has an upper limit on the size
of copy it can perform. Given that, we have to loop until the copy
is done.

For a given dirCopy operation, if the clone fails, we will not try
it again during any other file copy. Same is true with copy_file_range.

If all else fails, we fall back to traditional copy.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: 3ec4ec2857c714387e7b59c2cf324565f6ae55e2
Component: engine
2017-10-24 13:14:40 -07:00
671341f0e3 Separate daemon/graphdriver/overlay/copy into its own package
Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Upstream-commit: 5298785b8e612ca5d3943fada08a46978971ba70
Component: engine
2017-10-24 13:14:40 -07:00
54e6932cca Merge pull request #35217 from cpuguy83/fix_chroot_mount_race
Use rslave instead of rprivate in chrootarchive
Upstream-commit: d891f2e3cab7509d5fe9336c7d2efffe1934accc
Component: engine
2017-10-24 22:13:28 +02:00
d78181e968 Remove solaris files
For obvious reasons that it is not really supported now.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5a9b5f10cf967f31f0856871ad08f9a0286b4a46
Component: engine
2017-10-24 15:39:34 -04:00
2740139c0c Merge pull request #35125 from ripcurld0/reload_no_config
Reload daemon even if "/etc/docker/daemon.json" does not exist
Upstream-commit: 04e8d7b8bfc531fdfc6fb201fae39820002455fe
Component: engine
2017-10-24 21:23:49 +02:00
68eac4a32f Merge pull request #35055 from adnxn/creds-endpoint
Add credentials endpoint option for awslogs driver
Upstream-commit: 158c072bde002c574e10f54763844f67e0ae34c0
Component: engine
2017-10-24 14:45:14 -04:00
3f2845711e Merge pull request #35273 from chchliang/containerstate
add testcase IsValidStateString
Upstream-commit: 05026b187b35dfa97e5f4895c6c0a21feb8bc90d
Component: engine
2017-10-24 14:32:37 -04:00
8c5d2bc78d [integration-cli] ensureFrozenImages here too
Checks + pulls down the frozen images in the integration-cli
tests too. Fixes an issue where they wouldn't be pulled if running
against just integration-cli tests, e.g. through TESTFLAGS

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: c95b17e598409000deb265945c5e80256de7db9f
Component: engine
2017-10-24 14:24:25 -04:00
89c643c206 Update libnetwork
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 0d4e2531888c3696db490e90708a1faf40afb510
Component: engine
2017-10-24 11:11:02 -07:00
5ab47d5b72 Merge pull request #639 from thaJeztah/add-squash-known-issue
Mention known limitations for --squash
Upstream-commit: 465a83a140
Component: cli
2017-10-24 12:04:59 -04:00
835cb984a3 Mention known limitations for --squash
The experimental `docker build --squash` feature has a number
of limitations. For most use-cases, multi-stage builds are
a better alternative.

This patch lists the known limitations, and adds a link to
multi-stage builds.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bcc228ac6b
Component: cli
2017-10-24 14:32:06 +02:00
eca1900380 trust: define new commands and helpers
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 5ab3ae7aba
Component: cli
2017-10-24 11:23:35 +02:00
d7f53f25fe vendor: update notary and deps for new trust commands
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: f47b1a3c6d
Component: cli
2017-10-24 11:23:32 +02:00
44eef72d75 add testcase IsValidStateString
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
Upstream-commit: 675ac37482432e13d1312647762d9db8b9bb175e
Component: engine
2017-10-24 09:49:58 +08:00
d0c54aaf3d Merge pull request #35184 from darrenstahlmsft/shutdownTimeout
Increase container default shutdown timeout on Windows
Upstream-commit: 7848b8beb9d38a98a78b75f78e05f8d2255f9dfe
Component: engine
2017-10-23 13:05:35 -07:00
46f41afac1 Fix stdout and errors in image/trust
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8f86a25029
Component: cli
2017-10-23 13:54:55 -04:00
259cc0cc87 Increase container default shutdown timeout on Windows
The shutdown timeout for containers in insufficient on Windows. If the daemon is shutting down, and a container takes longer than expected to shut down, this can cause the container to remain in a bad state after restart, and never be able to start again. Increasing the timeout makes this less likely to occur.

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: ed74ee127f42f32ee98be7b908e1562b1c0554d7
Component: engine
2017-10-23 10:31:31 -07:00
9e02505935 Merge pull request #35267 from mcandre/patch-1
[vim] support *.Dockerfile
Upstream-commit: 8ca8cc219db45bc1228a70c99d24d8b01759e019
Component: engine
2017-10-23 10:13:45 -07:00
74a0738e87 Merge pull request #35253 from Microsoft/jjh/startuplogging
Windows: Fix startup logging
Upstream-commit: 2058854c4b118b28abe638befbb98320526da902
Component: engine
2017-10-23 18:43:41 +02:00
fb72d25156 Merge pull request #35248 from tophj-ibm/add-integration-testsetup
[integration] add setupTest to integration test
Upstream-commit: 78cd8e8d18ce250e7cd66ffe60666cfdad4ea02f
Component: engine
2017-10-23 18:39:13 +02:00
1dbedcfc9e Merge pull request #34895 from mlaventure/containerd-1.0-client
Containerd 1.0 client
Upstream-commit: 402540708c9a0c35dc0b279a0f330455633537b8
Component: engine
2017-10-23 10:38:03 -04:00
ab1d1d2aa8 support *.Dockerfile
Probably a good idea to treat `*.Dockerfile` as dockerfile format as well. In general, it's better to use the `Dockerfile` part as an extension rather than a basename.

Signed-off-by: Andrew Pennebaker <andrew.pennebaker@gmail.com>
Upstream-commit: 2f5146ba1d413a7a07943648fd37e73f076361be
Component: engine
2017-10-22 11:16:06 -05:00
b49329396e Reload daemon even if "/etc/docker/daemon.json" does not exist
Before this commit if "--config-file" wasn't set the daemon would use
the default configuration file which is "/etc/docker/daemon.json".

When attempting to reload the daemon if that file didn't exist
and error message would display.

This behaviour is changed in a way that if the default configuration
file does not exist and no other configuration file is set
the daemon uses an empty configuration which later will be updated
and reloaded using the "reload" function given as an argument in Reload.

However, if the "--config-file" is set and the file is removed
or renamed an error message will be displayed and no reload will be done.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 0f8119a87dc301e9543c45c416d6b4545da1fc46
Component: engine
2017-10-22 15:20:52 +03:00
1c3f4cf12c Fixup some issues with plugin refcounting
In some circumstances we were not properly releasing plugin references,
leading to failures in removing a plugin with no way to recover other
than restarting the daemon.

1. If volume create fails (in the driver)
2. If a driver validation fails (should be rare)
3. If trying to get a plugin that does not match the passed in capability

Ideally the test for 1 and 2 would just be a unit test, however the
plugin interfaces are too complicated as `plugingetter` relies on
github.com/pkg/plugin/Client (a concrete type), which will require
spinning up services from within the unit test... it just wouldn't be a
unit test at this point.
I attempted to refactor this a bit, but since both libnetwork and
swarmkit are reliant on `plugingetter` as well, this would not work.
This really requires a re-write of the lower-level plugin management to
decouple these pieces.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3816b514387efd24394f0b8e61d55502aa6ac9ac
Component: engine
2017-10-21 15:17:57 -04:00
edb0598a8f [integration] ensure frozen images are loaded
Ensures that the frozen test images are loaded in the daemon
before any tests are run.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 58151358c0c296c2cf601aea528d5e8a11a20d12
Component: engine
2017-10-20 16:51:13 -04:00
869831ccd7 Merge pull request #632 from mstanleyjones/fix-system-prune-f-flag
For system prune, -f is not an alias for --filter
Upstream-commit: 3352c0e137
Component: cli
2017-10-20 16:17:19 -04:00
e18e9addc6 Add Ubuntu 17.10, Artful
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 1468941a50dba7e0a82a01cb938338041f028ef9
Component: packaging
2017-10-20 11:46:49 -07:00
7b8e36ff5a For system prune, -f is not an alias for --filter
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: d4e5481cd4
Component: cli
2017-10-20 10:51:28 -07:00
e59c840b6d Merge pull request #35077 from ryansimmen/35076-WindowsDaemonTmpDir
Windows Daemon should respect DOCKER_TMPDIR
Upstream-commit: ab0eb8fcf6fe6b4ee12393edcd6465501b5c66a1
Component: engine
2017-10-20 08:40:43 -07:00
f2d8311eb8 Merge pull request #35059 from cpuguy83/35002_handle_bind_create_errors
idtools don't chown if not needed
Upstream-commit: 113bebe0ee690246323171dad82f939c97fb2778
Component: engine
2017-10-20 08:39:23 -07:00
4fab58b1ff Merge pull request #624 from mstanleyjones/guidance-on-labels
Update info on labels
Upstream-commit: 3785a314e1
Component: cli
2017-10-20 16:33:13 +02:00
3242c0b622 Fix tests creating zombie processes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 617f89b9a357c0176efc2b5b28af8b36f5ebdbcb
Component: engine
2017-10-20 07:11:38 -07:00
044d7f995b Update libcontainerd to use containerd 1.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ddae20c032058a0fd42c34c2e9750ee8f6296ac8
Component: engine
2017-10-20 07:11:37 -07:00
3655b65e84 Merge pull request #35178 from chchliang/registryconfig
Add ValidateIndexName testcase
Upstream-commit: 4df80ae0535cb8e69780f28fe0028134e4d69909
Component: engine
2017-10-20 15:58:54 +02:00
02485e8657 Vendor containerd 1.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7acea2a243d25c061d12a2a2f8bbd4e5955a85f4
Component: engine
2017-10-19 13:19:41 -07:00
55cea3f58e idtools don't chown if not needed
In some cases (e.g. NFS), a chown may technically be a no-op but still
return `EPERM`, so only call `chown` when neccessary.

This is particularly problematic for docker users bind-mounting an NFS
share into a container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fa9709a3fc51785c3dc0f7ca8f54dafde2e291ab
Component: engine
2017-10-19 16:06:25 -04:00
d03ac8e017 Fix startup logging
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7d0dea10557e01865d67aa90c43b294fa6b36c42
Component: engine
2017-10-19 11:09:29 -07:00
3d080c31d7 Merge pull request #35237 from tklauser/unix-major-minor
Use Mkdev, Major and Minor functions from golang.org/x/sys/unix
Upstream-commit: bf1376f44a1177de2dc08d8470c80316f5df67f3
Component: engine
2017-10-19 17:26:06 +02:00
fcfff58f66 Windows Daemon should respect DOCKER_TMPDIR
Signed-off-by: Ryan Simmen <ryan.simmen@gmail.com>
Upstream-commit: 5611f127a7028c40a2ba59a1a09f92cdfe99f2ba
Component: engine
2017-10-19 10:47:46 -04:00
90d3bf5347 Use Mkdev, Major and Minor functions from golang.org/x/sys/unix
Update golang.org/x/sys to 8dbc5d05d6edcc104950cc299a1ce6641235bc86 in
order to get the Major, Minor and Mkdev functions for every unix-like
OS. Use them instead of the locally defined versions which currently use
the Linux specific device major/minor encoding.

This means that the device number should now be properly encoded on e.g.
Darwin, FreeBSD or Solaris.

Also, the SIGUNUSED constant was removed from golang.org/x/sys/unix in
https://go-review.googlesource.com/61771 as it is also removed from the
respective glibc headers.

Remove it from signal.SignalMap as well after the golang.org/x/sys
re-vendoring.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 86f080cff0914e9694068ed78d503701667c4c00
Component: engine
2017-10-19 08:28:38 +02:00
d2bb6cfe29 Add ValidateIndexName testcase
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
Upstream-commit: 0ddc903cec5594ba3cfd5043798321c983fc4eba
Component: engine
2017-10-19 08:53:26 +08:00
4e34887dae Merge pull request #35222 from xuri/xuri_patch
Typo fixed and simple code.
Upstream-commit: 239d61f04bf1c00273c1c89b531fe37993e08a9f
Component: engine
2017-10-18 07:51:41 +02:00
d91c638398 Typo fixed and simple code.
Signed-off-by: Ri Xu <xuri@360.net>
Upstream-commit: 87e8a936e82ecfbef59b829d8bbfca3fb4aa3163
Component: engine
2017-10-18 10:26:58 +08:00
f9aa6f8b5d Merge pull request #35220 from heddle317/remove-unused-code-todo
Removing unused code with a TODO that no longer needs to be done
Upstream-commit: 7dbbd4e2ba2ef0a19e9e8d42439780300218ad87
Component: engine
2017-10-17 14:24:27 -07:00
6bfaa3dd46 Elaborate more about port allocation in docs
Describe more how host port allocation is done when
container is stopped/started in "PublishAllPorts".

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: dfd706e1a59c3830c87b8240c466489ae6cc9d15
Component: engine
2017-10-17 15:19:54 +03:00
9816812d14 Merge pull request #35157 from BSWANG/fix-panic-on-restore
fix panic on get container pid when live restore containers
Upstream-commit: fa2df86ab62a231c8859400540bb4542143f3e0c
Component: engine
2017-10-16 20:24:20 -04:00
b229e5ca88 Merge pull request #35205 from cyphar/oci-obey-CL_UNPRIVILEGED
daemon: oci: obey CL_UNPRIVILEGED for user namespaced daemon
Upstream-commit: 046c3ea4331dda40a86676c463e7c1ffda76e8ae
Component: engine
2017-10-16 17:10:13 -07:00
fdc015d172 Removing unused code with a TODO that no longer needs to be done
Signed-off-by: Kate Heddleston <kate.heddleston@gmail.com>
Upstream-commit: 736fafb2d0b8b70573978f3d220be65afb1587f4
Component: engine
2017-10-16 14:57:48 -07:00
3c89b7fafe Use rslave instead of rprivate in chrootarchive
With `rprivate` there exists a race where a reference to a mount has
propagated to the new namespace, when `rprivate` is set the parent
namespace is not able to remove the mount due to that reference.
With `rslave` unmounts will propagate correctly into the namespace and
prevent the sort of transient errors that are possible with `rprivate`.

This is a similar fix to 117c92745b

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5ede64d63fec0b9d4cf921b6f8fb946e65287538
Component: engine
2017-10-16 13:49:31 -04:00
2ac0f85aa9 Update info on labels
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: e49e1ea739
Component: cli
2017-10-16 10:10:49 -07:00
77fe26d1a3 daemon: oci: obey CL_UNPRIVILEGED for user namespaced daemon
When runc is bind-mounting a particular path "with options", it has to
do so by first creating a bind-mount and the modifying the options of
said bind-mount via remount. However, in a user namespace, there are
restrictions on which flags you can change with a remount (due to
CL_UNPRIVILEGED being set in this instance). Docker historically has
ignored this, and as a result, internal Docker mounts (such as secrets)
haven't worked with --userns-remap. Fix this by preserving
CL_UNPRIVILEGED mount flags when Docker is spawning containers with user
namespaces enabled.

Ref: https://github.com/opencontainers/runc/pull/1603
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: c0f883fdeeb2480970fb48fbcbc2a842aa5a90e8
Component: engine
2017-10-16 02:52:56 +11:00
24d0fa40df Bump Go to 1.8.4
Bumps the Go version used to 1.8.4, which contains
security fixes; https://groups.google.com/forum/#!topic/golang-announce/1hZYiemnkdE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9f50d4449ab79e467e7c2a2a498bf00ebd9db48c
Component: packaging
2017-10-14 23:26:31 +02:00
505cf3697a Merge pull request #35189 from chris-crone/e2e-no-default-logs
Do not print e2e test logs by default
Upstream-commit: f2afa26235941fd79f40eb1e572e19e4ac2b9bbe
Component: engine
2017-10-14 07:49:40 -04:00
210282a543 Removing titles from md files
Signed-off-by: John Mulhausen <john@docker.com>
Upstream-commit: 4a5db8d27e
Component: cli
2017-10-13 15:24:06 -07:00
70444882b3 Merge pull request #254 from andrewhsu/c
minimize changelog template
2017-10-13 14:42:55 -07:00
f0e2a3825e Merge pull request #35192 from itsafire/master
fixing return value
Upstream-commit: 64eabb7f695dc948a76b96ea4204f8a755e45985
Component: engine
2017-10-13 13:24:10 -07:00
03dc500ba7 Merge pull request #34509 from thaJeztah/fix-network-delete
Fix network name masking network ID on delete
Upstream-commit: 0181eb8f213284b0fae754f28123076c5cab9be4
Component: engine
2017-10-13 08:40:09 -07:00
b5021afc0e Merge pull request #620 from dnephin/add-nakedret-linter
Add nakedret linter
Upstream-commit: 1401d5daf2
Component: cli
2017-10-13 14:54:00 +02:00
a13666782c fixing return value
Signed-off-by: Andreas Elvers <andreas@work.de>
Upstream-commit: 547dd4f95d032c8a2cb590a85767472e65e916db
Component: engine
2017-10-13 13:59:48 +02:00
061914f0d5 e2e: Do not print test logs by default
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 5195ec8fb064795df77290a100e5d21ee482d68a
Component: engine
2017-10-13 13:40:21 +02:00
587a1111a1 Merge pull request #35139 from simonferquel/fix-remaining-containers-on-fail
Test & Fix build with rm/force-rm matrix
Upstream-commit: 9a166a74d174c34122fa1a3dfaf86e61f3ea1caf
Component: engine
2017-10-13 12:27:41 +02:00
9528dbc7cf Merge pull request #616 from thaJeztah/bump-moby
Bump moby to 1ffa10ee2630917e4f2a88f5e4daf34d700eaa1f
Upstream-commit: 54a10d544c
Component: cli
2017-10-13 11:48:41 +02:00
c90eb48e09 Merge pull request #34960 from sterchelen/34953-Prune-Volume-lack-event-entry
Fix #34953 how volumes are pruned from daemon
Upstream-commit: 2a7388a6c47a58c402acfe0059fbe27a7a090c23
Component: engine
2017-10-12 09:24:26 -07:00
0f96be35a7 Add nakedret linter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dbd96badb6
Component: cli
2017-10-12 11:48:51 -04:00
817827c1bc Test & Fix build with rm/force-rm matrix
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 172e73a1dfb894c54fdc93fa6ef338eb1374d06c
Component: engine
2017-10-12 10:22:40 +02:00
aeff250acf Merge pull request #35173 from tophj-ibm/fix-raft-quorum-test
[integration-cli] fix flaky raft test
Upstream-commit: dc74e31bb211faa189ef83469d7f58dfde0b052a
Component: engine
2017-10-11 22:23:18 -07:00
c077b5031b Merge pull request #35151 from thaJeztah/always-return-version-information
Always return version and server headers
Upstream-commit: 591b2eeeb37c285d637a2c4071a59302010128cc
Component: engine
2017-10-11 18:11:35 -07:00
f0af38693c Updates for updated moby version
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e56a58e4ed
Component: cli
2017-10-12 01:02:10 +02:00
3854f6d75a Bump moby to 1ffa10ee2630917e4f2a88f5e4daf34d700eaa1f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2f393694c2
Component: cli
2017-10-12 01:01:48 +02:00
594afcb5ff Merge pull request #35144 from Microsoft/jjh/fixdownlevel
Fix regression on inspect
Upstream-commit: 1ffa10ee2630917e4f2a88f5e4daf34d700eaa1f
Component: engine
2017-10-12 00:52:28 +02:00
4cde2a075b Merge pull request #35172 from cpuguy83/for_linux_126_dont_abort
Don't abort when setting may_detach_mounts
Upstream-commit: 02a2ba3e8b095f901d55020225a7300bf1eb04e1
Component: engine
2017-10-12 00:47:31 +02:00
107b0ea669 Merge pull request #611 from albers/completion-stack-deploy--resolve-image
Add bash completion for `stack deploy --resolve-image`
Upstream-commit: 6ef0ea82ea
Component: cli
2017-10-11 22:28:51 +02:00
81908c29d1 Merge pull request #580 from djgoosen/patch-1
Update rmi.md
Upstream-commit: 0a6e1cb3aa
Component: cli
2017-10-11 22:17:46 +02:00
f8ec7d1b83 Always return version and server headers
If a 400 error is returned due to an API version mismatch, no
version and server-identification headers were returned by the API.

All information in these headers is "static", so there is no
reason to omit the information in case of an error being
returned.

This patch updates the version middleware to always
return the headers.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e9dac5ef5e8a4b0ecce0c89d337fea90f2c6aef3
Component: engine
2017-10-11 22:06:43 +02:00
33fa7572b6 Fix network name masking network ID on delete
If a network is created with a name that matches another
network's ID, the network with that name was masking the
other network's ID.

As a result, it was not possible to remove the network
with a given ID.

This patch changes the order in which networks are
matched to be what we use for other cases;

1. Match on full ID
2. Match on full Name
3. Match on Partial ID

Before this patch:

    $ docker network create foo
    336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b

    $ docker network create 336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b
    4a698333f1197f20224583abce14876d7f25fdfe416a8545927006c315915a2a

    $ docker network ls
    NETWORK ID          NAME                                                               DRIVER              SCOPE
    4a698333f119        336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b   bridge              local
    d1e40d43a2c0        bridge                                                             bridge              local
    336717eac9ea        foo                                                                bridge              local
    13cf280a1bbf        host                                                               host                local
    d9e4c03728a0        none                                                               null                local

    $ docker network rm 336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b
    4a698333f1197f20224583abce14876d7f25fdfe416a8545927006c315915a2a

    $ docker network ls
    NETWORK ID          NAME                DRIVER              SCOPE
    d1e40d43a2c0        bridge              bridge              local
    336717eac9ea        foo                 bridge              local
    13cf280a1bbf        host                host                local
    d9e4c03728a0        none                null                local

After this patch:

    $ docker network create foo
    2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835

    $ docker network create 2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835
    6cbc749a529cd2d9d3b10566c84e56c4203dd88b67417437b5fc7a6e955dd48f

    $ docker network ls
    NETWORK ID          NAME                                                               DRIVER              SCOPE
    6cbc749a529c        2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835   bridge              local
    166c943dbeb5        bridge                                                             bridge              local
    2d1791a7def4        foo                                                                bridge              local
    6c45b8aa6d8e        host                                                               host                local
    b11c96b51ea7        none                                                               null                local

    $ docker network rm 2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835
    2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835

    $ docker network ls
    NETWORK ID          NAME                                                               DRIVER              SCOPE
    6cbc749a529c        2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835   bridge              local
    166c943dbeb5        bridge                                                             bridge              local
    6c45b8aa6d8e        host                                                               host                local
    b11c96b51ea7        none                                                               null                local

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e52001c56e12e4fc63fb5d89ef919295d6ddd5d5
Component: engine
2017-10-11 21:57:05 +02:00
09a047bcdd Merge pull request #35171 from justincormack/update-roadmap
Update the Roadmap
Upstream-commit: 38c5af2c44f67b58b5bb33c1ab519f37f5263083
Component: engine
2017-10-11 12:02:43 -07:00
6bfc0ecd57 Don't abort when setting may_detach_mounts
83c2152de503012195bd26069fd8fbd2dea4b32f sets the kernel param for
fs.may_detach_mounts, but this is not neccessary for the daemon to
operate. Instead of erroring out (and thus aborting startup) just log
the error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c6a2044497e0e1ff61350859c8572a2c31c17ced
Component: engine
2017-10-11 14:54:24 -04:00
2890f26aa9 Merge pull request #35150 from thaJeztah/fix-api-version-check
Return 400 error if API client is too new
Upstream-commit: 6f117e266f244b06c3e59fc6ab66c652b2e601ec
Component: engine
2017-10-11 11:26:12 -07:00
92d9dda9c1 [integration-cli] fix flaky raft test
Fixes previously flaky TestAPISwarmRaftQuorum.

In the test we are shutting down 2 of 3 nodes, all of which are managers.
When this happens the remaining node prepares to step down from being
a leader because there is no longer an active quorum. This test was
written before that change was implemented, and assumes that the
remaining node can still handle requests to create a service (it can't)

There was further flakiness depending on whether or not the node has
stepped down or was in the process of doing so. Fix this by waiting
for the node to completely step down and checking to see if it errors
out like it should.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: fd32d49c490126d830be6c1008ab20f6ffcee56c
Component: engine
2017-10-11 14:23:55 -04:00
fff68fafe8 Merge pull request #618 from albers/completion-secret-create--driver
Add bash completion for `secret create --driver`
Upstream-commit: 5c9784e3a3
Component: cli
2017-10-11 13:10:00 -04:00
0750d56f05 Add bash completion for secret create --driver
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1d7a31f87e
Component: cli
2017-10-11 18:55:28 +02:00
e23a8c6c1c Update the Roadmap
As part of the Moby transition (see #35115), update the Roadmap to
reflect the new priorities. Also just update it as it was written
a while back, and we made some progress in areas such as `containerd`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: de86d33b4a39d095e29b4857bc768363a70b3adc
Component: engine
2017-10-11 17:33:50 +01:00
c1fc769d9d Merge pull request #35113 from tych0/drop-useless-apparmor
drop useless apparmor denies
Upstream-commit: 9b9d00dd4b515918683e47fbb406d8a8f1c9cdbf
Component: engine
2017-10-11 18:12:51 +02:00
721e1b72bc Merge pull request #35170 from akimd/readme
API: minor fixes in the README
Upstream-commit: eee2df1083851f6c8e4365cd74a5997ad5f99624
Component: engine
2017-10-11 16:31:33 +02:00
68a51d42bd Merge pull request #34941 from dsheets/authz-tests-api-port
integration/plugin/authz: port tests from integration-cli
Upstream-commit: fe33ea9b0e5a295118feee0f46f45d92f8cc6103
Component: engine
2017-10-11 16:15:56 +02:00
9dcd903628 API: minor fixes in the README
The main point is to fix a non ASCII space character that wrecks the
markdown handling.

Signed-off-by: Akim Demaille <akim.demaille@docker.com>
Upstream-commit: ce58cd5a346d2ef02cd9b893e4a51f10382aaf11
Component: engine
2017-10-11 16:12:10 +02:00
ce49598ea9 Merge pull request #607 from riyazdf/update-dct-push-and-pull
Mutate image references where needed for trusted pulls
Upstream-commit: b70f9296dd
Component: cli
2017-10-11 15:08:04 +02:00
cd4b6a83b5 Merge pull request #35165 from justincormack/no-logo
Remove Docker logo
Upstream-commit: 303aec061129a5e60706da6f0344018ad052eb6e
Component: engine
2017-10-11 15:05:08 +02:00
1d7efaf3d1 Remove Docker logo
No longer used as we are using the Moby logo.

Refer to #35115 for more details.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 9b87491729ad0b3e7bc2a97a1006ae43f5aef969
Component: engine
2017-10-11 13:17:59 +01:00
a5efd59e9b Merge pull request #35156 from yongtang/lego
Bring "Lego set" back in README.md
Upstream-commit: f762604fd099bc334525274138a796617c66659e
Component: engine
2017-10-11 12:05:42 +01:00
a2e7813d7e Fix tests after Hash() behavior change
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d5b15f0d3ee6b9575a919ca5ba568631957425e0
Component: engine
2017-10-10 14:23:12 -07:00
66b3ea1c4e Update e2e test for image pull to check stdout
Also add TEST_DEBUG env variable for debugging E2E tests.
And change icmd environment helpers to fit the CmdOp interface os they
can be passed to 'icmd.RunCmd()'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b11c11ea74
Component: cli
2017-10-10 17:04:49 -04:00
ac808691c3 Refactor runPull to remove second GetImageReferencesAndAuth
Fix unit tests to catch the regression.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e548861481
Component: cli
2017-10-10 16:32:27 -04:00
ac06921a97 factor out rigging for pushing unsigned busybox image
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 7dda6fc3c9
Component: cli
2017-10-10 12:00:52 -07:00
697f2a54c7 update image pull tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 46f3d8bb7f
Component: cli
2017-10-10 11:20:54 -07:00
8990f67e9c get e2e working with notary service
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ade675d36c
Component: cli
2017-10-10 11:19:02 -07:00
d57a85ccfd update e2e tests for content trust tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 6e3bafd06b
Component: cli
2017-10-10 11:19:02 -07:00
f57d5e7b36 trust: update references when pulling
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 067fff8b03
Component: cli
2017-10-10 11:19:02 -07:00
4d03b3fd97 Merge pull request #35128 from thaJeztah/fix-ContainerExecAttach-type
Use correct type for ContainerExecAttach
Upstream-commit: 8b24d2a96024d7aa35a26744ea7c7df577accc4b
Component: engine
2017-10-10 10:59:16 -07:00
c5166635d0 Update rmi.md
Signed-off-by: Daniel Goosen <daniel.goosen@surveysampling.com>
Upstream-commit: 9004495541
Component: cli
2017-10-10 10:27:54 -07:00
24531cb28a Merge pull request #54 from seemethere/change_ubuntu_trusty_package_mirror
Switches ubuntu trusty mirror to one that works
Upstream-commit: e2507465495d5361fe9501a5f5e7172779a67e63
Component: packaging
2017-10-10 10:21:32 -07:00
69522bfabb Switches ubuntu trusty mirror to one that works
Was getting 404's with the old one, consider this one temporary until
canonical fixes their stuff.

Related:
https://bugs.launchpad.net/cloud-images/+bug/1711735

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 8e177368d0a30614a7ba615f3c2f2ede1e21ff8e
Component: packaging
2017-10-10 10:19:03 -07:00
41e90bb713 Merge pull request #33488 from raja-sami-10p/pkg/idtools
Increase Coverage of pkg/idtools
Upstream-commit: be4586fffd0f4eb095fd6d94ad067dbf220c1bd3
Component: engine
2017-10-10 18:37:49 +02:00
5a2940263e Merge pull request #35064 from LK4D4/replace_timer
Replace NewTimer().C with After
Upstream-commit: b6aa01570cd8d679afd716f648aeaeb35238fa79
Component: engine
2017-10-10 08:47:37 -07:00
b77f073e16 Merge pull request #35136 from ripcurld0/refactor_plugin_store_get
Refactor plugin store to reduce nested if's in Get
Upstream-commit: 34d502eb9e39847b170dc4f9d6598f6bc2627e9b
Component: engine
2017-10-10 08:07:36 -07:00
84fbbffdb4 fix panic on get container pid when live restore containers
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
Upstream-commit: db8de0d0da0a5285dfc35d2c81553a1b2d8db24e
Component: engine
2017-10-10 22:45:34 +08:00
1ec5c9a00f Merge pull request #34758 from ghislainbourgeois/33495-add-tcp-to-gelf-log-driver
Add TCP support for GELF log driver
Upstream-commit: 3437f0f4e57453097c42088fcfc2ac6bf7c59170
Component: engine
2017-10-10 10:26:01 -04:00
1fb3125256 Add "Lego set" back in README.md
This PR adds the nice concept of "Lego set" back in README.md.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d3787d1fdabd1c01b1de1aa761d76f888a533a01
Component: engine
2017-10-10 14:10:39 +00:00
5c3deebf70 Merge pull request #35141 from justincormack/update-readme
Update README for Moby Project
Upstream-commit: 786311be7d011960801d713f0d01ea9d36f63170
Component: engine
2017-10-10 12:51:52 +02:00
efe89988fe Return 400 error if API client is too new
Commit e98e4a71110fd33852bb755a9b8b4ebc9df904db implemented API version
negotiation using the `/_ping` endpoint. In that change, URL validation for the
maximum supported API version was removed from the API server (validation for
the _minimum_ version was kept in place).

With this feature, clients that support version negotiation would negotiate the
maximum version supported by the daemon, and downgrade to an older API version
if the client's default API version is not supported.

However, clients that do _not_ support version negotiation can call API versions
that are higher than the maximum supported version. Due to the missing version
check, this is silently ignored, and the daemon's default API version is used.

This is a problem, because the actual API version in use is non-deterministic;
for example, calling `/v9999.9999/version` on a daemon that runs API v1.34 will
use API v1.34, but calling the same URL on an older daemon may use API version
v1.24.

This patch reverts the removal of the API check for maximum supported versions.
The documentation has been updated accordingly

Before this patch is applied, the daemon returns a 200 (success):

    $ curl -v --unix-socket /var/run/docker.sock http://localhost/v9999.9999/version
    *   Trying /var/run/docker.sock...
    * Connected to localhost (/Users/sebastiaan/Library/Containers/com.dock) port 80 (#0)
    > GET /v9999.9999/version HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.54.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Api-Version: 1.32
    < Content-Length: 240
    < Content-Type: application/json
    < Date: Tue, 10 Oct 2017 09:11:29 GMT
    < Docker-Experimental: true
    < Ostype: linux
    < Server: Docker/17.09.0-ce (linux)
    <
    {"Version":"17.09.0-ce","ApiVersion":"1.32","MinAPIVersion":"1.12","GitCommit":"afdb6d4","GoVersion":"go1.8.3","Os":"linux","Arch":"amd64","KernelVersion":"4.9.49-moby","Experimental":true,"BuildTime":"2017-09-26T22:45:38.000000000+00:00"}
    * Connection #0 to host localhost left intact

After this patch is applied, a 400 (Bad Request) is returned:

    $ curl -v --unix-socket /var/run/docker.sock http://localhost/v9999.9999/version
    *   Trying /var/run/docker.sock...
    * Connected to localhost (/var/run/docker.sock) port 80 (#0)
    > GET /v9999.9999/info HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 400 Bad Request
    < Content-Type: application/json
    < Date: Tue, 10 Oct 2017 08:08:34 GMT
    < Content-Length: 89
    <
    {"message":"client version 9999.9999 is too new. Maximim supported API version is 1.34"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 01f9227ec9116b3969cb0725787e43a5fa26aac2
Component: engine
2017-10-10 11:17:48 +02:00
c4c23db3b4 Merge pull request #35117 from johnstep/fix-windows-manifest-lists
Stop filtering Windows manifest lists by version
Upstream-commit: 9ed0922683779a65bf729bcc2efef73d7536e543
Component: engine
2017-10-09 20:46:01 -07:00
388f100559 Merge pull request #35103 from abhi/master
Modifying integration test due to new ipam options in swarmkit
Upstream-commit: 9b8203c09678fd06aebb97e9418ca7f8ea0805ba
Component: engine
2017-10-09 19:32:41 -07:00
3730192eec Fix downlevel regression
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9b2a20819e7b29ce4dee46d87e8c32ae7ca9899
Component: engine
2017-10-09 13:47:28 -07:00
6cafcfb61b Vendoring libnetwork and swarmkit
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: 2083121b0923dd084fc92873648b7ce74f725da5
Component: engine
2017-10-09 13:08:03 -07:00
3547a4b45b Refactor plugin store to reduce nested if's in Get
This patch removes the nested if's  in the Get function
and makes the code more readable.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 36ebf9489c3c6c8422d8ff9bb6e2cb65a9a66698
Component: engine
2017-10-09 22:21:27 +03:00
0772688cf2 Merge pull request #35138 from vdemeester/foo
Carry 35078 : Fix TestErrorCases to run all tests
Upstream-commit: 513f0e6c26cfac31d41a1eb249758907950cb7be
Component: engine
2017-10-09 12:16:16 -07:00
f174f34034 Fix #34953 how volumes are pruned from daemon
- Call the function that create an event entry while volumes are
pruning.
- Pass volume.Volume type on volumeRm instead of a name. Volume lookup is done
on the exported VolumeRm function.
- Skip volume deletion when force option used and it does not exists.

Signed-off-by: Nicolas Sterchele <sterchele.nicolas@gmail.com>
Upstream-commit: 63864ad8c17f0119a38af3cb9b1bc64a8afd0584
Component: engine
2017-10-09 21:15:26 +02:00
db22136d30 Update README for Moby Project
As described in #35115 Completing the Moby Transition, we would like to complete the transition
stage that we began a while back. This tries to clarify what and who this project is for.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 737410d3f5f8579a26cfa009f4a654bbdf9ce485
Component: engine
2017-10-09 15:25:21 +01:00
9de8f7c5a8 Merge pull request #35129 from thaJeztah/add-content-length-headers
API docs: add information about Content-Length header
Upstream-commit: d9cd40d58bef2f607d4a798c99eb98cf56aab112
Component: engine
2017-10-09 06:42:54 -07:00
4d1cde4541 Fix TestErrorCases to run all tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d2c41f06c36dc24b2170fef365563d64cc5bd8ec
Component: engine
2017-10-09 15:15:58 +02:00
a808a78d53 Add bash completion for stack deploy --resolve-image
Also adds minimal documentation for this flag.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9559b9b7a8
Component: cli
2017-10-09 13:39:54 +02:00
9b23ae7d55 API docs: add information about Content-Length header
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a249ec36dd75df0fffa5d22f98422f778c60126e
Component: engine
2017-10-09 01:43:10 +02:00
016304f346 Use correct type for ContainerExecAttach
ContainerExecAttach used `types.ExecConfig` instead of `types.ExecStartCheck`,
which is the type that's expected by the `/exec/execid/start` API endpoint.

Investigating when this inconsistency was introduced, I found that the client has
sent the additional properties since its first imlpementation in
c786a8ee5e9db8f5f609cf8721bd1e1513fb0043.

The `postContainerExecStart()` at that time used the "jobs" package, which
only took the information from the body that was needed (`Detach` and `Tty`).

Commit 24425021d26f29a475702064181e6c99fb6bd1c5 refactored the Exec commands
to remove the "jobs", and introduced the `ExecStartCheck` type, but failed to
update the `cli.hijack()` call with the new type.

The change in this patch should not affect compatibility with older clients,
as the additional information from the `ExecConfig` type is not used (the
API server already decodes to the `ExecStartCheck` type).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5fee8bddfeb9b268f3e0b3c91e0932ee9a5eff83
Component: engine
2017-10-09 01:25:46 +02:00
0fea1e1271 Merge pull request #35086 from friederbluemle/fix-github-spelling
Fix GitHub spelling
Upstream-commit: 97575ecda9bce64b12ead7b588da7acebb01fa22
Component: engine
2017-10-08 23:21:26 +02:00
e42b52cb32 Merge pull request #492 from albers/completion-daemon--network-control-plane-mtu
Add bash completion for `dockerd --network-control-plane-mtu`
Upstream-commit: fb7a817583
Component: cli
2017-10-08 17:49:58 +02:00
a7e36cfccc Fix returned error code for network creation from 500 to 409
Signed-off-by: He Xiaoxi <tossmilestone@gmail.com>
Upstream-commit: ab1871872d547e01f78a8a6c7af96c6cf05f793d
Component: engine
2017-10-08 16:00:00 +08:00
6fe1666e36 Merge pull request #610 from albers/completion-service--detach
Update bash completion and deprecation for synchronous service updates
Upstream-commit: e3c580c300
Component: cli
2017-10-07 15:31:48 +02:00
c50c8a6cf3 Update deprecation for synchronous service updates
- The default was not changed in 17.09 but will be in 17.10
- `service scale` and `service rollback` are also affected.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 20d9ceca78
Component: cli
2017-10-07 14:28:56 +02:00
80eb2d603b Update bash completion for synchronous docker service commands
The default value for
`docker service create|update|scale|rollback --detach|-d` changed from
`true` to `false`.
This updates bash completion to complete just `--detach|-d`.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 60bfaba6fb
Component: cli
2017-10-07 13:57:26 +02:00
e06cccc917 Add bash completion for docker trust commands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bb28364824
Component: cli
2017-10-07 13:29:10 +02:00
a34160d786 Remove unused variable from bash completion
Removes a copy & paste leftover.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 891c3a9d96
Component: cli
2017-10-07 13:29:10 +02:00
5fecfe49b1 Stop filtering Windows manifest lists by version
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: 8ed8f4a71d7e1a936fa077b4348b7375c81746a6
Component: engine
2017-10-06 22:37:31 -07:00
a08850286d Merge pull request #34642 from Microsoft/jjh/add-platform-to-api
LCOW: API: Add `platform` to /images/create and /build
Upstream-commit: a3efe9722f34af5cf4443fe3a5c4e4e3e0457b54
Component: engine
2017-10-06 22:17:17 -07:00
3d973055bf LCOW: API change JSON header to string POST parameter
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d98ecf2d6cdad7dae65868398440cfdc855e5263
Component: engine
2017-10-06 15:26:48 -07:00
35db73fa01 LCOW: API: Add platform to /images/create and /build
Signed-off-by: John Howard <jhoward@microsoft.com>

This PR has the API changes described in https://github.com/moby/moby/issues/34617.
Specifically, it adds an HTTP header "X-Requested-Platform" which is a JSON-encoded
OCI Image-spec `Platform` structure.

In addition, it renames (almost all) uses of a string variable platform (and associated)
methods/functions to os. This makes it much clearer to disambiguate with the swarm
"platform" which is really os/arch. This is a stepping stone to getting the daemon towards
fully multi-platform/arch-aware, and makes it clear when "operating system" is being
referred to rather than "platform" which is misleadingly used - sometimes in the swarm
meaning, but more often as just the operating system.
Upstream-commit: 0380fbff37922cadf294851b1546f4c212c7f364
Component: engine
2017-10-06 11:44:18 -07:00
1bfeb65ddc Fix GitHub spelling
Signed-off-by: Frieder Bluemle <frieder.bluemle@gmail.com>
Upstream-commit: b80472cef449d900ca9496d97e1527556ff6a04f
Component: engine
2017-10-07 00:10:24 +08:00
70ad19f2e6 drop useless apparmor denies
These files don't exist under proc so this rule does nothing.

They are protected against by docker's default cgroup devices since they're
both character devices and not explicitly allowed.

Signed-off-by: Tycho Andersen <tycho@docker.com>
Upstream-commit: b4a6ccbc5fe695062111cad5a20bb3d0ac5a94db
Component: engine
2017-10-06 09:11:59 -06:00
f7a982fdaa Modifying swarm integration test
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: 7e6b2165ef58e68ad4eafd457e8de89dd4c2c6b1
Component: engine
2017-10-05 18:20:00 -07:00
318e1046f2 Merge pull request #35090 from dmcgowan/windows-support-os-version
Add support for Windows version filtering on pull
Upstream-commit: b8571fd81c7d2223c9ecbf799c693e3ef1daaea9
Component: engine
2017-10-05 17:31:23 -07:00
9d743bcb10 Merge pull request #598 from thaJeztah/fix-dockerd-heading-levels
Fix dockerd reference heading levels
Upstream-commit: 1649af8129
Component: cli
2017-10-06 01:51:19 +02:00
dace19a103 Add support for Windows version filtering on pull
Update logic to choose manifest from manifest list to check
for os version on Windows. Separate the logic for windows
and unix to keep unix logic the same.


Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 38aef56e1fcb8ea318df98c89cf002267b88a136
Component: engine
2017-10-05 13:31:58 -07:00
6a849f46fd Merge pull request #603 from thaJeztah/fix-service-create-markdown
Fix markdown link in service-create reference docs
Upstream-commit: 0f659d99bd
Component: cli
2017-10-05 21:49:29 +02:00
8a57c20de6 Merge pull request #35088 from thaJeztah/bump-golang-to-1.8.4
Bump Go to 1.8.4
Upstream-commit: 2bc9bff86707737ff5df5f23b613d16281f9d223
Component: engine
2017-10-05 21:46:55 +02:00
e55a2343f6 Merge pull request #547 from rdxmb/small-change
small reference change
Upstream-commit: 2801d382c6
Component: cli
2017-10-05 11:56:33 -07:00
6464eb5e89 Merge pull request #35022 from thaJeztah/fix-conflict-status-code
Fix conflicting container name producing 400 error instead of 409
Upstream-commit: f8806b18b4b92c5e1980f6e11c917fad201cd73c
Component: engine
2017-10-05 11:18:06 -07:00
aba7eac9a8 Merge pull request #35085 from thaJeztah/update-portconfig-swagger
Add PortConfig.PublishMode to API documentation
Upstream-commit: f0e393bd0a3064aa72e7aebe2308d518c8fce676
Component: engine
2017-10-05 11:15:17 -07:00
50093b06f0 Merge pull request #600 from thaJeztah/bump-golang-to-1.8.4
Bump Go to 1.8.4
Upstream-commit: 08d81681af
Component: cli
2017-10-05 18:49:00 +02:00
35d18f8b33 Bump Go to 1.8.4
Bumps the Go version used to 1.8.4, which contains security fixes;
https://groups.google.com/forum/#!topic/golang-announce/1hZYiemnkdE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6b35e98a61
Component: cli
2017-10-05 18:43:33 +02:00
7cd305fd99 Add docs for Dockerfile ADD/COPY --chown flag
Document the new `--chown` flag added to the ADD and COPY commands in
the Dockerfile format.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: a83b9f102b
Component: cli
2017-10-05 12:35:01 -04:00
2af9de07de Fix load order
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: af8f563922
Component: cli
2017-10-05 12:03:29 -04:00
87d82fc493 Merge pull request #35087 from corbin-coleman/fix-integration-stats-test
Fix One of the Docker Stats Tests in /integration-cli
Upstream-commit: ed082152f6e7c6c7c7fbf2bc777ba1ae88cb9073
Component: engine
2017-10-05 17:59:53 +02:00
bf9a49688b Merge pull request #35084 from thaJeztah/update-authors
Update mailmap and authors
Upstream-commit: a437b078d33bc4284de80be842d0ee9e5c8a18af
Component: engine
2017-10-05 12:21:34 +02:00
afca8202d7 Fix markdown link in service-create reference docs
Markdown nested in a HTML table doesn't work, so changing
the link to a plain HTML link.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6b6511f191
Component: cli
2017-10-05 12:17:40 +02:00
d9d9c820a9 Merge pull request #599 from friederbluemle/fix-github-spelling
Fix GitHub spelling
Upstream-commit: 472fcca185
Component: cli
2017-10-05 09:39:39 +02:00
b69e823a30 Merge pull request #35056 from tklauser/win-console-mode-consts
Use windows console mode constants from Azure/go-ansiterm
Upstream-commit: 1c4fad8135b52a8a6405aef897712c4ca7a6d168
Component: engine
2017-10-05 00:41:22 +02:00
cf634f106b Cast interpolated values
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 18ddec447a
Component: cli
2017-10-04 17:36:47 -04:00
691ff82d89 Update interface of Interpolate
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0aa7ca943c
Component: cli
2017-10-04 17:36:43 -04:00
9256ae419b Vendor gotestyourself/env
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: edcea7c7a6
Component: cli
2017-10-04 17:36:43 -04:00
8d9cd6c880 Replace NewTimer().C with After
It is the same thing

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
Upstream-commit: 1a517a4a429d2b4db15383fc9d514fc8db66f8d3
Component: engine
2017-10-04 14:24:19 -07:00
9aa7f4c8ce Bump Go to 1.8.4
Bumps the Go version used to 1.8.4, which contains
security fixes; https://groups.google.com/forum/#!topic/golang-announce/1hZYiemnkdE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 33e8141f63ccc1a660529cd0d3581bd908bc8c1b
Component: engine
2017-10-04 23:22:23 +02:00
d29f681cdb Use the first 12 characters of the ID to match the output of docker stats command
Signed-off-by: Corbin <corbin.coleman@docker.com>
Upstream-commit: 8c10098ea51017fb514bef5c31a310a3f2d0d411
Component: engine
2017-10-04 13:43:00 -07:00
9da01454db Fix conflicting container name producint 400 error instead of 409
Commit ebcb7d6b406fe50ea9a237c73004d75884184c33 removed string checking
for error messages, in favor of typed errors.

In this change, the status code for conflicting container  names
changed from 409 to 400 (validationError).

This patch add a `nameConflictError`, changing the status code to
409 as it was in older versions.

With this change applied, the correct 409 status is returned:

```bash
$ docker create --name c1 busybox
```

```bash
$ curl --unix-socket /var/run/docker.sock -v -XPOST -H"Content-Type: application/json" -d'{"Image":"busybox"}' http://localhost/containers/create?name=c1
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying /var/run/docker.sock...
* Connected to localhost (/var/run/docker.sock) port 80 (#0)
> POST /containers/create?name=c1 HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 19
>
* upload completely sent off: 19 out of 19 bytes
< HTTP/1.1 409 Conflict
< Api-Version: 1.33
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/17.06.0-dev (linux)
< Date: Thu, 28 Sep 2017 15:07:23 GMT
< Content-Length: 229
<
{"message":"Conflict. The container name \"/c1\" is already in use by container \"ed2efdc806c1883954e677eb9ab8cbc7e286c9c5934ef6724fd5d93c56744923\". You have to remove (or rename) that container to be able to reuse that name."}
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e424343b4348f994d5c2922e7556629a620b4b3b
Component: engine
2017-10-04 20:39:45 +02:00
ab0a17f568 Fix GitHub spelling
Signed-off-by: Frieder Bluemle <frieder.bluemle@gmail.com>
Upstream-commit: 45c9b9b6c1
Component: cli
2017-10-05 01:14:31 +08:00
962e70214f Fix dockerd reference heading levels
Commit ddadd3db49 changed
the heading levels of various sections, but as a result,
the "daemon configuration file" section (and other sections)
changed from a H2 to a H4, therefore no longer showing
up in the page's TOC / navigation bar.

This patch changes the heading level to a H3 for
sections that should show up in the page navigation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aca0421eb8
Component: cli
2017-10-04 18:09:12 +02:00
c1d495468d Add PortConfig.PublishMode to API documentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fd90733972c6e78a0871b068e01e29ae1ac97fd7
Component: engine
2017-10-04 15:34:08 +02:00
27685bd51b Update mailmap and authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4309d3cf6b12fb7e9c5f23b756aed33f6dd74d1e
Component: engine
2017-10-04 14:44:24 +02:00
7bcc658be1 Merge pull request #35072 from tophj-ibm/fix-kernel-version-detection
[integration-cli] fix s390x flaky test
Upstream-commit: d65ab869e8712d08fb94a5337b83df5d247bf25b
Component: engine
2017-10-03 23:46:10 +02:00
669254d0fe Merge pull request #568 from matt9ucci/DockerCompletion
Add link to DockerCompletion for PowerShell
Upstream-commit: f7ef79228e
Component: cli
2017-10-03 21:50:58 +02:00
d069c92fec Add gelf log driver plugin to Windows build
Signed-off-by: Mike Estes <mle_ii@yahoo.com>
Upstream-commit: 10b449b997373df37f285594a624545ad3e173b2
Component: engine
2017-10-03 12:42:54 -07:00
c75056fadb [integration-cli] fix s390x flaky test
s390x node-1 has kernel 4.6.0, kernel.CompareKernelVersion()
returns 0 if the kernels are equal, so include that.

Full logic for CompareKernelVersion() is
a > b ret 1,
a == b ret 0,
a < b ret -1

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: aa5ea652c8864f014e1fa480d7e504f0d742c170
Component: engine
2017-10-03 12:13:29 -04:00
7d7cb9a4d0 Merge pull request #593 from thaJeztah/add-create-output
Add output for "secrets" and "configs" on stack deploy
Upstream-commit: 1367fc1114
Component: cli
2017-10-03 11:06:04 -04:00
cbaa579597 Merge pull request #594 from thaJeztah/remove-deprecated-error-check
Remove use of deprecated IsErr...NotFound checks
Upstream-commit: daafdf3d84
Component: cli
2017-10-03 10:30:55 -04:00
b11186b8f9 Merge pull request #34342 from coolljt0725/fallback_to_naive_diff
Fallback to use naive diff driver if enable CONFIG_OVERLAY_FS_REDIRECT_DIR
Upstream-commit: 595b929c573236dd95111429039f7f0788c1a7e5
Component: engine
2017-10-03 06:45:17 -07:00
233679b950 Merge pull request #35069 from thaJeztah/remove-deprecated-error-check
Remove deprecated error checks
Upstream-commit: 882563b2d64a99f24923c4b2bfe90750f2fdd433
Component: engine
2017-10-03 06:40:47 -07:00
fdd1bd7910 Add output for "secrets" and "configs" on stack deploy
When deploying a stack from a compose file, the output did not show
that a secret or config was created. This patch adds messages for these.

Create a configuration file and compose file:

    $ cat > config.yml <<EOF
    hello: world
    EOF

    $ cat > secret.txt <<EOF
    p@ssw0rd
    EOF

    $ cat > docker-compose.yml <<EOF
    version: "3.3"
    services:
       test:
         image: nginx:alpine
         configs:
         - source: myconfig
           target: /my-config.yml
         secrets:
         - source: mysecret
           target: /my-secret.txt
    configs:
      myconfig:
        file: ./config.yml
    secrets:
      mysecret:
        file: ./secret.txt
    EOF

Before this patch is applied:

    $ docker stack deploy -c docker-compose.yml example
    Creating network example_default
    Creating service example_test

After this patch is applied:

    $ docker stack deploy -c docker-compose.yml example
    Creating network example_default
    Creating secret example_mysecret
    Creating config example_myconfig
    Creating service example_test

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a5113f4368
Component: cli
2017-10-03 15:13:10 +02:00
72747182f4 Remove deprecated IsErr...NotFound() functions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7553fc4bcd80d103096f2e8f662b7fb3c65b5249
Component: engine
2017-10-03 12:07:49 +02:00
886e433681 Replace uses of deprecated IsErr...Notfound()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 919726b5dbf7f063f82eac2f5384966fc7271710
Component: engine
2017-10-03 12:05:03 +02:00
338d1dac66 Remove use of deprecated IsErr...NotFound checks
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 532a3942d6
Component: cli
2017-10-03 12:01:24 +02:00
1941c5110e Merge pull request #35063 from LK4D4/locker_benchmarks
pkg/locker: add benchmarks
Upstream-commit: a8e7aca3fd2aeefa24b3f1a039f8c63b0301cacf
Component: engine
2017-10-03 09:45:56 +02:00
9aa431ea90 Merge pull request #560 from dnephin/fix-bind-mount-named-pipe-compose
Support parsing of named pipes for compose volumes
Upstream-commit: 448d56a491
Component: cli
2017-10-03 09:29:13 +02:00
63ac4b5569 Skip all testdata in integration
Also skip.IfCondition directly from the test, so that the skip message is correct

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 104c1c68438c5c59ab0e7a5fb2da6bae4ce6d080
Component: engine
2017-10-02 17:02:52 -04:00
d35ee25d03 pkg/locker: add benchmarks
Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
Upstream-commit: 889cfd1b441e8039bb6b78e8c54276b8eb03cdef
Component: engine
2017-10-02 11:20:21 -07:00
d52520c4a7 Merge pull request #579 from thaJeztah/dont-trunc-on-quiet
Do not truncate ID on docker service ps --quiet
Upstream-commit: adfc2d17a0
Component: cli
2017-10-02 10:33:23 -04:00
4b75060b8c integration/plugin/authz: inline CLI work-alike library
I strongly disagree with the design of this pull request.

Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 1574d91463efd4741c2f6620718abdb624967584
Component: engine
2017-10-02 14:20:59 +01:00
8ebec737fa integration/plugin/authz: port tests from integration-cli
Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 928b0631c96ae5cb0105b3bf42d43ba529a14aa1
Component: engine
2017-10-02 14:20:59 +01:00
0ccfca8508 Improve presentation of published port ranges
Port mappings in `docker service ls` are quite verbose, and occupy a lot of
space when ranges of ports are published.

This patch improves the output by reconstructing ranges of ports.

Given the following service;

    $ docker service create \
      -p 60-61:60-61 \
      -p 62:61 \
      -p 80:80 \
      -p 81:80 \
      -p 90-95:90-95 \
      -p 90-92:90-92/udp \
      -p 93-96:93-96/udp \
      --name foo \
      nginx:alpine

Before this patch is applied:

    $ docker service ls
    ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
    u1kwguv841qg        foo                 replicated          1/1                 nginx:alpine        *:60->60/tcp,*:61->61/tcp,*:62->61/tcp,*:80->80/tcp,*:81->80/tcp,*:90->90/tcp,*:91->91/tcp,*:92->92/tcp,*:93->93/tcp,*:94->94/tcp,*:95->95/tcp,*:90->90/udp,*:91->91/udp,*:92->92/udp,*:93->93/udp,*:94->94/udp,*:95->95/udp,*:96->96/udp

After this patch is applied:

    $ docker service ls
    ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
    u1kwguv841qg        foo                 replicated          1/1                 nginx:alpine        *:60-62->60-61/tcp,*:80-81->80/tcp,*:90-95->90-95/tcp,*:90-96->90-96/udp

Additional enhancements can still be made, and marked as TODO in this change;

- combine non-consecutive ports mapped to a single port (`80->80`, `81->80`,
  `84->80`, `86->80`, `87->80`); to be printed as `*:80-81,84,86-87->80`.
- combine `tcp` and `udp` mappings if their port-mapping is the same;
  print `*:80-81->80-81/tcp+udp` instead of `*:80-81->80-81/tcp, *:80-81->80-81/udp`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e98e95e7bc
Component: cli
2017-10-02 12:54:20 +02:00
5f75b4dbc3 Merge pull request #578 from thaJeztah/bump-tonistiigi-fsutil
vendor tonistiigi/fsutil to dea3a0da73aee887fc02142d995be764106ac5e2
Upstream-commit: 63b795e71f
Component: cli
2017-10-02 11:00:11 +02:00
46c885c3e3 Use all console mode constants from go-ansiterm
The missing console mode constants were added to go-ansiterm in
Azure/go-ansiterm#23. Use these constants instead of defining them
locally.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 9335683fa50c4863ada4bf00a30e7dfbfef3c783
Component: engine
2017-10-02 09:49:20 +02:00
81273ccd92 vendor: re-vendor github.com/Azure/go-ansiterm
Re-vendor go-ansiterm to d6e3b3328b783f23731bc4d058875b0371ff8109 in
order to get the newly added console mode constants.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 2b946fbc7012eff745e23aa43672f4ce4c5208a6
Component: engine
2017-10-02 09:47:38 +02:00
7a1f68fd02 Add credentials endpoint option for awslogs driver
Signed-off-by: Adnan Khan <adnkha@amazon.com>
Upstream-commit: c7cc9d67590dd11343336c121e3629924a9894e9
Component: engine
2017-10-02 00:25:49 -07:00
5f36dc5666 Merge pull request #35052 from x1957/typo
fix typo
Upstream-commit: 1e94a4862ee2d92976c26ff741585d090169ed42
Component: engine
2017-10-01 15:31:11 -04:00
cfbb3b1158 Merge pull request #34874 from pascalgn/patch-1
Reworded push message
Upstream-commit: 4a244c3558ab6985ba110d261920b575016fd2d4
Component: engine
2017-10-01 10:29:43 -07:00
76886c96d8 fix typo
Signed-off-by: Yuhao Fang <fangyuhao@gmail.com>
Upstream-commit: c673319dea5adcb33379b13f8e70c1d157e7c87d
Component: engine
2017-10-01 23:11:58 +08:00
d7b8803737 Merge pull request #50 from thaJeztah/add-debian-buster
Add builds for debian buster
Upstream-commit: a7630bdc8bb0a5928174675d4948a437eaf4849e
Component: packaging
2017-09-30 13:38:22 -07:00
a6c488e8bc Do not truncate ID on docker service ps --quiet
Running `docker service ps --quiet` should print the
full, non-truncated ID, even if the `--no-trunc` option
is not set.

This patch disables truncation if the `--quiet` flag
is set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c5f267d95c
Component: cli
2017-09-30 22:23:37 +02:00
ae4be632f1 Merge pull request #35045 from thaJeztah/bump-tonistiigi-fsutil
vendor tonistiigi/fsutil to dea3a0da73aee887fc02142d995be764106ac5e2
Upstream-commit: 9c9f4d6f70a14e00902cae19dd586a6faa6476f6
Component: engine
2017-09-30 13:23:30 -07:00
1c031cd7d9 vendor tonistiigi/fsutil to dea3a0da73aee887fc02142d995be764106ac5e2
removes the stevvooe/continuity dependency, which has moved to
containerd/continuity.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 197842fd45
Component: cli
2017-09-30 18:26:02 +02:00
4e99cb1e84 vendor tonistiigi/fsutil to dea3a0da73aee887fc02142d995be764106ac5e2
removes the stevvooe/continuity dependency, which has moved to
containerd/continuity.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e3c130df944bc433efe7bc5bddebbb1ac0f35d93
Component: engine
2017-09-30 18:04:11 +02:00
e3c5bf234d Merge pull request #577 from stevvooe/allocate-channel
cli/command/container: ensure channel is allocated
Upstream-commit: 583015b896
Component: cli
2017-09-30 12:33:40 +02:00
b123db0bdc Merge pull request #35044 from thaJeztah/bump-api-version-1.34
Bump API version to 1.34
Upstream-commit: 19015df2b06769a0908ba9eeae72d9b785684ed3
Component: engine
2017-09-29 22:20:30 -10:00
4b6bbc7c4a Merge pull request #35040 from thaJeztah/bump-vndr
Bump vndr to a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
Upstream-commit: e223bbedc127b7260ac2c8702cbd8e41d764b4d1
Component: engine
2017-09-29 16:48:52 -10:00
a0cdbef9a2 cli/command/container: ensure channel is allocated
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: e78772af4d
Component: cli
2017-09-29 18:12:03 -07:00
6e3b4640d2 Bump API version to 1.34
Docker 17.10 was cut off from ab2b03a0e139537376bbf66c1e1e9e897a403f06

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 288abf0854852b4542da359400b3c29e99941fc9
Component: engine
2017-09-30 01:13:20 +02:00
b92094248e Merge pull request #576 from thaJeztah/bump-version
Bump version to 17.11.0-dev
Upstream-commit: b75be206d0
Component: cli
2017-09-30 01:10:00 +02:00
6d5c926ee5 Merge pull request #258 from andrewhsu/e
update moby-extras tool fixes git param
2017-09-29 16:09:47 -07:00
1ef62ff784 Bump version to 17.11.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2a82adcbe0
Component: cli
2017-09-30 00:59:27 +02:00
328a5917ad Merge component 'engine' from git@github.com:moby/moby master 2017-09-29 22:30:27 +00:00
8591aa0956 update moby-extras tool fixes git param
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-09-29 15:17:11 -07:00
09bc512154 Merge component 'cli' from git@github.com:docker/cli master 2017-09-29 22:08:57 +00:00
4b8b813d22 Merge pull request #570 from thaJeztah/bump-moby-vendor
Bump moby vendor to 14ce1f1cf48e9859223c6311de58aec4dc
Upstream-commit: 31908a4b45
Component: cli
2017-09-29 23:08:16 +02:00
0e6592d05e Merge pull request #572 from thaJeztah/bump-vendor-for-powerpc
revendor logrus and x/crypto
Upstream-commit: 00cc728dfb
Component: cli
2017-09-29 13:58:38 -07:00
4c4e74cebe Merge pull request #35042 from pradipd/panic_fix
Fixing panic when sandbox is nil
Upstream-commit: ab2b03a0e139537376bbf66c1e1e9e897a403f06
Component: engine
2017-09-29 12:51:55 -07:00
5103c6279f builder: fix build cache hash for broken symlink
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 793ebdbf4b187b3680aed0073643040ddbeef523
Component: engine
2017-09-29 09:27:51 -07:00
28e35b96d0 Fixing panic when sandbox is nil
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: c4ad0747e929a41ecec7e8c2ae2bd0cc037401ed
Component: engine
2017-09-29 09:23:06 -07:00
c9fbb737e9 Fixes for updated dependencies
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0082310aa5
Component: cli
2017-09-29 17:45:31 +02:00
c9e8020d97 bump moby/moby and dependencies to 14ce1f1cf48e9859223c6311de58aec4dc0f046c
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 98dbfeee76
Component: cli
2017-09-29 17:44:49 +02:00
0b195d3e47 Merge pull request #571 from thaJeztah/bump-vndr
Bump vndr to a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
Upstream-commit: 107f6c6ab2
Component: cli
2017-09-29 17:39:21 +02:00
a2cd96f46a Reworded push message
Changed push message from "The push refers to a repository" to "The push refers to the repository" to make it clearer that this is just an information about the local source and not a distinction between pushing single images or whole repositories.

Signed-off-by: Pascal <pascalgn@users.noreply.github.com>
Upstream-commit: d82948b75d8aba97816ff5257240c1edb5e8de5b
Component: engine
2017-09-29 17:02:20 +02:00
6230f06c47 revendor logrus and x/crypto
updates to the same version as is currently used
on moby/moby; this bump contains fixes for ppc64le.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e3b7700fb9
Component: cli
2017-09-29 15:32:42 +02:00
bf69bcbb74 Bump vndr to a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
Includes a fix to cleanup unused vendor-directories

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 67b1f54dc2413a018ac42e4335ca182a2d0b8a1d
Component: engine
2017-09-29 15:09:57 +02:00
5edb9ec08c Bump vndr to a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
Includes a fix to cleanup unused vendor-directories

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 368b639e7e
Component: cli
2017-09-29 14:58:05 +02:00
c90aa1161d Add link to DockerCompletion for PowerShell
Signed-off-by: Masatoshi Higuchi <matt9ucci@gmail.com>
Upstream-commit: f7dfc946fe
Component: cli
2017-09-29 17:04:33 +09:00
907b966c7e Merge pull request #35029 from fntlnz/builder/cleaning
Cleaning dead code out of the builder
Upstream-commit: de6cb7ab848d6131634e40d21d30bf2fe183e9a3
Component: engine
2017-09-29 16:28:02 +09:00
4034b44eca Cleaning dead code out of the builder
Signed-off-by: Lorenzo Fontana <lo@linux.com>
Upstream-commit: dff2a23749a6b7c949146d7850f514cd74e3a8d7
Component: engine
2017-09-29 02:55:35 +02:00
80c3ad8db1 Merge pull request #35008 from yujuhong/cli-version
Fix version comparison when negotiating the the API version
Upstream-commit: 14ce1f1cf48e9859223c6311de58aec4dc0f046c
Component: engine
2017-09-28 11:58:50 -10:00
d62e09de17 Merge pull request #35025 from Microsoft/jjh/TestRunAttachFailedNoLeak
Windows: RS3: Temporarily disable TestRunAttachFailedNoLeak
Upstream-commit: 048ef0db6a75898aee57bf725ed64940744cd938
Component: engine
2017-09-28 21:59:32 +02:00
5fe53bab44 Merge pull request #565 from thaJeztah/change-stats-format
Change default stats format and add --no-trunc flag
Upstream-commit: 64d5c32b8e
Component: cli
2017-09-28 15:14:43 -04:00
ae273c63d1 Merge component 'engine' from git@github.com:moby/moby master 2017-09-28 10:34:35 -07:00
4330196b5a Windows: RS3: Temporarily disable TestRunAttachFailedNoLeak
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9e587fa72b8cc42895681efe3d0b9fdcdfe3b06d
Component: engine
2017-09-28 10:15:58 -07:00
e25514ef0c Merge pull request #35004 from thaJeztah/dont-warn-for-comment-only-lines
Warn on empty continuation lines only, not on comment-only lines
Upstream-commit: 94b987043ffd372aad49dfc51c3be2c2f6cff97f
Component: engine
2017-09-28 08:56:30 -07:00
d6eb3e21a4 Merge pull request #35007 from seemethere/fix_service_detach_tests
Explicitly add --detach to service CLI calls
Upstream-commit: 5a4841079bc247937e6ed1042ab24ffd01a8547c
Component: engine
2017-09-28 11:17:14 +02:00
747a47b477 Fix version comparison when negotiating the the API version
Signed-off-by: Yu-Ju Hong <yjhong@google.com>
Upstream-commit: 4b6ec10b07c14e7fff1cc51156b6d954147f826f
Component: engine
2017-09-27 18:42:02 -07:00
d7aeee3eda remove --detach on scale
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 0ad0294124badebe0d9a73f1b7e2f030e4a24e2b
Component: engine
2017-09-27 17:47:51 -07:00
8d23cb5213 Merge pull request #34966 from AkihiroSuda/seccomp
Dockerfile: use seccomp provided by stretch
Upstream-commit: aa02e2b7bc1f5f4b921f64337e4f6d1cf7aa8fe4
Component: engine
2017-09-27 16:21:55 -07:00
ca5a5c5ca1 Explicitly add --detach to service CLI calls
The behavior of service (create/update/scale) was changed in a recent PR
to docker/cli. This commit serves to remedy test failures experienced
when attempting to use service calls.

Should not affect current behavior.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: e5b3ebbc649e4b1a10d4cdca342a153c301ec225
Component: engine
2017-09-27 16:17:55 -07:00
f6d296e26e Warn on empty continuation lines only, not for comments
Commit 8d1ae76dcbbb73d8e20c6a14a7d3fe2410b95f55 added
deprecation warnings for empty continuation lines,
but also treated comment-only lines as empty.

This patch distinguishes empty continuation lines
from comment-only lines, and only outputs warnings
for the former.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2fd736ac10c1c46d1001373d887cb99b3d8ee824
Component: engine
2017-09-28 00:11:10 +02:00
9e4f6bb515 minimize changelog template
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-09-27 11:31:04 -07:00
00bb761ead Merge pull request #34990 from pradipd/update_field_name
Update field name
Upstream-commit: 853df8f32bf560428fdc39dfd9bfa7bb7c610346
Component: engine
2017-09-27 20:00:18 +02:00
747646833d Merge component 'engine' from git@github.com:moby/moby master 2017-09-27 10:25:04 -07:00
b4a6a3d358 Add --no-trunc option to docker container stats
This patch adds a `--no-trunc` option to `docker container stats`;

With this patch applied, the default output is:

    CONTAINER ID        NAME                                    CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    b95a83497c91        awesome_brattain                        0.28%               5.629MiB / 1.952GiB   0.28%               916B / 0B           147kB / 0B          9
    67b2525d8ad1        foobar                                  0.00%               1.727MiB / 1.952GiB   0.09%               2.48kB / 0B         4.11MB / 0B         2
    e5c383697914        test-1951.1.kay7x1lh1twk9c0oig50sd5tr   0.00%               196KiB / 1.952GiB     0.01%               71.2kB / 0B         770kB / 0B          1
    4bda148efbc0        random.1.vnc8on831idyr42slu578u3cr      0.00%               1.672MiB / 1.952GiB   0.08%               110kB / 0B          578kB / 0B          2
    84e3deaa45b2        registry                                0.01%               3.402MiB / 1.952GiB   0.17%               127kB / 378B        233kB / 0B          10
    2ed915778ceb        foo.1.lsmxrefn5yp9c9ijz1hzgdq4u         0.00%               1.727MiB / 1.952GiB   0.09%               166kB / 7.76kB      614kB / 0B          2

Addin the `--no-trunc` option, changes the output to:

    CONTAINER ID                                                       NAME                                    CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    b95a83497c9161c9b444e3d70e1a9dfba0c1840d41720e146a95a08ebf938afc   awesome_brattain                        0.25%               5.75MiB / 1.952GiB    0.29%               648B / 0B           147kB / 0B          10
    67b2525d8ad10bb236a49960e93c09993b0baabeef12c2d46cd5f4fbb6f4808c   foobar                                  0.00%               1.727MiB / 1.952GiB   0.09%               2.35kB / 0B         4.11MB / 0B         2
    e5c383697914b98b10cbbc9d0bd324b7b927099ac584f031057b8208d2fba9b1   test-1951.1.kay7x1lh1twk9c0oig50sd5tr   0.00%               196KiB / 1.952GiB     0.01%               71.1kB / 0B         770kB / 0B          1
    4bda148efbc006b0063373c3678083159af89f8cc83a6a28def14cb0dd171f70   random.1.vnc8on831idyr42slu578u3cr      0.00%               1.672MiB / 1.952GiB   0.08%               110kB / 0B          578kB / 0B          2
    84e3deaa45b2fc363e06167df9b90ab59f88d4f101e3f9b8df03a62a8f6783e1   registry                                0.00%               3.387MiB / 1.952GiB   0.17%               127kB / 378B        233kB / 0B          10
    2ed915778cebddf9ec69263a75cfdcf00962a5198d94d42cda75d5cd45bb82f2   foo.1.lsmxrefn5yp9c9ijz1hzgdq4u         0.00%               1.727MiB / 1.952GiB   0.09%               166kB / 7.76kB      614kB / 0B          2

Which is the same as the default before this patch was applied.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e63417a9c0
Component: cli
2017-09-27 18:59:25 +02:00
915d4f9741 Merge component 'cli' from git@github.com:docker/cli master 2017-09-27 09:23:02 -07:00
a58b05b91c Update default output format for stats to include ID and Name
The `docker container stats` output has a column (`CONTAINER`), that shows either
the container _id_ or container _name_, depending on the arguments given.

For example, running `docker container stats foobar` shows:

    CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    foobar              0.00%               1.938MiB / 1.952GiB   0.10%               782B / 0B           4.11MB / 0B         2

Whereas `docker container stats 67b2525d8ad1` (`67b2525d8ad1` being the ID for
container `foobar`) shows:

    CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    67b2525d8ad1        0.00%               1.938MiB / 1.952GiB   0.10%               916B / 0B           4.11MB / 0B         2

This behavior is confusing.

This patch updates the default output format for `docker stats` to use separate
columns for container ID and container Name (similar to `docker container ls`).

With this patch applied, both commands show the same output:

    $ docker container stats foobar
    CONTAINER ID                                                       NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    67b2525d8ad10bb236a49960e93c09993b0baabeef12c2d46cd5f4fbb6f4808c   foobar              0.00%               1.938MiB / 1.952GiB   0.10%               1.25kB / 0B         4.11MB / 0B         2

    $ docker container stats 67b2525d8ad1
    CONTAINER ID                                                       NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    67b2525d8ad10bb236a49960e93c09993b0baabeef12c2d46cd5f4fbb6f4808c   foobar              0.00%               1.938MiB / 1.952GiB   0.10%               1.31kB / 0B         4.11MB / 0B         2

Users that want to use the old format can configure a custom format in the
cli configuration file (`~/.docker/config.json`);

on Linux:

    {
      "statsFormat" : "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}"
    }

on Windows:

    {
      "statsFormat" : "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"
    }

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a78472211
Component: cli
2017-09-27 18:05:51 +02:00
4d03073a2c Merge pull request #34811 from yongtang/runc
Update runc to 0351df1c5a66838d0c392b4ac4cf9450de844e2d
Upstream-commit: 502eddb9859dcd30ce46732b24cefe49cf1ccbd1
Component: engine
2017-09-27 08:44:43 -07:00
d14643fb47 Merge pull request #34792 from runcom/fix-relabel-symlinks
volume: evaluate symlinks before relabeling mount source
Upstream-commit: f60e7aac62a14907132aa5c3bc9d5cf5ca0e6ebc
Component: engine
2017-09-27 17:42:23 +02:00
240408899b Merge pull request #34928 from darrenstahlmsft/HnsRunning
Ensure Host Network Service exists
Upstream-commit: 6af60b3c6180817e06ce87d562643b442a866502
Component: engine
2017-09-27 17:35:08 +02:00
4262667057 Merge pull request #34985 from thaJeztah/remove-use-of-deprecated-filter-functions
Remove use of deprecated filter functions
Upstream-commit: a343cba40c25deb2893e13f9a81dbcc4d19d16e2
Component: engine
2017-09-27 17:34:07 +02:00
d873e90bed Update gitignore
Adding some lines from the Moby gitignore

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cdaf6f44ba
Component: cli
2017-09-27 16:45:35 +02:00
7ed1303eb4 Merge pull request #34881 from ityangchen/test-moby
"docker swarm init --force-new-cluster" use limit
Upstream-commit: 0b968f91958eea12c2fa82cec64790cb03367232
Component: engine
2017-09-27 14:11:46 +02:00
6d1342e805 Fix leading characters being stripped from example sections in YAML
`strings.Trim()` strips any character listed in the `cutset` argument,
so any example section having `E`, `x`, `a`, `m`, `p`, `l`, `e`, or `s`
in the first word, had these characters missing in the generated
YAML.

Also trim superfluent whitespace characters to consistently use `|-` ("strip")
as block chomping indicator (see http://www.yaml.org/spec/1.2/spec.html#id2794534)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1f605d43ca
Component: cli
2017-09-27 10:59:09 +02:00
82a0e7daf9 Increase Coverage of pkg/idtools
Signed-off-by: Danyal Khaliq <danyal.khaliq@tenpearls.com>
Upstream-commit: 00c0ee885c671942f9bc751c80cbc45b7f6404f3
Component: engine
2017-09-27 12:55:04 +05:00
689b8ff233 Merge pull request #562 from dnephin/update-gometalinter
Update gometalinter
Upstream-commit: feb4d79935
Component: cli
2017-09-27 09:42:37 +02:00
5a67fa7a37 Merge pull request #563 from riyazdf/remove-extra-options
trust: remove extraneous OPTIONS from commands that do not use it
Upstream-commit: e27e07a8a9
Component: cli
2017-09-27 09:41:33 +02:00
bb1eca37a9 trust: remove extraneous OPTIONS from commands that do not use it
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 9ad0e8f223
Component: cli
2017-09-26 16:15:45 -07:00
e4f32567d3 Updating moby to correspond to naming convention used in https://github.com/docker/swarmkit/pull/2385
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: d00a07b1e6d46c3cc9ef95e8b6227115830e2701
Component: engine
2017-09-26 22:08:10 +00:00
fa385958f4 vndr swarmkit 941a01844b89c56aa61086fecb167ab3af1de22b
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 8e15b1cffb95d1e82943a628353c6df7cd54f6c4
Component: engine
2017-09-26 22:08:10 +00:00
23c421f3c5 Merge pull request #557 from allencloud/add-more-event-filter-type
Add more event filters in doc: config, node, secret and service
Upstream-commit: 62d62ff513
Component: cli
2017-09-26 22:48:22 +02:00
de74f6b50c Merge pull request #34952 from allencloud/add-specific-event-filter
add node/service/secret/config specific event filter
Upstream-commit: afe31900915782daf67b40d405d8e7b8e01ab2dd
Component: engine
2017-09-26 22:46:41 +02:00
f99bd6dc82 Merge component 'engine' from git@github.com:moby/moby master 2017-09-26 12:50:25 -07:00
dead314452 Refactor image commands to make use of the new trust struct for trusted pull
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4203b49431
Component: cli
2017-09-26 15:15:42 -04:00
8a5301f81b Merge pull request #34911 from dnephin/new-ci-entrypoint
Add a new entrypoint for CI
Upstream-commit: a971f9c9d7d1bdc69b197a82c3fb010681f5cd1f
Component: engine
2017-09-26 11:50:44 -07:00
1a654751d3 Merge component 'cli' from git@github.com:docker/cli master 2017-09-26 10:56:04 -07:00
7fd47ecc0d Merge pull request #34961 from fcrisciani/libnetwork-vendoring
Vendoring libnetwork
Upstream-commit: 37eb796ccb6de7def92f0ab3f18c686ae92ef29f
Component: engine
2017-09-26 10:50:32 -07:00
09b100cab2 Merge pull request #34973 from darrenstahlmsft/fixError
Fix error string about containers feature
Upstream-commit: 9feef9287474d0e9afe489d9ad0b71a986a012cb
Component: engine
2017-09-26 18:44:12 +02:00
6424aeb9fa Merge pull request #34918 from thaJeztah/update-copy-add-error
Improve error message for COPY missing destination
Upstream-commit: 76b5ab6f43aeffe4261e2b1f848476d36d332880
Component: engine
2017-09-26 18:43:36 +02:00
57c6d20473 Merge pull request #34358 from ripcurld0/fix_link_problem
Add an integration test for bug #31392 regression
Upstream-commit: 584ed9603b4cb79160d0dd8689cdbbdedb9fe00f
Component: engine
2017-09-26 18:41:08 +02:00
f321e1ed9d Update gometalinter
The update includes bug fixes in gometalinter and updates to linters, which
discovered more linter problems.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d956386b2d
Component: cli
2017-09-26 12:33:35 -04:00
2a54e5d16e add node/service/secret/config specific event filter
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
Upstream-commit: 4611ecd3cdc9b2738f58a136b79f752add223f3f
Component: engine
2017-09-27 00:23:51 +08:00
e3c3856028 Merge pull request #34908 from thaJeztah/bump-api-version-1.33
Bump API version to 1.33
Upstream-commit: 74a084162ce544fe995715ba47aa84d3d75b95c1
Component: engine
2017-09-26 18:09:50 +02:00
86f10d67d5 add more event filters in doc: config, node, secret and service
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
Upstream-commit: fc98f8757a
Component: cli
2017-09-27 00:04:56 +08:00
399de7ee20 Merge pull request #551 from dnephin/set-local-constant
Use a local constant
Upstream-commit: 0856c20e04
Component: cli
2017-09-26 17:42:50 +02:00
7125e1b239 Support parsing of named pipes for compose volumes.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9f73b8c718
Component: cli
2017-09-26 11:24:23 -04:00
57dd97eab1 Merge pull request #555 from joaofnfernandes/docs/advertise-addr
Add note about joining through a load balancer
Upstream-commit: b77f3fd5ac
Component: cli
2017-09-26 17:15:42 +02:00
671d46ed3d Merge pull request #34983 from thaJeztah/suppress-tmp-rename-warning
Suppress warning for renaming missing tmp directory
Upstream-commit: 65234597216d03866bc26bdad06cb1f25f832206
Component: engine
2017-09-26 16:53:28 +02:00
9e59512fe4 Merge pull request #451 from tych0/use-pass-backend
Use pass backend
Upstream-commit: be8dab26a3
Component: cli
2017-09-26 16:40:32 +02:00
1fe51e0bb7 document the pass backend and default behavior
Also add a big warning about cleartext passwords.

Signed-off-by: Tycho Andersen <tycho@docker.com>
Upstream-commit: a2f116733b
Component: cli
2017-09-26 08:31:02 -06:00
5dbfedf3f9 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON()
`filters.ToParam()` and `filters.FromParam()` were deprecated in favor of
`filters.ToJSON()` and `filters.FromJSON()` in 065118390a3ecaf0dbd2fa752d54d43f8f1e8ec6,
but still used in various locations.

This patch replaces uses of `filters.ToParam()` and  `filters.FromParam()` with
`filters.ToJSON()` and `filters.FromJSON()`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a4efe66cf2a7648dbcf5b9993bf351925b905b5b
Component: engine
2017-09-26 13:59:45 +02:00
c4c68bf819 Replace uses of filters.Include() with filters.Contains()
The `filters.Include()` method was deprecated in favor of `filters.Contains()`
in 065118390a3ecaf0dbd2fa752d54d43f8f1e8ec6, but still used in various
locations.

This patch replaces uses of `filters.Include()` with `filters.Contains()`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 97c5ae25c4d857563acd1f3467afc760145b1d55
Component: engine
2017-09-26 13:39:56 +02:00
b987e63572 Update runc to 0351df1c5a66838d0c392b4ac4cf9450de844e2d
This fix updates runc to 0351df1c5a66838d0c392b4ac4cf9450de844e2d

With this fix the warnings generated by netgo and dlopen by go 1.9
are addressed.

See
- opencontainers/runc#1577
- opencontainers/runc#1579

This fix is part of the efforts for go 1.9 (#33892)

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e0ff1d147bc12234f1be25a620bf6b3bf3179d97
Component: engine
2017-09-26 11:07:27 +00:00
cbf8cc6faf Suppress warning for renaming missing tmp directory
When starting `dockerd` on a host that has no `/var/lib/docker/tmp` directory,
a warning was printed in the logs:

    $ dockerd --data-root=/no-such-directory
    ...
    WARN[2017-09-26T09:37:00.045153377Z] failed to rename /no-such-directory/tmp for background deletion: rename /no-such-directory/tmp /no-such-directory/tmp-old: no such file or directory. Deleting synchronously

Although harmless, the warning does not show any useful information, so can be
skipped.

This patch checks thetype of error, so that warning is not printed.
Other errors will still show up:

    $ touch /i-am-a-file
    $ dockerd --data-root=/i-am-a-file
    Unable to get the full path to root (/i-am-a-file): canonical path points to a file '/i-am-a-file'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b50b14aebc12722f81db8d8f66415e1fa7b954a
Component: engine
2017-09-26 12:04:30 +02:00
b4098a4e18 Merge pull request #34968 from chris-crone/integration-test-docker-ee
Docker EE integration test fixes
Upstream-commit: 147443a42665419d8b3c2047a7d345440bfb63c0
Component: engine
2017-09-26 10:50:09 +02:00
48757849a4 Merge pull request #34946 from dnephin/fix-jsonlog
Move pkg/jsonlog to be a subpackage of the single consumer
Upstream-commit: 7d47823c22945bb24a609a7ef20c0559d78d96e4
Component: engine
2017-09-26 10:49:57 +02:00
ec4868350d Add an integration test for bug #31392 regression
This verifies that bug #31392 won't surface again.

To reproduce the bug:
1) docker run -dit --name a0 busybox sh
2) docker run -dit --name b0 --link a0 busybox sh
3) docker rename a0 a1
4) docker run -dit --name a0 busybox sh
5) docker rm -f b0
6) docker run -dit --name b0 --link a0 busybox sh

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 48a26ba9e42f25ebc1ad732b4c0d31e77a7aaa55
Component: engine
2017-09-26 10:55:59 +03:00
fa79e0059e Merge pull request #34943 from tonistiigi/vendor-buildkit
vendor: update buildkit to aaff9d591
Upstream-commit: 4d48baacde3dd6bb9e4c4f8ef1319765ded031f4
Component: engine
2017-09-26 08:37:46 +02:00
3366e8951a Merge pull request #34965 from vdemeester/fix-pkg-mount-unit-test-under-selinux
Fix TestMount under a selinux system
Upstream-commit: 41313c87a25aec122fb43fdaf2433d1b121f1808
Component: engine
2017-09-26 08:37:22 +02:00
401172966f "docker swarm init --force-new-cluster" use limit
Signed-off-by: yangchenliang <yangchenliang@huawei.com>

When worker executor `docker swarm init
--force-new-cluster`,docker would hang.So only manager can process it.

Signed-off-by: yangchenliang <yangchenliang@huawei.com>
Upstream-commit: 12e947efdba5481020f6543514ade83d87c69a28
Component: engine
2017-09-26 12:05:19 +08:00
1608188995 Merge pull request #472 from riyazdf/docker-trust
docker trust: view, revoke, sign subcommands (experimental)
Upstream-commit: af3cdccf52
Component: cli
2017-09-25 17:26:52 -07:00
f367f50630 Move jsonlog to a subpackage of jsonfilelog
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 035604cca6d6bd9a432268caf7515a35023908ed
Component: engine
2017-09-25 16:07:25 -04:00
7d644fb209 Fix benchmarks and remove more unnecessary code.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a06ad2792ab92d4f246e4b4cc4c3529eb060651e
Component: engine
2017-09-25 16:07:25 -04:00
4701b66889 Remove unused JSONLog marshaling
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 231c5cbd50e1870f31eb6a525b2df2ed7a716565
Component: engine
2017-09-25 16:07:25 -04:00
a001c9d5c7 Remove unused Format
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 638d4cc7e4390ab217be711913017b22ce2cd5c2
Component: engine
2017-09-25 16:07:25 -04:00
0c6f170345 Unexport FastTimeMarshalJSON
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7de92de636ef307d66b7b20b24f166a47f40f72b
Component: engine
2017-09-25 16:07:25 -04:00
101f740d40 Move RFC3339NanoFixed to a more appropriate package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 27cfa68af16721c978803c3b695bcc7181ccc721
Component: engine
2017-09-25 16:07:24 -04:00
658351133f Fix error string about containers feature
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 31405b556f155d8f56902086c7c24efe25dd8de0
Component: engine
2017-09-25 12:39:27 -07:00
3c4574bac3 Ensure Host Network Service exists
If HNS does not exist on the Docker host, the daemon may fail with unexpected
and difficult to diagnose errors. This check prevents the daemon from starting
on a system that does not have the correct prerequisites.

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 1edcc63560cb1286f452565754092bc2eb428ffa
Component: engine
2017-09-25 11:07:44 -07:00
025e41d2ae Add note about joining through a load balancer
Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
Upstream-commit: 8595d15d60
Component: cli
2017-09-25 10:53:20 -07:00
702bac1553 mark command as experimental in docs and cli
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: e07f345267
Component: cli
2017-09-25 09:39:46 -07:00
e0bca90fda trust: rename inspect to view, add repo name to signer table header
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: c6db0cd7a1
Component: cli
2017-09-25 09:39:46 -07:00
94f2b59302 tests: use alice/bob/claire conventional names for signers
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 46a879e3b9
Component: cli
2017-09-25 09:39:46 -07:00
188ec7af2a trust: update remove to error on empty references for consistency
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 4e95fcd72c
Component: cli
2017-09-25 09:39:46 -07:00
a59fc63f3b tests: move trust test to proper package
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 67cf09cbe1
Component: cli
2017-09-25 09:39:46 -07:00
7c83ece8ef trust: update reference type and use golden output
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 4e89dc800a
Component: cli
2017-09-25 09:39:44 -07:00
1659928f34 tests: address review feedback
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 6fca400f1e
Component: cli
2017-09-25 09:38:41 -07:00
51f87f33d4 trust: use mock CLI for testing offline
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: f667bd7559
Component: cli
2017-09-25 09:38:40 -07:00
93ba24cc42 cli: introduce NotaryClient getter
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: e5c35ab9d1
Component: cli
2017-09-25 09:38:38 -07:00
b53048a314 trust: add Repository client interface
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 7c5b836ca5
Component: cli
2017-09-25 09:34:54 -07:00
e42a2df102 trust: address review feedback, refactor to align with existing cli/command semantics
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 45c102a03d
Component: cli
2017-09-25 09:34:53 -07:00
e92c4686dd docs: update docker trust docs with correct tense and formatting
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 007aff70bf
Component: cli
2017-09-25 09:34:53 -07:00
97f2ec42fa trust revoke: docs for docker trust revoke
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 43717a866e
Component: cli
2017-09-25 09:34:53 -07:00
e8d4ecb361 trust revoke: add docker trust revoke command
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 609f8b4b81
Component: cli
2017-09-25 09:34:53 -07:00
ad5c7cb4bb trust sign: docs for docker trust sign
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: bc665ed762
Component: cli
2017-09-25 09:34:53 -07:00
644ae3a3f1 trust sign: add docker trust sign command
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: fab6bb6798
Component: cli
2017-09-25 09:34:53 -07:00
1115dc5cef trust inspect: docs for docker trust inspect
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 809ef0fd74
Component: cli
2017-09-25 09:34:53 -07:00
530ee183f1 trust inspect: add docker trust inspect command with formatting print
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: ec6bc9460f
Component: cli
2017-09-25 09:34:52 -07:00
742798f154 trust: update existing code for new vendoring, refactor for docker trust code sharing
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 5846e6e5d5
Component: cli
2017-09-25 09:34:52 -07:00
86beae9d05 vendor: upgrade notary version for docker trust
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: fb1cbaeb66
Component: cli
2017-09-25 09:34:52 -07:00
0975184f91 Docker EE integration test fixes
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 8c5f98c93e06de81b7fb6416372a3f42aa7aeb5d
Component: engine
2017-09-25 18:09:19 +02:00
0c54b3a041 Improve error message for COPY missing destination
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5d05a8291314b8f727b04b504b8d7fc7ed7f42da
Component: engine
2017-09-25 14:17:18 +02:00
522e6cc8ec Do not use deprecated call for APIClient
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 82440a039f58b6a1487f8042486fe8dba675df54
Component: engine
2017-09-25 14:08:03 +02:00
0b2721b9c1 Protect environment for system integration tests
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: d43dac2202667a407f4c5ab061c04b0ea334aa20
Component: engine
2017-09-25 14:05:18 +02:00
e38ecccceb Match not implemented error check to others
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 7406088853b6cbcb8996c367062cee2e1ee6eaaa
Component: engine
2017-09-25 13:58:51 +02:00
954a7de027 Dockerfile: use seccomp provided by stretch
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 1b51a05375b48c5f655fbbedc5a1e7cba044122c
Component: engine
2017-09-25 10:03:37 +00:00
08619d0c7c Fix TestMount under a selinux system
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8bebd42df2d8eaa0ecdc9c78bc1e395a752eb5c9
Component: engine
2017-09-25 11:54:30 +02:00
5c2be22475 Merge pull request #307 from allencloud/sort-secrets-and-configs-in-cli
using nature sort secrets and configs in cli
Upstream-commit: bd6e1757f5
Component: cli
2017-09-25 09:41:50 +02:00
fdeab20153 sort secrets and configs in cli
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
Upstream-commit: 26f06c5bcb
Component: cli
2017-09-25 13:18:13 +08:00
28762b7242 Vendoring libnetwork
Fix for networkDB garbage collection (PR: https://github.com/docker/libnetwork/pull/1944)
Added extra logs to monitor the netowrkDB status and number of entries per network

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 04043428ea5ce679618aec2007b77ac51d0b6af0
Component: engine
2017-09-24 16:44:16 -07:00
0f097012c8 Merge pull request #546 from dnephin/fix-version-on-failure
Set APIVersion on the client, even when Ping fails
Upstream-commit: a41caadef0
Component: cli
2017-09-23 09:04:03 -04:00
753a551b2e Merge pull request #552 from allencloud/volume-has-no-id
remove volume id because it only has name
Upstream-commit: 29c4f0df57
Component: cli
2017-09-23 08:58:37 -04:00
a0ff43ff51 remove volume id because it only has name
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
Upstream-commit: fe1c1b6b5c
Component: cli
2017-09-23 11:26:56 +08:00
f3a4b20d25 Use a local constant
This constant is going to be removed from jsonlog package.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 32612058cb
Component: cli
2017-09-22 17:59:46 -04:00
278bf3cb85 Merge pull request #34929 from stevvooe/remove-promise-package
pkg/package: remove promise package
Upstream-commit: c982ee805d895a4fc2bf01f2d1d8afa06b408dd0
Component: engine
2017-09-22 11:52:23 -07:00
afac6be123 builder: updates to session after vendor
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d4729749023fde0c57cded0c8159dc85cd7ee448
Component: engine
2017-09-22 09:51:52 -07:00
441f6cef6d Set APIVersion on the client, even when Ping fails
Refactor to support testing
Also add tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e828efa4ab
Component: cli
2017-09-22 10:08:19 -04:00
120931ebc2 small reference change
Signed-off-by: Marc Bihlmaier <marc.bihlmaier@reddoxx.com>
Upstream-commit: 9490189cba
Component: cli
2017-09-22 10:49:30 +02:00
6771dc87e0 Merge pull request #34878 from chchliang/imagebranch
Add  testcases with ` Image` , covering all methods.
Upstream-commit: ba317637de9b9918cdc2139466dd51c6200bd158
Component: engine
2017-09-22 10:08:54 +02:00
793cd3af24 Merge pull request #30696 from yummypeng/lock-RWLayer-while-committing
Fixes #29654: take reference to RWLayer while committing/exporting
Upstream-commit: a157dc53a850dff19ead074f24f9eff61b9d0622
Component: engine
2017-09-22 09:41:57 +02:00
2d68241660 vendor: update buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ed6fd3d95bde4651ffb66d37cd1e5e76ee3c1f7b
Component: engine
2017-09-21 22:17:43 -07:00
d1d8439f3f Fixes #29654: take reference to RWLayer while committing/exporting
Take an extra reference to rwlayer while the container is being
committed or exported to avoid the removal of that layer.

Also add some checks before commit/export.

Signed-off-by: Yuanhong Peng <pengyuanhong@huawei.com>
Upstream-commit: 8c32659979150630a2c4eae4e7da944806c46297
Component: engine
2017-09-22 09:47:42 +08:00
efc44f60de Fallback to use naive diff driver if enable CONFIG_OVERLAY_FS_REDIRECT_DIR
When use overlay2 as the graphdriver and the kernel enable
`CONFIG_OVERLAY_FS_REDIRECT_DIR=y`, rename a dir in lower layer
will has a xattr to redirct its dir to source dir. This make the
image layer unportable. This patch fallback to use naive diff driver
when kernel enable CONFIG_OVERLAY_FS_REDIRECT_DIR

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 49c3a7c4bac2877265ef8c4eaf210159560f08b4
Component: engine
2017-09-22 09:40:18 +08:00
6700f361c5 pkg/package: remove promise package
The promise package represents a simple enough concurrency pattern that
replicating it in place is sufficient. To end the propagation of this
package, it has been removed and the uses have been inlined.

While this code could likely be refactored to be simpler without the
package, the changes have been minimized to reduce the possibility of
defects. Someone else may want to do further refactoring to remove
closures and reduce the number of goroutines in use.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 0cd4ab3f9a3f242468484fc62b46e632fdba5e13
Component: engine
2017-09-21 17:56:45 -07:00
3a50fe644a Merge pull request #34861 from tklauser/fix-cstring-leaks
Fix CString memory leaks
Upstream-commit: 777d4a1bf45c85db6931205d4adbe38a17c583d7
Component: engine
2017-09-21 09:14:07 -07:00
e22297f2e2 Merge pull request #34907 from chris-crone/set-test-ostype
Set integration test OSType with environment variable
Upstream-commit: 409d4711812c5c23815a783524e543ec653a234b
Component: engine
2017-09-21 04:13:17 -07:00
9f6a445ef2 Merge pull request #34910 from chris-crone/plugin-list-not-implemented
Handle plugin list not implemented
Upstream-commit: 7d8deaa0db40b8b88d8e5039d23d4fcdb627fc00
Component: engine
2017-09-21 04:12:35 -07:00
aebe8e8ce7 add Images testcase
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
Upstream-commit: 832f39c2ed53fc4a91265798198273044448bc7f
Component: engine
2017-09-21 17:54:29 +08:00
0dfdf37ab2 Merge pull request #34914 from euank/000003-percent
overlay2: fix faulty errcheck
Upstream-commit: 48cce229330561c104f777dac4f3f39ef2e2de6e
Component: engine
2017-09-20 19:52:10 -07:00
ccdce91e65 overlay2: fix faulty errcheck
The change in 7a7357dae1bcccb17e9b2d4c7c8f5c025fce56ca inadvertently
changed the `defer` error code into a no-op. This restores its behavior
prior to that code change, and also introduces a little more error
logging.

Signed-off-by: Euan Kemp <euan.kemp@coreos.com>
Upstream-commit: 639ab92f011245e17e9a293455a8dae1eb034022
Component: engine
2017-09-20 15:25:57 -07:00
e55d5634bf Add a new entrypoint for CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dbf580be57a4bb854d7ce20d313e3a22ea337be5
Component: engine
2017-09-20 17:26:30 -04:00
028b015443 Merge pull request #250 from seemethere/update_moby_components_hash
Hash needs to be updated for moby-components script
2017-09-20 13:40:13 -07:00
1e4bfaa04a Hash needs to be updated for moby-components script
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-09-20 13:25:51 -07:00
5cb2c664ef Merge pull request #34886 from cpuguy83/may_detach_mount
Automatically set `may_detach_mounts=1` on startup
Upstream-commit: 7d70d0fac339b2ed9715739748c89d0486456407
Component: engine
2017-09-20 11:31:45 -07:00
da0223d365 Set integration test OSType with environment variable
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: f0e5b3d7d89c0c87d001faa18bc60fd1b4531901
Component: engine
2017-09-20 19:50:17 +02:00
20c1a2b928 Handle plugin list not implemented
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: e7e11bdd44878d28c642d72761aa41eb9ffce3d1
Component: engine
2017-09-20 19:48:33 +02:00
9337e13113 prefer pass backend if it is available
Signed-off-by: Tycho Andersen <tycho@docker.com>
Upstream-commit: 713e87e780
Component: cli
2017-09-20 11:15:49 -06:00
6280c12bb9 version bump for docker-credential-helpers
Signed-off-by: Tycho Andersen <tycho@docker.com>
Upstream-commit: 6bd5c63c78
Component: cli
2017-09-20 11:15:49 -06:00
315e815656 defaultCredentialStore: make this a function
In the next patch, we'll use this to implement some logic about which
password backend to use.

Signed-off-by: Tycho Andersen <tycho@docker.com>
Upstream-commit: 4cf1849418
Component: cli
2017-09-20 11:14:27 -06:00
7e0e805bca Merge pull request #34863 from keloyang/close-pipe
Close pipe in overlay2 graphdriver
Upstream-commit: e40d5e665c6de904ea1e22bb3aa615638ec05e2a
Component: engine
2017-09-20 09:37:15 -07:00
cdbfcd2c1d Merge pull request #545 from thaJeztah/fix-nocopy-description
Fix nocopy description
Upstream-commit: 10e292dbab
Component: cli
2017-09-20 17:54:55 +02:00
36e37bb56e Merge pull request #544 from vdemeester/fix-build-loading
Fix loader error with different build syntax
Upstream-commit: 09c8f47af1
Component: cli
2017-09-20 11:03:54 -04:00
62cdceef74 Fix nocopy description
nocopy does not apply to bind mounts, only volumes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0e72a6ff81
Component: cli
2017-09-20 16:43:15 +02:00
de0f898e39 Automatically set may_detach_mounts=1 on startup
This is kernel config available in RHEL7.4 based kernels that enables
mountpoint removal where the mountpoint exists in other namespaces.
In particular this is important for making this pattern work:

```
umount -l /some/path
rm -r /some/path
```

Where `/some/path` exists in another mount namespace.
Setting this value will prevent `device or resource busy` errors when
attempting to the removal of `/some/path` in the example.

This setting is the default, and non-configurable, on upstream kernels
since 3.15.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 83c2152de503012195bd26069fd8fbd2dea4b32f
Component: engine
2017-09-20 09:57:25 -04:00
e2fa4c4d55 Bump API version to 1.33
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 15a59e763b6bdb44f28ffafb20e173606308ce2c
Component: engine
2017-09-20 15:19:16 +02:00
7d19908a7b Merge pull request #504 from albers/completion-search--format
Add bash completion for `search --format`
Upstream-commit: da82dcb1db
Component: cli
2017-09-20 14:41:28 +02:00
95b34532ce Fix loader error with different build syntax
`build: .` was not working anymore. Fixing this by adding a new
tranform function for BuildConfig.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0da9f14821
Component: cli
2017-09-20 14:02:33 +02:00
c59fc2b89e Merge pull request #352 from albers/fix-completion--credential-spec
Improve bash completion for `--credential-spec`
Upstream-commit: 16804b7313
Component: cli
2017-09-20 11:52:11 +02:00
48266cefa7 Merge pull request #531 from seemethere/add_cross_targets
Add a way to just build windows and osx
Upstream-commit: bd31cb4bd5
Component: cli
2017-09-20 08:52:56 +02:00
0ee27e86a8 Add a way to just build windows and osx
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 51080d6148
Component: cli
2017-09-19 16:48:31 -07:00
bb1c0c5aa8 Merge pull request #34846 from Microsoft/jjh/debuggcs
LCOW: Add UVM debugability by grabbing logs before tear-down
Upstream-commit: 7cbbbb95097f065757d38bcccdb1bbef81d10ddb
Component: engine
2017-09-19 22:33:46 +02:00
d9942eee10 Merge pull request #34117 from cpuguy83/decouple_plugin_manager_from_executor
Decouple plugin manager from libcontainerd package
Upstream-commit: b6b85da6576b3e923325897aab9b12d85c014e1b
Component: engine
2017-09-19 21:07:57 +02:00
5338e5013a Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-09-19 11:14:46 -07:00
46ea757ea5 Merge component 'engine' from git@github.com:moby/moby master 2017-09-19 11:14:35 -07:00
95004c9da9 Merge pull request #31993 from dccurtis/issue-31816
Fixing ‘docker cp’ to allow new target file name in a host symlinked directory
Upstream-commit: 149f3aceb277ecccd33ee815e9c54d6aec782ab5
Component: engine
2017-09-19 10:54:53 -07:00
d382cdf023 Merge pull request #33492 from simonferquel/typed-builder-commands-squashed
[Builder] Introduce a typed command system and 2 phase parse/dispatch build
Upstream-commit: 22e15721b1f33f32f07615e034cf3a7b4c865aa3
Component: engine
2017-09-20 02:52:23 +09:00
6a9321461a Merge pull request #34684 from cpuguy83/fix_selinux_with_mount_api
Set selinux label on local volumes from mounts API
Upstream-commit: 3ddced570dbd7c07291df15bf0b5ac02b04453ca
Component: engine
2017-09-19 13:43:40 -04:00
a5ceeb03a8 Merge component 'cli' from git@github.com:docker/cli master 2017-09-19 10:12:43 -07:00
ddb0ee3757 Revendor Microsoft/opengcs @ v0.3.4
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2798576b37aa99643a06366f00072b6026c0b77e
Component: engine
2017-09-19 09:56:23 -07:00
cb0c1a12c4 Decouple plugin manager from libcontainerd package
libcontainerd has a bunch of platform dependent code and huge interfaces
that are a pain implement.
To make the plugin manager a bit easier to work with, extract the plugin
executor into an interface and move the containerd implementation to a
separate package.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c85e8622a4813d7b72d74517faa03ab5de4c4550
Component: engine
2017-09-19 12:17:55 -04:00
84b2d8c7a7 Merge pull request #34732 from vizv/fix-relabel-config-files
daemon: relabel config files.
Upstream-commit: 1bb55e6495cea72d6bca17d90ab25573766d07b3
Component: engine
2017-09-19 08:46:54 -07:00
1411476434 Merge pull request #542 from vdemeester/tidying-loader-test-a-bit
Tidying up compose/loader test a bit
Upstream-commit: 9e162fb011
Component: cli
2017-09-19 17:44:08 +02:00
00de807109 Merge pull request #541 from thaJeztah/fix-service-create-markdown
Fix service_create markdown
Upstream-commit: 68935944b3
Component: cli
2017-09-19 17:17:45 +02:00
13c06c5996 Tidying up compose/loader test a bit
- Use `require` instead of `assert` when the assumption is "breaking" for the code
following. For example when asserting an error is not nil and then doing
`err.Error` on it ; if `err` is nil, the test will panic instead of fail.
- Use `assert.Len` when possible. The error message is better.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f34655ecf8
Component: cli
2017-09-19 16:48:52 +02:00
f7daf26c0f Set selinux label on local volumes from mounts API
When using a volume via the `Binds` API, a shared selinux label is
automatically set.
The `Mounts` API is not setting this, which makes volumes specified via
the mounts API useless when selinux is enabled.

This fix adopts the same selinux label for volumes on the mounts API as on
binds.
Note in the case of both the `Binds` API and the `Mounts` API, the
selinux label is only applied when the volume driver is the `local`
driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5bbf5cc671ec8007bf8e0416799fff01d6a79b7e
Component: engine
2017-09-19 10:46:38 -04:00
8828a6255a Merge pull request #537 from vdemeester/add-jenkins-status-to-readme
Add jenkins build status to readme
Upstream-commit: b3aa1195d4
Component: cli
2017-09-19 16:33:33 +02:00
6daf6c2b58 Fix service_create markdown
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 01ef9acd31
Component: cli
2017-09-19 16:29:52 +02:00
da00b40eb4 Merge pull request #34721 from kinvolk/iaguis/add-missing-ecryptfs-string
Add missing eCryptfs translation to FsNames
Upstream-commit: 3fa72d38ec61377b506d31711f5cf1b855219926
Component: engine
2017-09-19 05:45:24 -07:00
07893693ca Merge pull request #34891 from Microsoft/jjh/fixcomment
LCOW: Fix comment in graphdriver code
Upstream-commit: 13e8a7a0067ce5d8d458b3a5985691bed0b0f30e
Component: engine
2017-09-19 14:43:35 +02:00
889843574b volume: evaluate symlinks before relabeling mount source
Simple reproducer:

```sh
$ mkdir /var/foo
$ touch /var/foo/test
$ ln -s /var/foo /var/bar
$ docker run -ti -v /var/bar:/var/bar:Z fedora sh
sh-4.3# ls -lZ /var/bar/
ls: cannot open directory '/var/bar/': Permission denied
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e0b22c0b9e013527ef121250b51ae780d2d2912d
Component: engine
2017-09-19 10:54:03 +02:00
822098983e Merge pull request #34520 from fnoeding/fixed-raw-splunk-logger
Fixed `raw` mode splunk logger
Upstream-commit: 5c57ca17d50c392b7ad627fc1215d7a7e91e0c41
Component: engine
2017-09-19 10:53:01 +02:00
1cc4bb63c2 Merge pull request #34856 from dnephin/cleanup-version-tests
Replace old version tests
Upstream-commit: 7cd7cf9167fd4bc57889dfe01447f4bb0d52acc2
Component: engine
2017-09-19 10:34:50 +02:00
1cc36398f9 Merge pull request #34495 from ripcurld0/registry_mirror_json
Exit if service config is loaded unsuccessfully on startup
Upstream-commit: b075cd2d78c1bafcded7d12ddb2e7c215e2e5117
Component: engine
2017-09-18 21:59:14 -07:00
a17ffddbf6 Merge pull request #34550 from kolyshkin/libeudev
Update Dockerfiles to use Debian Stretch
Upstream-commit: cfdac1245a8d97ef21fb739ef3e631bdb852bbc7
Component: engine
2017-09-18 21:03:31 -07:00
f8cc2fb021 LCOW: Fix comment in graphdriver code
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9fc269c204b96b34a479f3e55e41886ed2626b0
Component: engine
2017-09-18 19:52:55 -07:00
b07dcb72fb Close pipe if mountFrom failed.
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
Upstream-commit: 9f38923901352459bb621d0b3587a6517e67eeb3
Component: engine
2017-09-19 01:25:39 +00:00
7ac80a2691 Merge pull request #34674 from pradipd/windows_routingmesh
Enabling ILB/ELB on windows using per-node, per-network LB endpoint.
Upstream-commit: a2ee40b98c281139c75b38e0e11aa35726021169
Component: engine
2017-09-18 15:56:17 -07:00
3303de2b82 Merge pull request #34759 from kolyshkin/gometalinter
Gometalinter fixups for non-x86
Upstream-commit: 65e88d996ad13ad5ca9c2d2c625a87f9271d1e82
Component: engine
2017-09-18 13:44:15 -07:00
b8677707a9 vendoring libnetwork and swarmkit
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 4c1b07924a7449e6e37fac4479624fcaf01ce889
Component: engine
2017-09-18 20:38:18 +00:00
61af2a7b87 Enabling ILB/ELB on windows using per-node, per-network LB endpoint.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 9bed0883e762181ad6c4d5607ae2228e164e44b5
Component: engine
2017-09-18 20:27:56 +00:00
fab90b5b50 Merge pull request #524 from thaJeztah/update-deprecated-api-cors
Update deprecated.md for "api-enable-cors"
Upstream-commit: 139fcd3ee9
Component: cli
2017-09-18 21:37:08 +02:00
f01963dfea Merge pull request #34805 from chris-crone/containerize-integration-tests
Containerize integration tests
Upstream-commit: 9be245f438f9fb2eaeb7891673b16aed9262a192
Component: engine
2017-09-18 21:11:06 +02:00
dd976e6170 integration-cli/docker_cli_logs_test.go: Wait()
To avoid a zombie apocalypse, use cmd.Wait() to properly finish
the processes we spawn by Start().

Found while investigating DockerSuite.TestLogsFollowSlowStdoutConsumer
failure on ARM (see
https://github.com/moby/moby/pull/34550#issuecomment-324937936).

[v2: don't expect no error from Wait() when process is killed]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 14f0a1888f92667f82bea548bfa2fe4a890a75e8
Component: engine
2017-09-18 11:18:36 -07:00
0a503dae01 Merge pull request #366 from twistlock/plugable_secrets_backend
Plugable secrets backend
Upstream-commit: 3edf97e5a9
Component: cli
2017-09-18 19:25:15 +02:00
50bc0b5a39 Merge pull request #523 from thaJeztah/more-yaml-information
Add more information to the generated YAML for documentation
Upstream-commit: 37ac97c72e
Component: cli
2017-09-18 13:12:39 -04:00
9f902b9066 Merge pull request #526 from thaJeztah/docs-fix-system-prune
Update system prune docs for --volumes flag
Upstream-commit: d4251b4268
Component: cli
2017-09-18 19:10:46 +02:00
5421741502 Add missing eCryptfs translation to FsNames
It was causing the error message to be

    'overlay' is not supported over <unknown>

instead of

    'overlay' is not supported over ecryptfs

Signed-off-by: Iago López Galeiras <iago@kinvolk.io>
Upstream-commit: ddb31b4fdf7311ad6c7e62aa15b5f6da16518e77
Component: engine
2017-09-18 19:06:13 +02:00
133eff770e TestLogsFollowSlowStdoutConsumer: fix for slow ARM
We run our CI on Scaleway C1 machine, which is pretty slow,
including I/O. This test was failing on it, as it tried to
write 100000 lines of log very fast, and the loggerCloseTimeout
(defined and used in container/monitor.go) prevents the
daemon to finish writing it within this time frame,

Reducing the size to 150000 characters (75000 lines) should
help avoiding hitting it, without compromising the test case
itself.

Alternatively, we could have increased the timeout further. It was
originally set to 1s (commit b6a42673a) and later increased 10x
(commit c0391bf55). Please let me know if you want me to go that way.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 1bc93bff221bd30e80f776cc620a8937314569ef
Component: engine
2017-09-18 08:47:55 -07:00
e01e198f54 Introduce a typed command system and 2 phase parse/dispatch build
This is a work base to introduce more features like build time
dockerfile optimisations, dependency analysis and parallel build, as
well as a first step to go from a dispatch-inline process to a
frontend+backend process.

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 669c0677980b04bcbf871bb7c2d9f07caccfd42b
Component: engine
2017-09-18 09:48:56 +02:00
3a4f4fd3c4 overlay gd: fix build for 32-bit ARM
This commit reverts a hunk of commit 2f5f0af3f ("Add unconvert linter")
and adds a hint for unconvert linter to ignore excessive conversion as
it is required on 32-bit platforms (e.g. armhf).

The exact error on armhf is this:

	19:06:45 ---> Making bundle: dynbinary (in bundles/17.06.0-dev/dynbinary)
	19:06:48 Building: bundles/17.06.0-dev/dynbinary-daemon/dockerd-17.06.0-dev
	19:10:58 # github.com/docker/docker/daemon/graphdriver/overlay
	19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Sec (type int32) as type int64 in argument to time.Unix
	19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Nsec (type int32) as type int64 in argument to time.Unix
	19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Sec (type int32) as type int64 in argument to time.Unix
	19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Nsec (type int32) as type int64 in argument to time.Unix

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: b569f57890d4cad132be437e5dac55130b6c76e9
Component: engine
2017-09-17 22:04:31 -07:00
dd4630ca9c Fix test-docker-py on some arches
When running 'make all' on armhf, I got this:

> ---> Making bundle: .integration-daemon-start (in bundles/17.06.0-dev/test-docker-py)
> Using test binary docker
> INFO: Waiting for daemon to start...
> Starting dockerd
> .
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line
> 320, in _importconftest
>     mod = conftestpath.pyimport()
>   File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line
> 662, in pyimport
>     __import__(modname)
>   File "/docker-py/tests/integration/conftest.py", line 6, in <module>
>     import docker.errors
>   File "/docker-py/docker/__init__.py", line 2, in <module>
>     from .api import APIClient
>   File "/docker-py/docker/api/__init__.py", line 2, in <module>
>     from .client import APIClient
>   File "/docker-py/docker/api/client.py", line 11, in <module>
>     from .build import BuildApiMixin
>   File "/docker-py/docker/api/build.py", line 6, in <module>
>     from .. import auth
>   File "/docker-py/docker/auth.py", line 6, in <module>
>     import dockerpycreds
> ImportError: No module named dockerpycreds
> ERROR: could not load /docker-py/tests/integration/conftest.py

The fix for this was already provided by commit 0ec8f56a3 and
commit c7c923594, but for some reason it did not made its way
to Dockerfiles for all architectures.

While at it, remove excessive comments.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7439d360fd567e063b8e9c4174a5c21b9fbc06aa
Component: engine
2017-09-17 22:04:31 -07:00
a14ef1d5fc devmapper: tell why xfs is not supported
Instead of providing a generic message listing all possible reasons
why xfs is not available on the system, let's be specific.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c21245c9200ab39a9219b28f8185573b78a55074
Component: engine
2017-09-17 22:04:31 -07:00
e3dc487328 devmapper: show dmesg if mount fails
If mount fails, the reason might be right there in the kernel log ring buffer.
Let's include it in the error message, it might be of great help.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 46833ee1c353c247e3ef817a08d5a35a2a43bdf3
Component: engine
2017-09-17 22:04:31 -07:00
a4c2f1d0c4 devmapper: don't create too new xfs
Since the update to Debian Stretch, devmapper unit test fails. One
reason is, the combination of somewhat old (less than 3.16) kernel and
relatively new xfsprogs leads to creating a filesystem which is not supported
by the kernel:

> [12206.467518] XFS (dm-1): Superblock has unknown read-only compatible features (0x1) enabled.
> [12206.472046] XFS (dm-1): Attempted to mount read-only compatible filesystem read-write.
> Filesystem can only be safely mounted read only.
> [12206.472079] XFS (dm-1): SB validate failed with error 22.

Ideally, that would be automatically and implicitly handled by xfsprogs.
In real life, we have to take care about it here. Sigh.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 6b01bc5adb1255cb48e22e755ab86fd2c3305211
Component: engine
2017-09-17 22:04:31 -07:00
c25f7e149b Dockerfiles: fix test-docker-py
Presumably after switch to debian-stretch as a base, the following
errors happens in Jenkins:

10:48:03 ---> Making bundle: test-docker-py (in
bundles/17.06.0-dev/test-docker-py)
10:48:03 ---> Making bundle: .integration-daemon-start (in
bundles/17.06.0-dev/test-docker-py)
10:48:03 Using test binary docker
10:48:03 # DOCKER_EXPERIMENTAL is set: starting daemon with experimental
features enabled!
10:48:03 /etc/init.d/apparmor: 130: /etc/init.d/apparmor:
systemd-detect-virt: not found
10:48:03 Starting AppArmor profiles:Warning from stdin (line 1):
/sbin/apparmor_parser: cannot use or update cache, disable, or
force-complain via stdin
10:48:03 Warning failed to create cache: (null)
10:48:03 .
10:48:03 INFO: Waiting for daemon to start...
10:48:03 Starting dockerd
10:48:05 .
10:48:06 Traceback (most recent call last):
10:48:06   File
"/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 320, in
_importconftest
10:48:06     mod = conftestpath.pyimport()
10:48:06   File
"/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line 662, in
pyimport
10:48:06     __import__(modname)
10:48:06   File "/docker-py/tests/integration/conftest.py", line 6, in
<module>
10:48:06     import docker.errors
10:48:06   File "/docker-py/docker/__init__.py", line 2, in <module>
10:48:06     from .api import APIClient
10:48:06   File "/docker-py/docker/api/__init__.py", line 2, in <module>
10:48:06     from .client import APIClient
10:48:06   File "/docker-py/docker/api/client.py", line 6, in <module>
10:48:06     import requests
10:48:06 ImportError: No module named requests
10:48:06 ERROR: could not load /docker-py/tests/integration/conftest.py
10:48:06

and

00:38:55   File "/docker-py/docker/transport/ssladapter.py", line 21, in
<module>
00:38:55     from backports.ssl_match_hostname import match_hostname
00:38:55 ImportError: No module named backports.ssl_match_hostname
00:38:55 ERROR: could not load /docker-py/tests/integration/conftest.py

To fix, install the missing python modules.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ce2a0120c1925492a9bb7f6339cdbf716a4c50e0
Component: engine
2017-09-17 22:04:31 -07:00
c53f4217c9 TestRunSeccompProfileAllow32Bit: fix
Since the update to Debian Stretch, this test fails. The reason is dynamic
binary, which requires i386 ld.so for loading (and apparently it is no longer
installed by default):

> root@09d4b173c3dc:/go/src/github.com/docker/docker# file exit32-test
> exit32-test: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=a0d3d6cb59788453b983f65f8dc6ac52920147b6, stripped
> root@09d4b173c3dc:/go/src/github.com/docker/docker# ls -l /lib/ld-linux.so.2
> ls: cannot access '/lib/ld-linux.so.2': No such file or directory

To fix, just add -static.

Interestingly, ldd can'f figure it out.

> root@a324f8edfcaa:/go/src/github.com/docker/docker# ldd exit32-test
>	not a dynamic executable

Other tools (e.g. objdump) also show it's a dynamic binary.

While at it, remove the extra "id" argument (a copy-paste error I
guess).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 771256b305c8c06fca5eb1d041b60fbe093c0e1b
Component: engine
2017-09-17 22:04:31 -07:00
322ee8f812 devmapper gd: disable for static build
Static build with devmapper is impossible now since libudev is required
and no static version of libudev is available (as static libraries are
not supported by systemd which udev is part of).

This should not hurt anyone as "[t]he primary user of static builds
is the Editions, and docker in docker via the containers, and none
of those use device mapper".

Also, since the need for static libdevmapper is gone, there is no need
to self-compile libdevmapper -- let's use the one from Debian Stretch.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 84f1c054e66d3999aaf2751062cda8a77925b7ae
Component: engine
2017-09-17 22:04:31 -07:00
8fb9073dbb Update Dockerfiles to use Debian stretch
The main gain here is that they all use exactly the same distro; previously
arm64 was using Ubuntu Xenial because Debian jessie was too old.

Does not seem that we can change any of the downloaded dependencies still,
as eg libseccomp is still not the version we are using.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: e89a5e5e91476102a471797fc2a81aa2f0f2b3fb
Component: engine
2017-09-17 22:02:13 -07:00
5681a2921d Exit if service config is loaded unsuccessfully on startup
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 5258297dac1e32c8dd1caff528d321ac7eb4a87c
Component: engine
2017-09-17 18:50:16 +03:00
af2e8abbf0 Merge pull request #34842 from dnephin/fix-integration-on-timeout
[integration-cli] Only attempt to find pid with local daemon
Upstream-commit: c5c0702a4d523071b3e41a13c233b6ec9e261b06
Component: engine
2017-09-16 06:48:18 -07:00
347269ee44 Merge pull request #52 from thaJeztah/switch-to-arm64v8
Switch aarch64 images to arm64v8
Upstream-commit: a1debdbcf0220c10799fce225f2f189e681de385
Component: packaging
2017-09-15 18:54:10 -07:00
19d23646ea Merge pull request #51 from thaJeztah/switch-to-arm32v7
Switch armhf images to arm32v7
Upstream-commit: dfb5b129949527991b6ef9fa1d82c1a8a3f412eb
Component: packaging
2017-09-15 18:53:37 -07:00
35f91d208e Switch aarch64 images to arm64v8
The "aarch64" images on Docker Hub are deprecated
in favor of the "arm64v8" images.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cc436770b773767ad59e766be66323282b030d33
Component: packaging
2017-09-16 03:10:07 +02:00
4609e2004f Switch armhf images to arm32v7
The "armhf" images on Docker Hub are deprecated
in favor of the "arm32v7" and "arm32v6" images.

Note that the Alpine image is built for arm32v6,
which is compatible for both arm32v6 and arm32v7.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b8d4afddf118b809157f4249a45656cfaa96cd3
Component: packaging
2017-09-16 03:05:34 +02:00
a8090896a0 Merge pull request #34252 from Microsoft/akagup/lcow-remotefs-sandbox
LCOW: Support for docker cp, ADD/COPY on build
Upstream-commit: a5f9783c930834b8e6035fb0ad9c22fd4bbfc355
Component: engine
2017-09-15 16:49:48 -07:00
d8ebaa5838 Replace old version tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 813d2e082a094d11bda0d0f5a708ce30805ab28e
Component: engine
2017-09-15 12:56:09 -04:00
50498e4fbd Add builds for debian buster
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cc8fa77524c6c1ee1a17dc4f77ea2ade1f112f81
Component: packaging
2017-09-15 17:35:51 +02:00
a785d9466c Merge pull request #535 from thaJeztah/remove-swp-file
Remove .swp file that was accidentally added
Upstream-commit: 6d614ec54d
Component: cli
2017-09-15 16:13:31 +02:00
892a44a627 Various fixes
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: b7d8d2c4ab709f072cbdc4f89a8c80065648757e
Component: engine
2017-09-15 16:01:15 +02:00
2a72ee1fde Merge pull request #509 from xificurC/fix-secrets-and-configs-idempotence
sort secrets and configs to ensure idempotence
Upstream-commit: a09a2c6d15
Component: cli
2017-09-15 15:43:59 +02:00
adba854430 Merge pull request #34849 from chchliang/testlayer
add testcase in layer/empty_test.go with Platform(),Metadata()
Upstream-commit: 5c10698d5c5223f9cb49704124be592e3d39d0df
Component: engine
2017-09-15 06:39:20 -07:00
2a306cdba9 Add jenkins build status to readme
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c56d7ec37f
Component: cli
2017-09-15 15:08:28 +02:00
04f1d90792 Merge pull request #532 from dnephin/fix-e2e-fixture
Fix e2e test by using a pinned version of alpine
Upstream-commit: 9053aa1038
Component: cli
2017-09-15 14:49:37 +02:00
eae91199bd Remove .swp file that was accidentally added
This file was added by accident in dd95731a21
and not noticed during review.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e612236a3d
Component: cli
2017-09-15 13:20:40 +02:00
b66e771f48 Merge pull request #534 from mion00/document_node_hostname_templating
Document .Node.Hostname templating
Upstream-commit: e2ee30ae42
Component: cli
2017-09-15 13:02:31 +02:00
3223c51c8a Remove erroneous Println
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: eb396e8984ce64ea6ee9c04905780d74ed7d8d8b
Component: engine
2017-09-15 13:02:27 +02:00
b43594fccc Merge pull request #442 from jhowardmsft/jjh/34508docs
Docs for Windows daemon graphdriver options
Upstream-commit: 5a7f25f24c
Component: cli
2017-09-15 12:19:14 +02:00
a5b24016fd Document .Node.Hostname templating
Update placeholders table and add example code
Follow up to moby/moby#34686

Signed-off-by: Carlo Mion <mion00@gmail.com>
Upstream-commit: 21825b6842
Component: cli
2017-09-15 10:23:56 +02:00
5086fdcfde Fix CString memory leaks
Make sure to call C.free on C string allocated using C.CString in every
exit path.

C.CString allocates memory in the C heap using malloc. It is the callers
responsibility to free them. See
https://golang.org/cmd/cgo/#hdr-Go_references_to_C for details.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 593dbfd1448e8dac08488786fde6fe7fb057bdac
Component: engine
2017-09-15 09:57:26 +02:00
ae2d031a76 add testcase in layer/empty_test.go with Metadata()
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
Upstream-commit: c72112b171ac046d11e8279b799315e962332450
Component: engine
2017-09-15 14:13:48 +08:00
70abc439d8 Merge pull request #34258 from simonferquel/lcow-mounts
LCOW: Prepare work for bind mounts
Upstream-commit: 0300fa7f806f978451c09ebbff402ddd34e928d9
Component: engine
2017-09-14 15:00:08 -07:00
a641c1b7f0 Add LCOW behind experimental,
might not be the cleanest way, but it's definitly the way with the
minimum code change.

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: ff686743c50dc34b57f5627ba6fee38502bdd3ec
Component: engine
2017-09-14 13:51:16 -07:00
aeb89eb179 Volume refactoring for LCOW
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: e89b6e8c2d2c36c43f22aeaf2a885646c2994051
Component: engine
2017-09-14 12:33:31 -07:00
cddfe04f6a LCOW: Implemented support for docker cp + build
This enables docker cp and ADD/COPY docker build support for LCOW.
Originally, the graphdriver.Get() interface returned a local path
to the container root filesystem. This does not work for LCOW, so
the Get() method now returns an interface that LCOW implements to
support copying to and from the container.

Signed-off-by: Akash Gupta <akagup@microsoft.com>
Upstream-commit: 7a7357dae1bcccb17e9b2d4c7c8f5c025fce56ca
Component: engine
2017-09-14 12:07:52 -07:00
14427ba493 Vendor containerd/continuity@22694c680e
Signed-off-by: Akash Gupta <akagup@microsoft.com>
Upstream-commit: ba13c173d1704168b918705b827963dc6e3900ab
Component: engine
2017-09-14 12:00:38 -07:00
29ef2e0479 Merge pull request #34217 from yongtang/34208-http-add-root
Fix build with `ADD` urls without any sub path
Upstream-commit: d60c1866679f9fcd5701eedabe49e9fa11228b08
Component: engine
2017-09-14 11:55:24 -07:00
f34f36be87 Merge pull request #34332 from clnperez/logrus-revendor
revendor logrus and x/crypto
Upstream-commit: 2a54dc080471476037c87cc6961cc126368ffdd9
Component: engine
2017-09-14 11:29:05 -07:00
44733ed80a Fixes after dnephin review
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 7dabed019a7aac9b317b586d582431eef3b65e33
Component: engine
2017-09-14 19:27:09 +02:00
6cc83af533 Fix Windows build
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 81f69a593146f61d3f6568403168ba28b1714f97
Component: engine
2017-09-14 19:27:09 +02:00
82ba6d5d3e Test requires SameHostDaemon
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 61b13ba0d12aeeadc1c08eae62ba83f62208a6d3
Component: engine
2017-09-14 19:27:09 +02:00
414afe084c Correct log message
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 5eab08930c9c2d39bb76fd6320e9979b504750a6
Component: engine
2017-09-14 19:27:09 +02:00
a13cdc241b Set client version instead of negotiating it
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 85431566a81792e3612df3b6b858f7b0c3506883
Component: engine
2017-09-14 19:27:09 +02:00
454535ed22 Bring up DockerNetworkSuite
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 42d812df0a12d92fad1f327f0b0f5d9eb7a9f107
Component: engine
2017-09-14 19:27:09 +02:00
58906ac91c Remove race and split TestAPINetworkInspect test
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 6936ce3b65f149ba6ab1cd5c257358c06eb9cdbb
Component: engine
2017-09-14 19:27:09 +02:00
4d643fb18a Fixes for dnephin review
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 86f9eb4a085a61b3355dc38452c47def806bf7c9
Component: engine
2017-09-14 19:27:09 +02:00
f23d5bec57 Skip some tests for E2E
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: f089a1df393228085c4895b8db0fa95128173398
Component: engine
2017-09-14 19:27:09 +02:00
abba79d025 Check integration test requirements using daemon
When running against a remote daemon, we cannot use the local
filesystem to determine configuration.

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: b1fb41988dc1b7071a58f76f6ad2730fc1a02eca
Component: engine
2017-09-14 19:27:09 +02:00
2801aaa58e Use TLS for tests if needed
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 0bdba0e91a072ee2cdecb4e632c13f187eb88e9c
Component: engine
2017-09-14 19:27:09 +02:00
e3234a8303 Fix tests that depend on clean environment
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: dc6ddfa8415d90e9a9788d5cfd5a10c17449bbc9
Component: engine
2017-09-14 19:27:09 +02:00
fe0ff1cb68 Add E2E requirement for integration tests
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: d622e81af50f4690d5867a89b430d1b94707fd26
Component: engine
2017-09-14 19:27:09 +02:00
559acd0f8b Containerize integration tests
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 07f10d8e2e2214000635c32d23f9435fa3fb48b8
Component: engine
2017-09-14 19:27:09 +02:00
16788ee2e5 Protect entire environment when testing
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 063c89c71fd1fbeb7ef7c46f43ee805b620e7136
Component: engine
2017-09-14 19:27:09 +02:00
9c49974512 Allow protection of entire environment during tests
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 0520581523caeacdf718a2dd1db2958c24b47cf6
Component: engine
2017-09-14 19:27:09 +02:00
b3c31e9800 Add unit test to cover changes.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 027297a60f5f5a70e1e3eb3a68280f64c66bc877
Component: engine
2017-09-14 16:17:38 +00:00
ac38bbaf63 Fix build with ADD urls without any sub path
This fix tries to address the issue raised in #34208 where
in Dockerfile an `ADD` followed by an url without any sub path
will cause an error.

The issue is because the temporary filename relies on the sub path.

An integration test has been added.

This fix fixes #34208.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: bea0a072d86604071c99e9b6989b19ca4fe22032
Component: engine
2017-09-14 16:17:38 +00:00
97847089f1 revendor logrus and x/crypto
this fixes the issue that was blocking a test from running on ppc64le.
the logrus revendor changes the color code used in that same test, so
that breaks the test for all platforms (updated in this pr)

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 008b217844f8738cc47ef9ff108dc41dc37736cc
Component: engine
2017-09-14 11:05:47 -05:00
1546d32eb0 Only attempt to find pid with local daemon
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 014cecda464fb1171e613676e0a8a85c02ec1674
Component: engine
2017-09-14 12:05:18 -04:00
c95e22b252 Merge pull request #34837 from tophj-ibm/switch-hub-test-to-alpine
[integration-cli] fix p/z HubPullSuite tests
Upstream-commit: 3a081f53c150190201ddb05c97344ed5071446b0
Component: engine
2017-09-14 18:02:13 +02:00
6c749ced41 Fix e2e test by using a pinned version of alpine
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ab2e219116
Component: cli
2017-09-14 11:38:46 -04:00
023fe0b32f [integration-cli] fix p/z HubPullSuite tests
This test tries to pull all the tags in the busybox repo and looks to see
if there were more than two images pulled. This was failing on
p/z due to the recent change to manifest lists, where one of the busybox
tags didn't have a p/z manifest in it's manifest list.

This error seems fine to me, so I changed the test to see if pull fails,
it fails with the "manifest not found" error.

Also switched from busybox -> alpine, because it has significantly less tags,
and the images are close in size.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 5739ba1b918402b8eda748ac2f5dd7ce00f2e69f
Component: engine
2017-09-14 09:42:09 -04:00
93617a3f74 Merge pull request #34784 from dnephin/fix-client-not-found
Cleanup client not found errors
Upstream-commit: bb0e8ee51c8940c3ce23e4f594068612203c6139
Component: engine
2017-09-14 12:04:56 +02:00
c30f13232a Merge pull request #34686 from mion00/templating-node-hostname-support
Add support for .Node.Hostname templating in swarm services
Upstream-commit: 2ee8ef864f9fb9c31848fe10a61605a39fb81635
Component: engine
2017-09-13 21:06:11 -07:00
803b5f0e94 Merge pull request #34821 from thaJeztah/remove-enable-api-cors
Remove deprecated --enable-api-cors flag
Upstream-commit: dc35a8a5d22b6c828cd105be7c62b72919df25cd
Component: engine
2017-09-13 20:10:27 -07:00
63f4bb52b4 Merge pull request #34828 from allencloud/add-config-tags-in-swagger
add configs tag in swagger.yml
Upstream-commit: 80edccda708c6771824c245b4d634c2a9ce29795
Component: engine
2017-09-14 02:37:28 +02:00
4fe1c1584a Merge pull request #34844 from kolyshkin/lvm2-fix
Fix fetching LVM2 sources
Upstream-commit: a8f6e60bfc95421f0d8539fddaecd32642cd947f
Component: engine
2017-09-14 02:01:14 +02:00
150f7f6a55 Add more information about commands to generated YAML docs
This patch adds aditional information about commands to the YAML files
that are generated for the reference documentation.

The following fields are added for each command:

Property          | Type      | Description
------------------|-----------|---------------------------------------------------------------------------------------
deprecated        | Boolean   | Indicates if the command is marked deprecated
min_api_version   | String    | The API version required to use this command (e.g. "1.23")
experimental      | Boolean   | Indicates if the command requires the daemon to run with experimental features enabled

For example (taken from the experimental `docker checkpoint create` command):

    command: docker checkpoint create
    short: Create a checkpoint from a running container
    long: Create a checkpoint from a running container
    usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT
    pname: docker checkpoint
    plink: docker_checkpoint.yaml
    options:
    - option: checkpoint-dir
      value_type: string
      description: Use a custom checkpoint storage directory
      deprecated: false
      experimental: false
    - option: leave-running
      value_type: bool
      default_value: "false"
      description: Leave the container running after checkpoint
      deprecated: false
      experimental: false
    deprecated: false
    min_api_version: "1.25"
    experimental: true

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1f48e75c5c
Component: cli
2017-09-14 00:48:22 +02:00
46def61677 Add more information about command flags to generated YAML docs
This patch adds aditional information about command flags to the YAML files
that are generated for the reference documentation.

The following fields are added for each flag:

Property          | Type      | Description
------------------|-----------|---------------------------------------------------------------------------------------
value_type        | String    | The "type" of value to be passed to this flag (e.g., `uint64`, `list`)
deprecated        | Boolean   | Indicates if the flag is marked deprecated
min_api_version   | String    | The API version required to use this flag (e.g. "1.23")
experimental      | Boolean   | Indicates if the flag requires the daemon to run with experimental features enabled

For example (taken from the `docker image build` command):

    - option: security-opt
      value_type: stringSlice
      default_value: '[]'
      description: Security options
      deprecated: false
      experimental: false
    - option: shm-size
      value_type: bytes
      default_value: "0"
      description: Size of /dev/shm
      deprecated: false
      experimental: false
    - option: squash
      value_type: bool
      default_value: "false"
      description: Squash newly built layers into a single new layer
      deprecated: false
      min_api_version: "1.25"
      experimental: true

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a8ba6f93d9
Component: cli
2017-09-14 00:47:42 +02:00
c752d6bc2e Update system prune docs for --volumes flag
The `--volumes` flag was added in 37fd6128dc,
but the documentation was not updated.

This patch updates the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4db84de69
Component: cli
2017-09-14 00:42:12 +02:00
d011c4127f LCOW: Add GCS debugging
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5a0e2beac330d49c2b7436bf29e87d52dab4f557
Component: engine
2017-09-13 14:54:34 -07:00
08356f8921 Fix fetching LVM2 sources
Version 2.02.173 has disappeared, let's revert back to latest stable
one.

https://github.com/moby/moby/issues/34843

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a436d8a634392f9e82b6930a560d56900d887ce7
Component: engine
2017-09-13 14:34:36 -07:00
69753f2d25 Merge pull request #513 from shouze/reset-id-pair-during-build-to-avoid-cache-busting
Reset uid/gid to 0 in build context to fix cache busting issues on ADD/COPY
Upstream-commit: 7b77ab5c60
Component: cli
2017-09-13 15:19:26 -04:00
57a43e8ab0 Merge pull request #34775 from darrenstahlmsft/RevendorHcsshim
Update hcsshim to v0.6.5
Upstream-commit: a15cdd707acc37e7bc5dd618a461618c3a0cda20
Component: engine
2017-09-13 11:14:36 -07:00
07369b8b77 Merge pull request #34809 from dnephin/add-gosimple-linter
Add gosimple linter
Upstream-commit: e51bc3ecd04d950f8854947ec8906937eaf87129
Component: engine
2017-09-13 12:44:59 -04:00
1a8ec36d61 Merge pull request #529 from thaJeztah/bump-version
Bump version to 17.10.0-dev
Upstream-commit: acc29884fa
Component: cli
2017-09-13 18:21:01 +02:00
7742f2c56c Merge pull request #481 from cdrage/add-build-to-service-config
Add 'build' to types.go
Upstream-commit: 2eb31e6b60
Component: cli
2017-09-13 18:20:42 +02:00
8453ea8ddd Merge pull request #525 from thaJeztah/change-detach-default
Use non-detached mode as default for service commands
Upstream-commit: e5aeb4b5e8
Component: cli
2017-09-13 11:35:08 -04:00
f7e5e8fdc8 Add 'build' to types.go
This adds 'build' to types.go in order for projects that use docker/cli
to parse Docker Compose files to correctly retrieve `build` keys

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Upstream-commit: 9bdb0763b9
Component: cli
2017-09-13 10:47:17 -04:00
002e234c45 Merge pull request #34829 from Microsoft/jjh/spotfix
LCOW: Spot fix for multi-os image pulling
Upstream-commit: 0dbc182b6c4f6a72933680f98a6240a7681d94ee
Component: engine
2017-09-13 14:32:15 +02:00
b402c14275 Bump version to 17.10.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e17475e935
Component: cli
2017-09-13 14:08:56 +02:00
ad105d4aec Use non-detached mode as default for service commands
Commit 330a0035334871d92207b583c1c36d52a244753f added a `--detach=false` option
to various service-related commands, with the intent to make this the default in
a future version (17.09).

This patch changes the default to use "interactive" (non-detached), allowing
users to override this by setting the `--detach` option.

To prevent problems when connecting to older daemon versions (17.05 and below,
see commit db60f25561), the detach option is
ignored for those versions, and detach is always true.

Before this change, a warning was printed to announce the upcoming default:

    $ docker service create nginx:alpine
    saxiyn3pe559d753730zr0xer
    Since --detach=false was not specified, tasks will be created in the background.
    In a future release, --detach=false will become the default.

After this change, no warning is printed, but `--detach` is disabled;

    $ docker service create nginx:alpine
    y9jujwzozi0hwgj5yaadzliq6
    overall progress: 1 out of 1 tasks
    1/1: running   [==================================================>]
    verify: Service converged

Setting the `--detach` flag makes the cli use the pre-17.06 behavior:

    $ docker service create --detach nginx:alpine
    280hjnzy0wzje5o56gr22a46n

Running against a 17.03 daemon, without specifying the `--detach` flag;

    $ docker service create nginx:alpine
    kqheg7ogj0kszoa34g4p73i8q

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0c27355f7b
Component: cli
2017-09-13 12:27:55 +02:00
806d838e90 LCOW: Spot fix for multi-os image pulling
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b291f5a31728f7ff6386bb37f15e7c0885d3b2a7
Component: engine
2017-09-12 23:33:34 -07:00
523435549c add configs tag in swagger.yml
Signed-off-by: Allen Sun <allensun.shl@alibaba-inc.com>
Upstream-commit: 16929d337a5dbd9aaa029271db1cdba25dd0d2f2
Component: engine
2017-09-13 09:48:05 +08:00
9d7caf267c Update gometalinter
This is mostly to include the following fix:
https://github.com/alecthomas/gometalinter/commit/78e3fbd90a20b03a

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 6be4b3703c2a2b41ccdf97fcf8d2da6863a402bd
Component: engine
2017-09-12 18:46:37 -07:00
99b37c7406 Update hcsshim to v0.6.5
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: bffc7a423f20730f086c30bc189d6c6ad81d16dd
Component: engine
2017-09-12 18:46:12 -07:00
57c34191f2 gometalinter: add per-platform configurable options
I have run into two separate issues while doing 'make all' on armhf
(a Scaleway C1 machine, same as used in CI). This commit fixes both.

1. There were a lot of "not enough memory" errors, and after that
in a few runs gometalinter just stuck forever on FUTEX_WAIT with
no children left.

Looking into docs, I found the --enable-gc option which solved the issue.

[Update: this has already been added]

2. Timeout of 2 minutes is not enough for the abovementioned platform.
The longest running linter is goimports which takes almost 6 minutes to run.

Set the timeout to the observable run time roughly doubled.

In addition, ARM platforms does not have too much RAM (2GB), so
running too many processes in parallel might be problematic. Limit
it by using -j2

[v2: make the timeout arch-dependent, also tested on aarch64 (2m15s)]
[v3: moved timeout setting to Dockerfiles]
[v4: generalized to GOMETALINTER_OPTS, added -j2 for ARM platforms]
[v5: rebase to master]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: b96093fa56a9c085cb3123010be2430753c40cbc
Component: engine
2017-09-12 18:45:34 -07:00
4219a83be8 overlay gd: fix build for 32-bit ARM
This commit reverts a hunk of commit 2f5f0af3f ("Add unconvert linter")
and adds a hint for unconvert linter to ignore excessive conversion as
it is required on 32-bit platforms (e.g. armhf).

The exact error on armhf is this:

	19:06:45 ---> Making bundle: dynbinary (in bundles/17.06.0-dev/dynbinary)
	19:06:48 Building: bundles/17.06.0-dev/dynbinary-daemon/dockerd-17.06.0-dev
	19:10:58 # github.com/docker/docker/daemon/graphdriver/overlay
	19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Sec (type int32) as type int64 in argument to time.Unix
	19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Nsec (type int32) as type int64 in argument to time.Unix
	19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Sec (type int32) as type int64 in argument to time.Unix
	19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Nsec (type int32) as type int64 in argument to time.Unix

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 21b2c278cc86f0fc411018becbcbf2a7e44b6057
Component: engine
2017-09-12 18:44:55 -07:00
a87f17c01b Fix 'make all' for other platforms
Since commit d7e2c4ce7 ("Use gometalinter for linting") command
"make all" fails on all the non-default platforms (i.e. ARMs, PPC, and
s390) in this way:

	# make all
	...
	Congratulations!  All commits are properly signed with the DCO!
	/go/src/github.com/docker/docker/hack/validate/gometalinter: line 6: gometalinter: command not found
	Makefile:105: recipe for target 'all' failed
	make: *** [all] Error 127

Make sure gometalinter is installed for those platforms

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: fc3040a4c41d3916739639b70fc3efd92888a0f5
Component: engine
2017-09-12 18:44:55 -07:00
053e3db35e Merge pull request #528 from andrewhsu/ven
vndr github.com/docker/docker to 84144a8 to fix stuff
Upstream-commit: f697de32b9
Component: cli
2017-09-12 17:52:55 -07:00
e18e2f39e3 vndr github.com/docker/docker to 84144a8 to fix stuff
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 850b46e67c
Component: cli
2017-09-12 17:27:15 -07:00
6e9f643bb2 Reset idPair during build to avoid cache busting
Signed-off-by: Sébastien HOUZÉ <cto@verylastroom.com>
Upstream-commit: 7e407610d4
Component: cli
2017-09-13 02:04:03 +02:00
eae7cc4c29 Merge pull request #516 from andrewhsu/v
vndr docker/docker to ea220e7 to bring in fix for arm
Upstream-commit: b60413264d
Component: cli
2017-09-12 16:01:04 -07:00
ca1972776d Merge pull request #34826 from cezarsa/usagefix
Fix variable shadowing causing LayersSize to be reported as 0
Upstream-commit: 84144a8c66c1bb2af8fa997288f51ef2719971b4
Component: engine
2017-09-12 15:51:26 -07:00
baffbb54c8 remove unused vndr github.com/docker/libtrust
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 536da4a07a
Component: cli
2017-09-12 13:48:21 -07:00
fda4a38658 vndr golang.org/x/sys to 07c1829
To satisfy requirements of the vndr of docker/docker

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 50696bbf72
Component: cli
2017-09-12 12:11:18 -07:00
55cb898a72 Fix variable shadowing causing LayersSize to be reported as 0
Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
Upstream-commit: 313bc1e339fa4292d9ef5bc74acc82436eab7e1e
Component: engine
2017-09-12 14:11:11 -03:00
18c29c5c5f Add gosimple linter
Update gometalinter

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f7f101d57ef8cbf2d8723a18b7d723c5c5dd04b6
Component: engine
2017-09-12 12:09:59 -04:00
1d65628454 Merge pull request #34754 from Microsoft/jjh/read-only
LCOW: VHDX boot to readonly.
Upstream-commit: 969b76d85f93e214cbc44f25a3f44b67cb0dc078
Component: engine
2017-09-12 08:35:21 -07:00
52611dee7a Merge pull request #34796 from donutloop/fix_typos_in_locker_example
Fix typos in Locker example
Upstream-commit: 099b4de391696b740779bfcb8322b4f4186e297e
Component: engine
2017-09-12 15:48:23 +02:00
a300c8a80f Update deprecated.md for "api-enable-cors"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7c69bf1d24
Component: cli
2017-09-12 12:47:57 +02:00
3e4a18de4d Remove deprecated --enable-api-cors flag
The `--enable-api-cors` flag was deprecated in f3dd2db4ff7de1399a49af928cd3eae4fccf8764,
and marked for removal in docker 17.09 through 85f92ef3590b386ea17e3948262725a2d3ce4db5.

This patch removes the deprecated flag.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7d4eab554379524c2421a7ecd3319d1d087d1de2
Component: engine
2017-09-12 12:43:34 +02:00
ee7b60968b Cleanup client not found errors.
And fix remove calls to return a notFound error

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 81bb9978ab5ac99e84a5bf62d0d469f0aec1d506
Component: engine
2017-09-11 19:53:18 -04:00
7f5ba34576 Merge pull request #48 from seemethere/remove_version_dependency_from_package_building
Removes engine VERSION dependency
Upstream-commit: 3c05e034e76cb3025a9f10cf6086fed312dc7670
Component: packaging
2017-09-11 13:19:31 -07:00
528c150b8c Removes engine VERSION dependency
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 89d8a83e20172e66c16c6ddbc46f43e5f67f7045
Component: packaging
2017-09-11 12:11:59 -07:00
99e268ef3c Merge pull request #508 from docker/revert-493-patch-1
Revert "Change sshfs by cloudstor on Installing and using a plugin"
Upstream-commit: 04390f8a74
Component: cli
2017-09-11 11:25:50 -07:00
599a2ae3b1 Merge pull request #521 from dnephin/add-albers-to-maintainers
Add albers to maintainers
Upstream-commit: d0bda815d2
Component: cli
2017-09-11 19:47:20 +02:00
591014017f Add albers to maintainers.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 92cf825238
Component: cli
2017-09-11 11:22:10 -04:00
2c45bc6a92 Merge pull request #34770 from dnephin/fix-client-with-empty-id
Fix volume inspect with empty ID
Upstream-commit: 63a9ea58eb4c704ed7d7dab950f12f708cf220f7
Component: engine
2017-09-11 07:01:50 -07:00
8e2757c531 Merge pull request #421 from thaJeztah/refactor-docker-info
Refactor/cleanup of docker info
Upstream-commit: e77dc2232e
Component: cli
2017-09-11 15:25:02 +02:00
033298b8f6 Refactor/cleanup of docker info
Some mild refactoring of the docker info command;

- Use `fmt.Fprinln()` instead of `fmt.Fprintf()` where possible
- Rename `fprintfIfNotEmpty()` to `fprintlnNonEmpty()`, and removed
  return variables, because they were not used. `fprintlnNonEmpty()`
  now uses fmt.Fprintln()` instead of `fmt.Fprintf()`, because
  formatting was not used.
- Use `fprintlnNonEmpty()` to get rid of some `if` statements
- Extract printing Swarm-related information to a `printSwarmInfo()` function
- Change `Http Proxy` and `Https Proxy` to `HTTP Proxy` / `HTTPS Proxy`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6f1b510843
Component: cli
2017-09-11 15:13:06 +02:00
95956aa7ef Merge pull request #519 from gesellix/typo-configration
[docs] Fix typo in configration.
Upstream-commit: 202205365a
Component: cli
2017-09-11 14:57:08 +02:00
1b8f2ad866 [docs] Fix typo in configration.
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: f8ed8d22c6
Component: cli
2017-09-10 23:12:29 +02:00
e388be9473 Fix typos in Locker example
Signed-off-by: Marcel Edmund Franke <marcel.edmund.franke@gmail.com>
Upstream-commit: 6d3bc28289c265a65879a7f28264e6bacb95fbe1
Component: engine
2017-09-10 11:34:19 +02:00
af0adf66d4 Merge pull request #34790 from dnephin/add-ineffassign-linter
Add ineffassign linter
Upstream-commit: 13fec0607394f7c6da0148f8d513b6fcbf7cce61
Component: engine
2017-09-09 15:41:55 -07:00
4b9c2f5fd5 vndr docker/docker to ea220e7 to bring in fix for arm
Primarily to bring in fix for "Clear Architecture field in platform
constraint for arm architectures".

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: ef027b6d72
Component: cli
2017-09-08 16:27:56 -07:00
fdd3e06a77 Add ineffassign linter
Also enable GC in linting to reduce memory usage.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 09652bf8789142a5a5a1de2d41590300761b4954
Component: engine
2017-09-08 18:23:21 -04:00
30a4e0ab8e Merge pull request #510 from dnephin/add-parse-log-details
Use a local copy of ParseLogDetails
Upstream-commit: aae519d0f6
Component: cli
2017-09-08 11:38:24 -07:00
fbd21afa80 Merge pull request #511 from dnephin/fix-end-of-line-whitespace-tests
Use golden files for tests that expect end-of-line whitespace
Upstream-commit: d3d9b38d55
Component: cli
2017-09-08 11:37:28 -07:00
94dd311bdc Merge pull request #495 from dnephin/container-run-e2e
Add en e2e test for `container run`
Upstream-commit: cc517f2d8a
Component: cli
2017-09-08 11:36:32 -07:00
9211237d01 Merge pull request #34767 from dnephin/deprecate-some-client
Cleanup client/ interface
Upstream-commit: 96255ba07ae7de2bb2a18567c478b63d5ac74ee4
Component: engine
2017-09-08 13:29:10 -04:00
b363a8f8a7 sort secrets and configs to ensure idempotence
`docker stack deploy` keeps restarting services it doesn't need to (no changes)
because the entries' order gets randomized at some previous (de)serialization.
Maybe it would be worth looking into this at a higher level and ensure
all (de)serialization happens in an ordered collection.

This quick fix sorts secrets and configs (in place, mutably) which ensures the
same order for each run.

Based on
https://github.com/moby/moby/pull/30506

Fixes
https://github.com/moby/moby/issues/34746

Signed-off-by: Peter Nagy <xificurC@gmail.com>
Upstream-commit: 27e8bdf32b
Component: cli
2017-09-08 16:09:48 +02:00
66ae0e70f8 Merge pull request #34771 from Microsoft/jjh/hcsshim
Revendor Microsoft/hcsshim @ v0.6.4
Upstream-commit: 8ec484ff4bef7698cc4b3ba8195dd182c2af8045
Component: engine
2017-09-07 14:51:07 -07:00
d7ed53048b Use golden files for tests that expect end-of-line whitespace
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 51587de1c4
Component: cli
2017-09-07 17:50:44 -04:00
b543555e86 Merge pull request #34761 from dnephin/fix-mount-create-api-test
Some cleanup of mount create API test
Upstream-commit: bf3a8bddeb5e1ae04b6f73bfe811372ee3e78e36
Component: engine
2017-09-07 17:09:19 -04:00
58743c32f5 Merge pull request #34756 from dnephin/better-filters
Improve docs and interface for api/types/filters
Upstream-commit: c8400bf24dcea8e160d6b614d996b0f659c7d8d9
Component: engine
2017-09-07 17:00:59 -04:00
810209d155 Revendor Microsoft/hcsshim @ v0.6.4
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e47c626e0a5e7285782620c027b3d5195c643a5a
Component: engine
2017-09-07 12:08:40 -07:00
f1b816d854 Merge pull request #34685 from dnephin/remove-bundle-version
Remove version from bundle path
Upstream-commit: f69188aec9f74a946422a256c14bf8efc82f20d4
Component: engine
2017-09-07 11:53:53 -07:00
2e7d5b113f Merge pull request #34757 from dnephin/fix-test-run-environment
Fix TestRunEnvironment
Upstream-commit: d76f0d4e0694f5adcaab327e801ee8553620c5b3
Component: engine
2017-09-07 11:28:57 -07:00
5899c64938 Fix volume inspect with empty ID
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5ac298fd0e5c065483653970be587626026971c2
Component: engine
2017-09-07 13:46:23 -04:00
56f259f37d Revert "Change sshfs by cloudstor on Installing and using a plugin"
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: eb77961399
Component: cli
2017-09-07 10:15:59 -07:00
0d3330814c Use a local copy of ParseLogDetails
It's being removed from client/

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a747389bf4
Component: cli
2017-09-07 12:50:25 -04:00
d7504f67d1 Merge pull request #34738 from wgliang/optimization1
Optimize some wrong usage and spelling
Upstream-commit: 2dcb77b24c80dd95b52358c92436f68f2a33eb01
Component: engine
2017-09-07 09:45:14 -07:00
980d05f2ea Cleanup client/ interface
- Remove ParseLogDetails, this is not part of the client. Moved to docker/cli
- Deprecate ParseHost and replace with ParseHostURL
- Deprecate redundant IsErr helpers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 54242cd067c234960d1295a67271475f9d099f22
Component: engine
2017-09-07 12:32:38 -04:00
5f49aab36a Merge pull request #34687 from tych0/bump-runc
bump runc version
Upstream-commit: a68ee8c8950b1923c3a92b9cec0d9a723897111d
Component: engine
2017-09-07 14:52:18 +02:00
6f155f233b Merge pull request #34021 from nishanttotla/dont-set-architecture-constraint
Clear Architecture field in platform constraint for arm architectures
Upstream-commit: ea220e70a13963da544645376cd9331021eec6b4
Component: engine
2017-09-07 11:18:12 +02:00
a8b7a6b071 Merge pull request #34730 from simonferquel/fix-TestEventsOOMDisableTrue-flakkyness
Events CLI tests: fix flakyness of TestEventsOOMDisableTrue
Upstream-commit: 72eb1d0a47488d279df2b80bfd3f6091eaff66a7
Component: engine
2017-09-07 11:16:37 +02:00
3aa4929239 Plugable secret backend
This commit extends SwarmKit secret management with pluggable secret
backends support.
Following previous commits:
1. docker/swarmkit@eebac27434
2. docker/docker@08f7cf0526
Added driver parameter to `docker secret` command.

Specifically:

1. `docker secret create [secret_name] --driver [driver_name]`
2.  Displaying the driver in
```
    $ docker secret ls
    $ docker secret inspect [secret_name]
    $ docker secret inspect [secret_name] -pretty
```

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 0ee9e05d8f
Component: cli
2017-09-07 11:10:44 +03:00
eec1d4ef54 Optimize some wrong usage and spelling
Signed-off-by: wgliang <liangcszzu@163.com>
Upstream-commit: 94cefa21459a0c620e5a9c2da04df6d3a43dae17
Component: engine
2017-09-07 09:44:08 +08:00
567b25fb28 Some cleanup of mount create API test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 58b96aced87b33c4175fa5d3422289f763ab599d
Component: engine
2017-09-06 19:32:35 -04:00
5063459b89 Merge pull request #34748 from dnephin/cleanup-client-deps
Cleanup client/ package dependencies
Upstream-commit: be97c66708c24727836a22247319ff2943d91a03
Component: engine
2017-09-06 16:14:29 -07:00
9fb93d3c84 Add TCP support for GELF log driver
Signed-off-by: Ghislain Bourgeois <ghislain.bourgeois@gmail.com>
Upstream-commit: e17f3511144b37855d56a009d7e7622029242d2d
Component: engine
2017-09-06 17:45:26 -04:00
74473d87d6 Merge pull request #493 from jmaitrehenry/patch-1
Change sshfs by cloudstor on Installing and using a plugin
Upstream-commit: af94015b8c
Component: cli
2017-09-06 14:42:34 -07:00
11b376603e Fix a bad assumption
If the empty variable happens to be sorted to the end of the list then TrimSpace()
would remove it. Instead only strip the single trailing newline.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fff605c3b3557acf6bf793813d695fba59d7fa21
Component: engine
2017-09-06 17:32:56 -04:00
4a595ff1d9 Add an end-to-end test for container run
for testing attach, remove, and pull image when missing.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c34360cc8e
Component: cli
2017-09-06 17:07:38 -04:00
6fc4c48771 Move common e2e things into an internal package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 677d17150a
Component: cli
2017-09-06 17:07:38 -04:00
e65a64c87e Add gotestyourself/poll
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 683b6226ed
Component: cli
2017-09-06 17:07:35 -04:00
cb4257d5fb Cleanup filter package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 065118390a3ecaf0dbd2fa752d54d43f8f1e8ec6
Component: engine
2017-09-06 16:41:47 -04:00
9f20b18453 Move tlsconfig to client package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6916c215b00ab4d7edf4be14848ab2e695697381
Component: engine
2017-09-06 16:39:55 -04:00
b82f223f2c Add support for TCP parameters
Signed-off-by: Ghislain Bourgeois <ghislain.bourgeois@gmail.com>
Upstream-commit: e21f7b6e76d578ba2ab9a6e85f4ece49290ee084
Component: engine
2017-09-06 15:55:58 -04:00
d9bec8489e Remove empty gelf_unsupported.go
Signed-off-by: Ghislain Bourgeois <ghislain.bourgeois@gmail.com>
Upstream-commit: 72f5e5e84f402f175ec08964053e1af688dad265
Component: engine
2017-09-06 15:55:58 -04:00
fe4a918058 Update to latest go-gelf version and add tests
Signed-off-by: Ghislain Bourgeois <ghislain.bourgeois@gmail.com>
Upstream-commit: b24c8e07f1f2619f0a6d73b808dffceb314e7081
Component: engine
2017-09-06 15:55:58 -04:00
c87a482794 Revendor Microsoft/opengcs @v0.3.3
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: bf898b7a0cedfec5b7e8104a1ac684f9dd232638
Component: engine
2017-09-06 12:55:25 -07:00
8db4d9c803 LCOW: VHDX boot to read-only
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 17a24034bb4281e2b63949beaa5d3846c0891726
Component: engine
2017-09-06 10:55:19 -07:00
cc7b3620f0 Remove libtrust dep from api
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2f007e46d0100d865a061c1a8e544bddc0b7a368
Component: engine
2017-09-06 12:05:19 -04:00
33519380e5 Move names to a more appropriate package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 22b246417f52aa6bd0e358e41e2bfb9c0a59c867
Component: engine
2017-09-06 12:05:16 -04:00
67de569278 Merge pull request #34745 from simonferquel/fix-pkg-archive-conversion
Re-enable some conversion for darwin-amd64 platform
Upstream-commit: 945d80cd6ad5fc9d30a947ab8872721272ac7bff
Component: engine
2017-09-06 09:00:29 -07:00
6ee8cdfa2e Merge pull request #34697 from fcrisciani/ln-vendoring
Vendoring libnetwork
Upstream-commit: 3b449dbfbad4374f618a901ff585d2ea62b1029e
Component: engine
2017-09-06 17:52:56 +02:00
0bd644faaf re-enable some conversion for darwin-amd64 platform
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 7c9e64a2e1891bf1020d9312a18741c734fa1cd6
Component: engine
2017-09-06 12:22:41 +02:00
87c0724076 devicemapper: remove container rootfs mountPath after umount
libdm currently has a fairly substantial DoS bug that makes certain
operations fail on a libdm device if the device has active references
through mountpoints. This is a significant problem with the advent of
mount namespaces and MS_PRIVATE, and can cause certain --volume mounts
to cause libdm to no longer be able to remove containers:

  % docker run -d --name testA busybox top
  % docker run -d --name testB -v /var/lib/docker:/docker busybox top
  % docker rm -f testA
  [fails on libdm with dm_task_run errors.]

This also solves the problem of unprivileged users being able to DoS
docker by using unprivileged mount namespaces to preseve mounts that
Docker has dropped.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 92e45b81e0a8b68d9567a2068247460a1ba59600
Component: engine
2017-09-06 20:11:01 +10:00
fd94302cba Relabel config files.
Without relabel these files, SELinux-enabled containers will show
"permission denied" errors for configuration files mounted with
`docker server create ... --config ... ...`.

Signed-off-by: Wenxuan Zhao <viz@linux.com>
Upstream-commit: 472c03a8c364090afb88258b3dd9748183c29d05
Component: engine
2017-09-05 18:39:48 -03:00
54efaca689 Merge pull request #34707 from vieux/force_format
force inspect test format
Upstream-commit: d7b4c7e0eac223eda54940adbb4c44bf71ec039c
Component: engine
2017-09-05 13:35:07 -07:00
50ebf89669 Merge pull request #219 from seemethere/update_makefile
Add update-components target, Fix PHONY Targets
2017-09-05 13:10:56 -07:00
57918230aa Add update-components target, Fix PHONY Targets
This allows easier updating of Docker CE components

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-09-05 12:57:43 -07:00
f109c25168 Merge pull request #34682 from dnephin/fail-build-on-integration-suite
Fix integration suite and propagate failures
Upstream-commit: 975675e9245e1d9a18cae978a0231ff83772048b
Component: engine
2017-09-05 12:40:00 -07:00
8570202308 Add bash completion for dockerd --network-control-plane-mtu
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 36068e8763
Component: cli
2017-09-05 21:29:44 +02:00
33d6fdcfda Merge pull request #353 from albers/completion-nodelist
Use native formatting in bash completion of nodes
Upstream-commit: 0426ea1443
Component: cli
2017-09-05 15:09:00 -04:00
28cf6767d3 Merge pull request #424 from simonferquel/update-vendoring
updated vendoring
Upstream-commit: 5c5cdd0e36
Component: cli
2017-09-05 15:06:09 -04:00
56b8d8a2a0 Remove version from bundle path
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bac2447964c8cdfcf35f928841d60310db997c76
Component: engine
2017-09-05 13:38:32 -04:00
33179f56a2 force inspect test format
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 8e6567cb837e1c885de5146517557c7a5d8a5f17
Component: engine
2017-09-05 08:31:44 -07:00
e76adc6a0e Merge pull request #406 from ksouf/issue_37_network_list_test
adding network list test
Upstream-commit: ec99774a85
Component: cli
2017-09-05 11:24:32 -04:00
30986cbc05 Avoid failing the test if container is already stopped
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: adf75503dba2e782139173c011999eacd0c3d7e2
Component: engine
2017-09-05 17:19:57 +02:00
db0c7d8918 Merge pull request #34704 from seemethere/add_overwriteable_version
Allows VERSION to be overwritten by env variable
Upstream-commit: 9e0a1845f23327c4623a49329b2480d98e02173f
Component: engine
2017-09-04 16:47:52 -07:00
2f974e7293 Add bash completion for search --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f6219ac3c6
Component: cli
2017-09-04 18:21:47 +02:00
09edca8b4e Merge pull request #491 from FrenchBen/fix-stack
Move output of stack rm to stdout
Upstream-commit: 38c1895021
Component: cli
2017-09-04 15:56:30 +02:00
55c903723c Add support for .Node.Hostname templating in swarm services
Signed-off-by: Carlo Mion <mion00@gmail.com>
Upstream-commit: e2f09fa6dd1705eb69ab97fbf759253a4162228a
Component: engine
2017-09-02 10:06:16 +02:00
444c2e65a4 Remove unused depdendencies from vendor
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 724f03bb23
Component: cli
2017-09-01 19:41:06 -04:00
4bafd44516 updated vendoring
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: a0113c3a44
Component: cli
2017-09-01 19:41:06 -04:00
0699e6b42a Allows VERSION to be overwritten by env variable
VERSION was hardcoded to be used as the `VERSION` file from the root
directory, this makes it so that you have the option to overwrite this.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 76643025793ca742b1c19bd35cab35c8ff7d3e77
Component: engine
2017-09-01 15:47:15 -07:00
ee07288be3 Move output of stack rm to stdout
Signed-off-by: French Ben <frenchben@docker.com>

Update for the test to capture the proper removal

Signed-off-by: French Ben <frenchben@docker.com>

Satisfy lint length limit

Signed-off-by: French Ben <frenchben@docker.com>

Updated e2e test

Signed-off-by: French Ben <frenchben@docker.com>
Upstream-commit: bb8f49773c
Component: cli
2017-09-01 14:25:20 -07:00
2578773887 Clear Architecture field in platform constraint for arm architectures
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 772af6040ed4f2f26c22901597333a900be17aae
Component: engine
2017-09-01 13:08:20 -07:00
d99a5ff6bf Change sshfs by cloudstor on Installing and using a plugin
Signed-off-by: Julien Maitrehenry <julien.maitrehenry@me.com>
Upstream-commit: e97d72334f
Component: cli
2017-09-01 14:42:01 -04:00
58ef7a0132 Fix integration suite and propagate failures
Failures from the integration suite were not propagating to the outter shell
for some reason. Handle the failure with an if exit 1.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 96707bc600747257e82917ca079fa5006d636b2c
Component: engine
2017-09-01 13:07:47 -04:00
35c8905315 Vendoring libnetwork
Diff:
5b28c0ec98...d5c8223190

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 1ddeb11835600127a3319fc0dd3764e57ffbf521
Component: engine
2017-08-31 19:10:23 -07:00
3c0eab373a bump runc version
This picks up 66eb2a3e8fc930e1bb6703561152edf5ab550bff, which fixes
readonly containers in user namespaces.

Signed-off-by: Tycho Andersen <tycho@docker.com>
Upstream-commit: 47e9d856c43b6b251d86afc099ec092aa83b1534
Component: engine
2017-08-30 14:26:59 -07:00
6eb6b7d9d2 adding network list test
Signed-off-by: khaled souf <khaled.souf@gmail.com>
Upstream-commit: 15d92a9e03
Component: cli
2017-08-29 16:30:37 +02:00
b812e1036b Use native formatting in bash completion of nodes
Completion of nodes now uses native Docker commands that were not available
when this function was created.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e391e34801
Component: cli
2017-08-28 09:59:19 +02:00
b132c15093 Improve bash completion for --credential-spec
This option is Windows specific and should be only available if the
daemon runs on Windows.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 056ccf88be
Component: cli
2017-08-28 09:53:58 +02:00
ce23144495 Fixed raw mode splunk logger
Splunk HEC does not accept log events with an empty string or a
whitespace-only string.

Signed-off-by: Florian Noeding <florian@noeding.com>
Upstream-commit: 5f6d6a5093a4db799f9c1a6bb82eed1eea13ec0c
Component: engine
2017-08-18 12:03:43 +02:00
934616e542 Replacing os.Lstat with os.Stat to determine directory status in CopyInfoDestinationPath
Signed-off-by: Douglas Curtis <dougcurtis1@gmail.com>

Commenting out tests for now

Signed-off-by: Doug Curtis <dougcurtis1@gmail.com>

Added unit test for CopyInfoDestionationPath.

Signed-off-by: Doug Curtis <dougcurtis1@gmail.com>

Removing integration-cli test case additions

Signed-off-by: Doug Curtis <dougcurtis1@gmail.com>

Removing extra spaces between archive_unix_test.go test cases

Signed-off-by: Doug Curtis <dougcurtis1@gmail.com>

Fixed gofmt issues in archive_unix_test.go

Signed-off-by: Doug Curtis <dougcurtis1@gmail.com>
Upstream-commit: cd7489f2b745578e0d8855aa44213b07b495f86f
Component: engine
2017-08-15 23:19:42 +00:00
615f3700ae Docs for Windows daemon graphdriver options
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c848f9acb6
Component: cli
2017-08-15 10:20:15 -07:00
3398b05230 Update event filter zsh completion with disable, enable, install, and remove
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Upstream-commit: d31df921ad
Component: cli
2017-07-21 11:53:05 +01:00
5281 changed files with 580239 additions and 94046 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.helpers/

View File

@ -1,8 +1,116 @@
# Changelog
# Changelog
For more information on the list of deprecated flags and APIs please have a look at
https://docs.docker.com/engine/deprecated/ where you can find the target removal dates
Items starting with `DEPRECATE` are important deprecation notices. For more
information on the list of deprecated flags and APIs please have a look at
https://docs.docker.com/engine/deprecated/ where target removal dates can also
be found.
## 18.03.0-ce (2018-03-DD)
## 17.09.0-ce (2017-09-DD)
### Builder
* Switch to -buildmode=pie [moby/moby#34369](https://github.com/moby/moby/pull/34369)
* Allow Dockerfile to be outside of build-context [docker/cli#886](https://github.com/docker/cli/pull/886)
* Builder: fix wrong cache hits building from tars [moby/moby#36329](https://github.com/moby/moby/pull/36329)
- Fixes files leaking to other images in a multi-stage build [moby/moby#36338](https://github.com/moby/moby/pull/36338)
### Client
* Simplify the marshaling of compose types.Config [docker/cli#895](https://github.com/docker/cli/pull/895)
+ Add support for multiple composefile when deploying [docker/cli#569](https://github.com/docker/cli/pull/569)
- Fix broken Kubernetes stack flags [docker/cli#831](https://github.com/docker/cli/pull/831)
- Fix stack marshaling for Kubernetes [docker/cli#890](https://github.com/docker/cli/pull/890)
- Fix and simplify bash completion for service env, mounts and labels [docker/cli#682](https://github.com/docker/cli/pull/682)
- Fix `before` and `since` filter for `docker ps` [moby/moby#35938](https://github.com/moby/moby/pull/35938)
- Fix `--label-file` weird behavior [docker/cli#838](https://github.com/docker/cli/pull/838)
- Fix compilation of defaultCredentialStore() on unsupported platforms [docker/cli#872](https://github.com/docker/cli/pull/872)
* Improve and fix bash completion for images [docker/cli#717](https://github.com/docker/cli/pull/717)
+ Added check for empty source in bind mount [docker/cli#824](https://github.com/docker/cli/pull/824)
- Fix TLS from environment variables in client [moby/moby#36270](https://github.com/moby/moby/pull/36270)
* docker build now runs faster when registry-specific credential helper(s) are configured [docker/cli#840](https://github.com/docker/cli/pull/840)
* Update event filter zsh completion with `disable`, `enable`, `install` and `remove` [docker/cli#372](https://github.com/docker/cli/pull/372)
* Produce errors when empty ids are passed into inspect calls [moby/moby#36144](https://github.com/moby/moby/pull/36144)
* Marshall version for the k8s controller [docker/cli#891](https://github.com/docker/cli/pull/891)
* Set a non-zero timeout for HTTP client communication with plugin backend [docker/cli#883](https://github.com/docker/cli/pull/883)
+ Add DOCKER_TLS environment variable for --tls option [docker/cli#863](https://github.com/docker/cli/pull/863)
+ Add --template-driver option for secrets/configs [docker/cli#896](https://github.com/docker/cli/pull/896)
### Logging
* AWS logs - don't add new lines to maximum sized events [moby/moby#36078](https://github.com/moby/moby/pull/36078)
* Move log validator logic after plugins are loaded [moby/moby#36306](https://github.com/moby/moby/pull/36306)
* Support a proxy in Splunk log driver [moby/moby#36220](https://github.com/moby/moby/pull/36220)
- Fix log tail with empty logs [moby/moby#36305](https://github.com/moby/moby/pull/36305)
### Networking
* Libnetwork revendoring [moby/moby#36137](https://github.com/moby/moby/pull/36137)
- Fix for deadlock on exit with Memberlist revendor [docker/libnetwork#2040](https://github.com/docker/libnetwork/pull/2040)
* Fix user specified ndots option [docker/libnetwork#2065](https://github.com/docker/libnetwork/pull/2065)
- Fix to use ContainerID for Windows instead of SandboxID [docker/libnetwork#2010](https://github.com/docker/libnetwork/pull/2010)
* Verify NetworkingConfig to make sure EndpointSettings is not nil [moby/moby#36077](https://github.com/moby/moby/pull/36077)
- Fix `DockerNetworkInternalMode` issue [moby/moby#36298](https://github.com/moby/moby/pull/36298)
- Fix race in attachable network attachment [moby/moby#36191](https://github.com/moby/moby/pull/36191)
- Fix timeout issue of `InspectNetwork` on AArch64 [moby/moby#36257](https://github.com/moby/moby/pull/36257)
* Verbose info is missing for partial overlay ID [moby/moby#35989](https://github.com/moby/moby/pull/35989)
* Update `FindNetwork` to address network name duplications [moby/moby#30897](https://github.com/moby/moby/pull/30897)
* Disallow attaching ingress network [docker/swarmkit#2523](https://github.com/docker/swarmkit/pull/2523)
### Runtime
* Enable HotAdd for Windows [moby/moby#35414](https://github.com/moby/moby/pull/35414)
* LCOW: Graphdriver fix deadlock in hotRemoveVHDs [moby/moby#36114](https://github.com/moby/moby/pull/36114)
* LCOW: Regular mount if only one layer [moby/moby#36052](https://github.com/moby/moby/pull/36052)
* Remove interim env var LCOW_API_PLATFORM_IF_OMITTED [moby/moby#36269](https://github.com/moby/moby/pull/36269)
* Revendor Microsoft/opengcs @ v0.3.6 [moby/moby#36108](https://github.com/moby/moby/pull/36108)
- Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus [moby/moby#36150](https://github.com/moby/moby/pull/36150)
- Fix issue with plugin scanner going too deep [moby/moby#36119](https://github.com/moby/moby/pull/36119)
* Do not make graphdriver homes private mounts [moby/moby#36047](https://github.com/moby/moby/pull/36047)
* Do not recursive unmount on cleanup of zfs/btrfs [moby/moby#36237](https://github.com/moby/moby/pull/36237)
* Don't restore image if layer does not exist [moby/moby#36304](https://github.com/moby/moby/pull/36304)
* Adjust minimum API version for templated configs/secrets [moby/moby#36366](https://github.com/moby/moby/pull/36366)
* Bump containerd to 1.0.2 (cfd04396dc68220d1cecbe686a6cc3aa5ce3667c) [moby/moby#36308](https://github.com/moby/moby/pull/36308)
* Bump Golang to 1.9.4 [moby/moby#36243](https://github.com/moby/moby/pull/36243)
* Ensure daemon root is unmounted on shutdown [moby/moby#36107](https://github.com/moby/moby/pull/36107)
* Update runc to 6c55f98695e902427906eed2c799e566e3d3dfb5 [moby/moby#36222](https://github.com/moby/moby/pull/36222)
- Fix container cleanup on daemon restart [moby/moby#36249](https://github.com/moby/moby/pull/36249)
* Support SCTP port mapping (bump up API to v1.37) [moby/moby#33922](https://github.com/moby/moby/pull/33922)
* Support SCTP port mapping [docker/cli#278](https://github.com/docker/cli/pull/278)
- Fix Volumes property definition in ContainerConfig [moby/moby#35946](https://github.com/moby/moby/pull/35946)
* Bump moby and dependencies [docker/cli#829](https://github.com/docker/cli/pull/829)
* C.RWLayer: check for nil before use [moby/moby#36242](https://github.com/moby/moby/pull/36242)
+ Add `REMOVE` and `ORPHANED` to TaskState [moby/moby#36146](https://github.com/moby/moby/pull/36146)
- Fixed error detection using `IsErrNotFound` and `IsErrNotImplemented` for `ContainerStatPath`, `CopyFromContainer`, and `CopyToContainer` methods [moby/moby#35979](https://github.com/moby/moby/pull/35979)
+ Add an integration/internal/container helper package [moby/moby#36266](https://github.com/moby/moby/pull/36266)
+ Add canonical import path [moby/moby#36194](https://github.com/moby/moby/pull/36194)
+ Add/use container.Exec() to integration [moby/moby#36326](https://github.com/moby/moby/pull/36326)
- Fix "--node-generic-resource" singular/plural [moby/moby#36125](https://github.com/moby/moby/pull/36125)
* Daemon.cleanupContainer: nullify container RWLayer upon release [moby/moby#36160](https://github.com/moby/moby/pull/36160)
* Daemon: passdown the `--oom-kill-disable` option to containerd [moby/moby#36201](https://github.com/moby/moby/pull/36201)
* Display a warn message when there is binding ports and net mode is host [moby/moby#35510](https://github.com/moby/moby/pull/35510)
* Refresh containerd remotes on containerd restarted [moby/moby#36173](https://github.com/moby/moby/pull/36173)
* Set daemon root to use shared propagation [moby/moby#36096](https://github.com/moby/moby/pull/36096)
* Optimizations for recursive unmount [moby/moby#34379](https://github.com/moby/moby/pull/34379)
* Perform plugin mounts in the runtime [moby/moby#35829](https://github.com/moby/moby/pull/35829)
* Graphdriver: Fix RefCounter memory leak [moby/moby#36256](https://github.com/moby/moby/pull/36256)
* Use continuity fs package for volume copy [moby/moby#36290](https://github.com/moby/moby/pull/36290)
* Use proc/exe for reexec [moby/moby#36124](https://github.com/moby/moby/pull/36124)
+ Add API support for templated secrets and configs [moby/moby#33702](https://github.com/moby/moby/pull/33702) and [moby/moby#36366](https://github.com/moby/moby/pull/36366)
* Use rslave propagation for mounts from daemon root [moby/moby#36055](https://github.com/moby/moby/pull/36055)
+ Add /proc/keys to masked paths [moby/moby#36368](https://github.com/moby/moby/pull/36368)
* Bump Runc to 1.0.0-rc5 [moby/moby#36449](https://github.com/moby/moby/pull/36449)
- Fixes `runc exec` on big-endian architectures [moby/moby#36449](https://github.com/moby/moby/pull/36449)
* Use chroot when mount namespaces aren't provided [moby/moby#36449](https://github.com/moby/moby/pull/36449)
- Fix systemd slice expansion so that it could be consumed by cAdvisor [moby/moby#36449](https://github.com/moby/moby/pull/36449)
- Fix devices mounted with wrong uid/gid [moby/moby#36449](https://github.com/moby/moby/pull/36449)
### Swarm Mode
* Replace EC Private Key with PKCS#8 PEMs [docker/swarmkit#2246](https://github.com/docker/swarmkit/pull/2246)
* Fix IP overlap with empty EndpointSpec [docker/swarmkit #2505](https://github.com/docker/swarmkit/pull/2505)
* Add support for Support SCTP port mapping [docker/swarmkit#2298](https://github.com/docker/swarmkit/pull/2298)
* Do not reschedule tasks if only placement constraints change and are satisfied by the assigned node [docker/swarmkit#2496](https://github.com/docker/swarmkit/pull/2496)
* Ensure task reaper stopChan is closed no more than once [docker/swarmkit #2491](https://github.com/docker/swarmkit/pull/2491)
* Synchronization fixes [docker/swarmkit#2495](https://github.com/docker/swarmkit/pull/2495)
* Add log message to indicate message send retry if streaming unimplemented [docker/swarmkit#2483](https://github.com/docker/swarmkit/pull/2483)
* Debug logs for session, node events on dispatcher, heartbeats [docker/swarmkit#2486](https://github.com/docker/swarmkit/pull/2486)
+ Add swarm types to bash completion event type filter [docker/cli#888](https://github.com/docker/cli/pull/888)
- Fix issue where network inspect does not show Created time for networks in swarm scope [moby/moby#36095](https://github.com/moby/moby/pull/36095)

View File

@ -1,27 +1,56 @@
CLI_DIR:=$(CURDIR)/components/cli
ENGINE_DIR:=$(CURDIR)/components/engine
PACKAGING_DIR:=$(CURDIR)/components/packaging
MOBY_COMPONENTS_SHA=ab7c118272b02d8672dc0255561d0c4015979780
MOBY_COMPONENTS_URL=https://raw.githubusercontent.com/shykes/moby-extras/$(MOBY_COMPONENTS_SHA)/cmd/moby-components
MOBY_COMPONENTS=.helpers/moby-components-$(MOBY_COMPONENTS_SHA)
VERSION=$(shell cat VERSION)
.PHONY: help
help: ## show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: test-integration-cli
test-integration-cli: $(CLI_DIR)/build/docker ## test integration of cli and engine
$(MAKE) -C $(ENGINE_DIR) DOCKER_CLI_PATH=$< test-integration-cli
$(CLI_DIR)/build/docker:
$(MAKE) -C $(CLI_DIR) -f docker.Makefile build
.PHONY: deb
deb: ## build deb packages
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) deb
.PHONY: rpm
rpm: ## build rpm packages
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) rpm
.PHONY: static
static: ## build static packages
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) static
.PHONY: clean
clean: ## clean the build artifacts
-$(MAKE) -C $(CLI_DIR) clean
-$(MAKE) -C $(ENGINE_DIR) clean
-$(MAKE) -C $(PACKAGING_DIR) clean
$(MOBY_COMPONENTS):
mkdir -p .helpers
curl -fsSL $(MOBY_COMPONENTS_URL) > $(MOBY_COMPONENTS)
chmod +x $(MOBY_COMPONENTS)
.PHONY: update-components
update-components: update-components-cli update-components-engine update-components-packaging ## udpate components using moby extra tool
.PHONY: update-components-cli
update-components-cli: $(MOBY_COMPONENTS)
$(MOBY_COMPONENTS) update cli
.PHONY: update-components-engine
update-components-engine: $(MOBY_COMPONENTS)
$(MOBY_COMPONENTS) update engine
.PHONY: update-components-packaging
update-components-packaging: $(MOBY_COMPONENTS)
$(MOBY_COMPONENTS) update packaging

View File

@ -1 +1 @@
17.09.0-dev
18.03.0-ce-rc3

View File

@ -1,9 +1,9 @@
# Github code owners
# GitHub code owners
# See https://github.com/blog/2392-introducing-code-owners
cli/command/stack/** @dnephin @vdemeester
cli/compose/** @dnephin @vdemeester
contrib/completion/bash/** @albers
contrib/completion/zsh/** @sdurrheimer
docs/** @mstanleyjones @vdemeester @thaJeztah
docs/** @mistyhacks @vdemeester @thaJeztah
scripts/** @dnephin

View File

@ -1,4 +1,12 @@
# if you want to ignore files created by your editor/tools,
# please consider a global .gitignore https://help.github.com/articles/ignoring-files
*.exe
*.exe~
*.orig
.*.swp
.DS_Store
Thumbs.db
.editorconfig
/build/
cli/winresources/rsrc_386.syso
cli/winresources/rsrc_amd64.syso

475
components/cli/.mailmap Normal file
View File

@ -0,0 +1,475 @@
# Generate AUTHORS: scripts/docs/generate-authors.sh
# Tip for finding duplicates (besides scanning the output of AUTHORS for name
# duplicates that aren't also email duplicates): scan the output of:
# git log --format='%aE - %aN' | sort -uf
#
# For explanation on this file format: man git-shortlog
Aaron L. Xu <liker.xu@foxmail.com>
Abhinandan Prativadi <abhi@docker.com>
Adrien Gallouët <adrien@gallouet.fr> <angt@users.noreply.github.com>
Ahmed Kamal <email.ahmedkamal@googlemail.com>
Ahmet Alp Balkan <ahmetb@microsoft.com> <ahmetalpbalkan@gmail.com>
AJ Bowen <aj@gandi.net>
AJ Bowen <aj@gandi.net> <amy@gandi.net>
Akihiro Matsushima <amatsusbit@gmail.com> <amatsus@users.noreply.github.com>
Akihiro Suda <suda.akihiro@lab.ntt.co.jp> <suda.kyoto@gmail.com>
Aleksa Sarai <asarai@suse.de>
Aleksa Sarai <asarai@suse.de> <asarai@suse.com>
Aleksa Sarai <asarai@suse.de> <cyphar@cyphar.com>
Aleksandrs Fadins <aleks@s-ko.net>
Alessandro Boch <aboch@tetrationanalytics.com> <aboch@docker.com>
Alex Chen <alexchenunix@gmail.com> <root@localhost.localdomain>
Alex Ellis <alexellis2@gmail.com>
Alexander Larsson <alexl@redhat.com> <alexander.larsson@gmail.com>
Alexander Morozov <lk4d4@docker.com>
Alexander Morozov <lk4d4@docker.com> <lk4d4math@gmail.com>
Alexandre Beslic <alexandre.beslic@gmail.com> <abronan@docker.com>
Alicia Lauerman <alicia@eta.im> <allydevour@me.com>
Allen Sun <allensun.shl@alibaba-inc.com> <allen.sun@daocloud.io>
Allen Sun <allensun.shl@alibaba-inc.com> <shlallen1990@gmail.com>
Andrew Weiss <andrew.weiss@docker.com> <andrew.weiss@microsoft.com>
Andrew Weiss <andrew.weiss@docker.com> <andrew.weiss@outlook.com>
André Martins <aanm90@gmail.com> <martins@noironetworks.com>
Andy Rothfusz <github@developersupport.net> <github@metaliveblog.com>
Andy Smith <github@anarkystic.com>
Ankush Agarwal <ankushagarwal11@gmail.com> <ankushagarwal@users.noreply.github.com>
Antonio Murdaca <antonio.murdaca@gmail.com> <amurdaca@redhat.com>
Antonio Murdaca <antonio.murdaca@gmail.com> <me@runcom.ninja>
Antonio Murdaca <antonio.murdaca@gmail.com> <runcom@linux.com>
Antonio Murdaca <antonio.murdaca@gmail.com> <runcom@redhat.com>
Antonio Murdaca <antonio.murdaca@gmail.com> <runcom@users.noreply.github.com>
Anuj Bahuguna <anujbahuguna.dev@gmail.com>
Anuj Bahuguna <anujbahuguna.dev@gmail.com> <abahuguna@fiberlink.com>
Anusha Ragunathan <anusha.ragunathan@docker.com> <anusha@docker.com>
Arnaud Porterie <arnaud.porterie@docker.com>
Arnaud Porterie <arnaud.porterie@docker.com> <icecrime@gmail.com>
Arthur Gautier <baloo@gandi.net> <superbaloo+registrations.github@superbaloo.net>
Avi Miller <avi.miller@oracle.com> <avi.miller@gmail.com>
Ben Bonnefoy <frenchben@docker.com>
Ben Golub <ben.golub@dotcloud.com>
Ben Toews <mastahyeti@gmail.com> <mastahyeti@users.noreply.github.com>
Benoit Chesneau <bchesneau@gmail.com>
Bhiraj Butala <abhiraj.butala@gmail.com>
Bhumika Bayani <bhumikabayani@gmail.com>
Bilal Amarni <bilal.amarni@gmail.com> <bamarni@users.noreply.github.com>
Bill Wang <ozbillwang@gmail.com> <SydOps@users.noreply.github.com>
Bin Liu <liubin0329@gmail.com>
Bin Liu <liubin0329@gmail.com> <liubin0329@users.noreply.github.com>
Bingshen Wang <bingshen.wbs@alibaba-inc.com>
Boaz Shuster <ripcurld.github@gmail.com>
Brandon Philips <brandon.philips@coreos.com> <brandon@ifup.co>
Brandon Philips <brandon.philips@coreos.com> <brandon@ifup.org>
Brent Salisbury <brent.salisbury@docker.com> <brent@docker.com>
Brian Goff <cpuguy83@gmail.com>
Brian Goff <cpuguy83@gmail.com> <bgoff@cpuguy83-mbp.home>
Brian Goff <cpuguy83@gmail.com> <bgoff@cpuguy83-mbp.local>
Chander Govindarajan <chandergovind@gmail.com>
Chao Wang <wangchao.fnst@cn.fujitsu.com> <chaowang@localhost.localdomain>
Charles Hooper <charles.hooper@dotcloud.com> <chooper@plumata.com>
Chen Chao <cc272309126@gmail.com>
Chen Chuanliang <chen.chuanliang@zte.com.cn>
Chen Mingjie <chenmingjie0828@163.com>
Chen Qiu <cheney-90@hotmail.com>
Chen Qiu <cheney-90@hotmail.com> <21321229@zju.edu.cn>
Chris Dias <cdias@microsoft.com>
Chris McKinnel <chris.mckinnel@tangentlabs.co.uk>
Christopher Biscardi <biscarch@sketcht.com>
Christopher Latham <sudosurootdev@gmail.com>
Chun Chen <ramichen@tencent.com> <chenchun.feed@gmail.com>
Corbin Coleman <corbin.coleman@docker.com>
Cristian Staretu <cristian.staretu@gmail.com>
Cristian Staretu <cristian.staretu@gmail.com> <unclejack@users.noreply.github.com>
Cristian Staretu <cristian.staretu@gmail.com> <unclejacksons@gmail.com>
CUI Wei <ghostplant@qq.com> cuiwei13 <cuiwei13@pku.edu.cn>
Daehyeok Mun <daehyeok@gmail.com>
Daehyeok Mun <daehyeok@gmail.com> <daehyeok@daehyeok-ui-MacBook-Air.local>
Daehyeok Mun <daehyeok@gmail.com> <daehyeok@daehyeokui-MacBook-Air.local>
Dan Feldman <danf@jfrog.com>
Daniel Dao <dqminh@cloudflare.com>
Daniel Dao <dqminh@cloudflare.com> <dqminh89@gmail.com>
Daniel Garcia <daniel@danielgarcia.info>
Daniel Gasienica <daniel@gasienica.ch> <dgasienica@zynga.com>
Daniel Goosen <daniel.goosen@surveysampling.com> <djgoosen@users.noreply.github.com>
Daniel Grunwell <mwgrunny@gmail.com>
Daniel J Walsh <dwalsh@redhat.com>
Daniel Mizyrycki <daniel.mizyrycki@dotcloud.com> <daniel@dotcloud.com>
Daniel Mizyrycki <daniel.mizyrycki@dotcloud.com> <mzdaniel@glidelink.net>
Daniel Mizyrycki <daniel.mizyrycki@dotcloud.com> <root@vagrant-ubuntu-12.10.vagrantup.com>
Daniel Nephin <dnephin@docker.com> <dnephin@gmail.com>
Daniel Norberg <dano@spotify.com> <daniel.norberg@gmail.com>
Daniel Watkins <daniel@daniel-watkins.co.uk>
Danny Yates <danny@codeaholics.org> <Danny.Yates@mailonline.co.uk>
Darren Shepherd <darren.s.shepherd@gmail.com> <darren@rancher.com>
Dattatraya Kumbhar <dattatraya.kumbhar@gslab.com>
Dave Goodchild <buddhamagnet@gmail.com>
Dave Henderson <dhenderson@gmail.com> <Dave.Henderson@ca.ibm.com>
Dave Tucker <dt@docker.com> <dave@dtucker.co.uk>
David M. Karr <davidmichaelkarr@gmail.com>
David Sheets <dsheets@docker.com> <sheets@alum.mit.edu>
David Sissitka <me@dsissitka.com>
David Williamson <david.williamson@docker.com> <davidwilliamson@users.noreply.github.com>
Deshi Xiao <dxiao@redhat.com> <dsxiao@dataman-inc.com>
Deshi Xiao <dxiao@redhat.com> <xiaods@gmail.com>
Diego Siqueira <dieg0@live.com>
Diogo Monica <diogo@docker.com> <diogo.monica@gmail.com>
Dominik Honnef <dominik@honnef.co> <dominikh@fork-bomb.org>
Doug Davis <dug@us.ibm.com> <duglin@users.noreply.github.com>
Doug Tangren <d.tangren@gmail.com>
Elan Ruusamäe <glen@pld-linux.org>
Elan Ruusamäe <glen@pld-linux.org> <glen@delfi.ee>
Eric G. Noriega <enoriega@vizuri.com> <egnoriega@users.noreply.github.com>
Eric Hanchrow <ehanchrow@ine.com> <eric.hanchrow@gmail.com>
Eric Rosenberg <ehaydenr@gmail.com> <ehaydenr@users.noreply.github.com>
Erica Windisch <erica@windisch.us> <eric@windisch.us>
Erica Windisch <erica@windisch.us> <ewindisch@docker.com>
Erik Hollensbe <github@hollensbe.org> <erik+github@hollensbe.org>
Erwin van der Koogh <info@erronis.nl>
Euan Kemp <euan.kemp@coreos.com> <euank@amazon.com>
Eugen Krizo <eugen.krizo@gmail.com>
Evan Hazlett <ejhazlett@gmail.com> <ehazlett@users.noreply.github.com>
Evelyn Xu <evelynhsu21@gmail.com>
Evgeny Shmarnev <shmarnev@gmail.com>
Faiz Khan <faizkhan00@gmail.com>
Felix Hupfeld <felix@quobyte.com> <quofelix@users.noreply.github.com>
Felix Ruess <felix.ruess@gmail.com> <felix.ruess@roboception.de>
Feng Yan <fy2462@gmail.com>
Fengtu Wang <wangfengtu@huawei.com> <wangfengtu@huawei.com>
Francisco Carriedo <fcarriedo@gmail.com>
Frank Rosquin <frank.rosquin+github@gmail.com> <frank.rosquin@gmail.com>
Frederick F. Kautz IV <fkautz@redhat.com> <fkautz@alumni.cmu.edu>
Gabriel Nicolas Avellaneda <avellaneda.gabriel@gmail.com>
Gaetan de Villele <gdevillele@gmail.com>
Gang Qiao <qiaohai8866@gmail.com> <1373319223@qq.com>
George Kontridze <george@bugsnag.com>
Gerwim Feiken <g.feiken@tfe.nl> <gerwim@gmail.com>
Giampaolo Mancini <giampaolo@trampolineup.com>
Gopikannan Venugopalsamy <gopikannan.venugopalsamy@gmail.com>
Gou Rao <gou@portworx.com> <gourao@users.noreply.github.com>
Greg Stephens <greg@udon.org>
Guillaume J. Charmes <guillaume.charmes@docker.com> <charmes.guillaume@gmail.com>
Guillaume J. Charmes <guillaume.charmes@docker.com> <guillaume.charmes@dotcloud.com>
Guillaume J. Charmes <guillaume.charmes@docker.com> <guillaume@charmes.net>
Guillaume J. Charmes <guillaume.charmes@docker.com> <guillaume@docker.com>
Guillaume J. Charmes <guillaume.charmes@docker.com> <guillaume@dotcloud.com>
Gurjeet Singh <gurjeet@singh.im> <singh.gurjeet@gmail.com>
Gustav Sinder <gustav.sinder@gmail.com>
Günther Jungbluth <gunther@gameslabs.net>
Hakan Özler <hakan.ozler@kodcu.com>
Hao Shu Wei <haosw@cn.ibm.com>
Hao Shu Wei <haosw@cn.ibm.com> <haoshuwei1989@163.com>
Harald Albers <github@albersweb.de> <albers@users.noreply.github.com>
Harold Cooper <hrldcpr@gmail.com>
Harry Zhang <harryz@hyper.sh> <harryzhang@zju.edu.cn>
Harry Zhang <harryz@hyper.sh> <resouer@163.com>
Harry Zhang <harryz@hyper.sh> <resouer@gmail.com>
Harry Zhang <resouer@163.com>
Harshal Patil <harshal.patil@in.ibm.com> <harche@users.noreply.github.com>
Helen Xie <chenjg@harmonycloud.cn>
Hollie Teal <hollie@docker.com>
Hollie Teal <hollie@docker.com> <hollie.teal@docker.com>
Hollie Teal <hollie@docker.com> <hollietealok@users.noreply.github.com>
Hu Keping <hukeping@huawei.com>
Huu Nguyen <huu@prismskylabs.com> <whoshuu@gmail.com>
Hyzhou Zhy <hyzhou.zhy@alibaba-inc.com>
Hyzhou Zhy <hyzhou.zhy@alibaba-inc.com> <1187766782@qq.com>
Ilya Khlopotov <ilya.khlopotov@gmail.com>
Jack Laxson <jackjrabbit@gmail.com>
Jacob Atzen <jacob@jacobatzen.dk> <jatzen@gmail.com>
Jacob Tomlinson <jacob@tom.linson.uk> <jacobtomlinson@users.noreply.github.com>
Jaivish Kothari <janonymous.codevulture@gmail.com>
Jamie Hannaford <jamie@limetree.org> <jamie.hannaford@rackspace.com>
Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Jean-Baptiste Dalido <jeanbaptiste@appgratis.com>
Jean-Tiare Le Bigot <jt@yadutaf.fr> <admin@jtlebi.fr>
Jeff Anderson <jeff@docker.com> <jefferya@programmerq.net>
Jeff Nickoloff <jeff.nickoloff@gmail.com> <jeff@allingeek.com>
Jeroen Franse <jeroenfranse@gmail.com>
Jessica Frazelle <jessfraz@google.com>
Jessica Frazelle <jessfraz@google.com> <acidburn@docker.com>
Jessica Frazelle <jessfraz@google.com> <acidburn@google.com>
Jessica Frazelle <jessfraz@google.com> <jess@docker.com>
Jessica Frazelle <jessfraz@google.com> <jess@mesosphere.com>
Jessica Frazelle <jessfraz@google.com> <jfrazelle@users.noreply.github.com>
Jessica Frazelle <jessfraz@google.com> <me@jessfraz.com>
Jessica Frazelle <jessfraz@google.com> <princess@docker.com>
Jim Galasyn <jim.galasyn@docker.com>
Jiuyue Ma <majiuyue@huawei.com>
Joey Geiger <jgeiger@gmail.com>
Joffrey F <joffrey@docker.com>
Joffrey F <joffrey@docker.com> <f.joffrey@gmail.com>
Joffrey F <joffrey@docker.com> <joffrey@dotcloud.com>
Johan Euphrosine <proppy@google.com> <proppy@aminche.com>
John Harris <john@johnharris.io>
John Howard (VM) <John.Howard@microsoft.com>
John Howard (VM) <John.Howard@microsoft.com> <jhoward@microsoft.com>
John Howard (VM) <John.Howard@microsoft.com> <jhoward@ntdev.microsoft.com>
John Howard (VM) <John.Howard@microsoft.com> <jhowardmsft@users.noreply.github.com>
John Howard (VM) <John.Howard@microsoft.com> <john.howard@microsoft.com>
John Stephens <johnstep@docker.com> <johnstep@users.noreply.github.com>
Jordan Arentsen <blissdev@gmail.com>
Jordan Jennings <jjn2009@gmail.com> <jjn2009@users.noreply.github.com>
Jorit Kleine-Möllhoff <joppich@bricknet.de> <joppich@users.noreply.github.com>
Jose Diaz-Gonzalez <jose@seatgeek.com> <josegonzalez@users.noreply.github.com>
Josh Eveleth <joshe@opendns.com> <jeveleth@users.noreply.github.com>
Josh Hawn <josh.hawn@docker.com> <jlhawn@berkeley.edu>
Josh Horwitz <horwitz@addthis.com> <horwitzja@gmail.com>
Josh Soref <jsoref@gmail.com> <jsoref@users.noreply.github.com>
Josh Wilson <josh.wilson@fivestars.com> <jcwilson@users.noreply.github.com>
Joyce Jang <mail@joycejang.com>
Julien Bordellier <julienbordellier@gmail.com> <git@julienbordellier.com>
Julien Bordellier <julienbordellier@gmail.com> <me@julienbordellier.com>
Justin Cormack <justin.cormack@docker.com>
Justin Cormack <justin.cormack@docker.com> <justin.cormack@unikernel.com>
Justin Cormack <justin.cormack@docker.com> <justin@specialbusservice.com>
Justin Simonelis <justin.p.simonelis@gmail.com> <justin.simonelis@PTS-JSIMON2.toronto.exclamation.com>
Jérôme Petazzoni <jerome.petazzoni@docker.com> <jerome.petazzoni@dotcloud.com>
Jérôme Petazzoni <jerome.petazzoni@docker.com> <jerome.petazzoni@gmail.com>
Jérôme Petazzoni <jerome.petazzoni@docker.com> <jp@enix.org>
K. Heller <pestophagous@gmail.com> <pestophagous@users.noreply.github.com>
Kai Qiang Wu (Kennan) <wkq5325@gmail.com>
Kai Qiang Wu (Kennan) <wkq5325@gmail.com> <wkqwu@cn.ibm.com>
Kamil Domański <kamil@domanski.co>
Kamjar Gerami <kami.gerami@gmail.com>
Kat Samperi <kat.samperi@gmail.com> <kizzie@users.noreply.github.com>
Ken Cochrane <kencochrane@gmail.com> <KenCochrane@gmail.com>
Ken Herner <kherner@progress.com> <chosenken@gmail.com>
Kenfe-Mickaël Laventure <mickael.laventure@gmail.com>
Kevin Feyrer <kevin.feyrer@btinternet.com> <kevinfeyrer@users.noreply.github.com>
Kevin Kern <kaiwentan@harmonycloud.cn>
Kevin Meredith <kevin.m.meredith@gmail.com>
Kir Kolyshkin <kolyshkin@gmail.com>
Kir Kolyshkin <kolyshkin@gmail.com> <kir@openvz.org>
Kir Kolyshkin <kolyshkin@gmail.com> <kolyshkin@users.noreply.github.com>
Konrad Kleine <konrad.wilhelm.kleine@gmail.com> <kwk@users.noreply.github.com>
Konstantin Gribov <grossws@gmail.com>
Konstantin Pelykh <kpelykh@zettaset.com>
Kotaro Yoshimatsu <kotaro.yoshimatsu@gmail.com>
Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> <kunal.kushwaha@gmail.com>
Lajos Papp <lajos.papp@sequenceiq.com> <lalyos@yahoo.com>
Lei Jitang <leijitang@huawei.com>
Lei Jitang <leijitang@huawei.com> <leijitang@gmail.com>
Liang Mingqiang <mqliang.zju@gmail.com>
Liang-Chi Hsieh <viirya@gmail.com>
Liao Qingwei <liaoqingwei@huawei.com>
Linus Heckemann <lheckemann@twig-world.com>
Linus Heckemann <lheckemann@twig-world.com> <anonymouse2048@gmail.com>
Lokesh Mandvekar <lsm5@fedoraproject.org> <lsm5@redhat.com>
Lorenzo Fontana <lo@linux.com> <fontanalorenzo@me.com>
Louis Opter <kalessin@kalessin.fr>
Louis Opter <kalessin@kalessin.fr> <louis@dotcloud.com>
Luca Favatella <luca.favatella@erlang-solutions.com> <lucafavatella@users.noreply.github.com>
Luke Marsden <me@lukemarsden.net> <luke@digital-crocus.com>
Lyn <energylyn@zju.edu.cn>
Lynda O'Leary <lyndaoleary29@gmail.com>
Lynda O'Leary <lyndaoleary29@gmail.com> <lyndaoleary@hotmail.com>
Ma Müller <mueller-ma@users.noreply.github.com>
Madhan Raj Mookkandy <MadhanRaj.Mookkandy@microsoft.com> <madhanm@microsoft.com>
Madhu Venugopal <madhu@socketplane.io> <madhu@docker.com>
Mageee <fangpuyi@foxmail.com> <21521230.zju.edu.cn>
Mansi Nahar <mmn4185@rit.edu> <mansi.nahar@macbookpro-mansinahar.local>
Mansi Nahar <mmn4185@rit.edu> <mansinahar@users.noreply.github.com>
Marc Abramowitz <marc@marc-abramowitz.com> <msabramo@gmail.com>
Marcelo Horacio Fortino <info@fortinux.com> <fortinux@users.noreply.github.com>
Marcus Linke <marcus.linke@gmx.de>
Marianna Tessel <mtesselh@gmail.com>
Mark Oates <fl0yd@me.com>
Markan Patel <mpatel678@gmail.com>
Markus Kortlang <hyp3rdino@googlemail.com> <markus.kortlang@lhsystems.com>
Martin Redmond <redmond.martin@gmail.com> <martin@tinychat.com>
Martin Redmond <redmond.martin@gmail.com> <xgithub@redmond5.com>
Mary Anthony <mary.anthony@docker.com> <mary@docker.com>
Mary Anthony <mary.anthony@docker.com> <moxieandmore@gmail.com>
Mary Anthony <mary.anthony@docker.com> moxiegirl <mary@docker.com>
Mateusz Major <apkd@users.noreply.github.com>
Matt Bentley <matt.bentley@docker.com> <mbentley@mbentley.net>
Matt Schurenko <matt.schurenko@gmail.com>
Matt Williams <mattyw@me.com>
Matt Williams <mattyw@me.com> <gh@mattyw.net>
Matthew Heon <mheon@redhat.com> <mheon@mheonlaptop.redhat.com>
Matthew Mosesohn <raytrac3r@gmail.com>
Matthew Mueller <mattmuelle@gmail.com>
Matthias Kühnle <git.nivoc@neverbox.com> <kuehnle@online.de>
Mauricio Garavaglia <mauricio@medallia.com> <mauriciogaravaglia@gmail.com>
Michael Crosby <michael@docker.com> <crosby.michael@gmail.com>
Michael Crosby <michael@docker.com> <crosbymichael@gmail.com>
Michael Crosby <michael@docker.com> <michael@crosbymichael.com>
Michael Hudson-Doyle <michael.hudson@canonical.com> <michael.hudson@linaro.org>
Michael Huettermann <michael@huettermann.net>
Michael Käufl <docker@c.michael-kaeufl.de> <michael-k@users.noreply.github.com>
Michael Spetsiotis <michael_spets@hotmail.com>
Michal Minář <miminar@redhat.com>
Miguel Angel Alvarez Cabrerizo <doncicuto@gmail.com> <30386061+doncicuto@users.noreply.github.com>
Miguel Angel Fernández <elmendalerenda@gmail.com>
Mihai Borobocea <MihaiBorob@gmail.com> <MihaiBorobocea@gmail.com>
Mike Casas <mkcsas0@gmail.com> <mikecasas@users.noreply.github.com>
Mike Goelzer <mike.goelzer@docker.com> <mgoelzer@docker.com>
Milind Chawre <milindchawre@gmail.com>
Misty Stanley-Jones <misty@docker.com> <misty@apache.org>
Mohit Soni <mosoni@ebay.com> <mohitsoni1989@gmail.com>
Moorthy RS <rsmoorthy@gmail.com> <rsmoorthy@users.noreply.github.com>
Moysés Borges <moysesb@gmail.com>
Moysés Borges <moysesb@gmail.com> <moyses.furtado@wplex.com.br>
Nace Oroz <orkica@gmail.com>
Nathan LeClaire <nathan.leclaire@docker.com> <nathan.leclaire@gmail.com>
Nathan LeClaire <nathan.leclaire@docker.com> <nathanleclaire@gmail.com>
Neil Horman <nhorman@tuxdriver.com> <nhorman@hmswarspite.think-freely.org>
Nick Russo <nicholasjamesrusso@gmail.com> <nicholasrusso@icloud.com>
Nicolas Borboën <ponsfrilus@gmail.com> <ponsfrilus@users.noreply.github.com>
Nigel Poulton <nigelpoulton@hotmail.com>
Nik Nyby <nikolas@gnu.org> <nnyby@columbia.edu>
Nolan Darilek <nolan@thewordnerd.info>
O.S. Tezer <ostezer@gmail.com>
O.S. Tezer <ostezer@gmail.com> <ostezer@users.noreply.github.com>
Oh Jinkyun <tintypemolly@gmail.com> <tintypemolly@Ohui-MacBook-Pro.local>
Ouyang Liduo <oyld0210@163.com>
Patrick Stapleton <github@gdi2290.com>
Paul Liljenberg <liljenberg.paul@gmail.com> <letters@paulnotcom.se>
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> <ptikhomirov@parallels.com>
Pawel Konczalski <mail@konczalski.de>
Peter Choi <phkchoi89@gmail.com> <reikani@Peters-MacBook-Pro.local>
Peter Dave Hello <hsu@peterdavehello.org> <PeterDaveHello@users.noreply.github.com>
Peter Jaffe <pjaffe@nevo.com>
Peter Nagy <xificurC@gmail.com> <pnagy@gratex.com>
Peter Waller <p@pwaller.net> <peter@scraperwiki.com>
Phil Estes <estesp@linux.vnet.ibm.com> <estesp@gmail.com>
Philip Alexander Etling <paetling@gmail.com>
Philipp Gillé <philipp.gille@gmail.com> <philippgille@users.noreply.github.com>
Qiang Huang <h.huangqiang@huawei.com>
Qiang Huang <h.huangqiang@huawei.com> <qhuang@10.0.2.15>
Ray Tsang <rayt@google.com> <saturnism@users.noreply.github.com>
Renaud Gaubert <rgaubert@nvidia.com> <renaud.gaubert@gmail.com>
Robert Terhaar <rterhaar@atlanticdynamic.com> <robbyt@users.noreply.github.com>
Roberto G. Hashioka <roberto.hashioka@docker.com> <roberto_hashioka@hotmail.com>
Roberto Muñoz Fernández <robertomf@gmail.com> <roberto.munoz.fernandez.contractor@bbva.com>
Roman Dudin <katrmr@gmail.com> <decadent@users.noreply.github.com>
Ross Boucher <rboucher@gmail.com>
Runshen Zhu <runshen.zhu@gmail.com>
Ryan Stelly <ryan.stelly@live.com>
Sakeven Jiang <jc5930@sina.cn>
Sandeep Bansal <sabansal@microsoft.com>
Sandeep Bansal <sabansal@microsoft.com> <msabansal@microsoft.com>
Sargun Dhillon <sargun@netflix.com> <sargun@sargun.me>
Sean Lee <seanlee@tw.ibm.com> <scaleoutsean@users.noreply.github.com>
Sebastiaan van Stijn <github@gone.nl> <sebastiaan@ws-key-sebas3.dpi1.dpi>
Sebastiaan van Stijn <github@gone.nl> <thaJeztah@users.noreply.github.com>
Shaun Kaasten <shaunk@gmail.com>
Shawn Landden <shawn@churchofgit.com> <shawnlandden@gmail.com>
Shengbo Song <thomassong@tencent.com>
Shengbo Song <thomassong@tencent.com> <mymneo@163.com>
Shih-Yuan Lee <fourdollars@gmail.com>
Shishir Mahajan <shishir.mahajan@redhat.com> <smahajan@redhat.com>
Shukui Yang <yangshukui@huawei.com>
Shuwei Hao <haosw@cn.ibm.com>
Shuwei Hao <haosw@cn.ibm.com> <haoshuwei24@gmail.com>
Sidhartha Mani <sidharthamn@gmail.com>
Sjoerd Langkemper <sjoerd-github@linuxonly.nl> <sjoerd@byte.nl>
Solomon Hykes <solomon@docker.com> <s@docker.com>
Solomon Hykes <solomon@docker.com> <solomon.hykes@dotcloud.com>
Solomon Hykes <solomon@docker.com> <solomon@dotcloud.com>
Soshi Katsuta <soshi.katsuta@gmail.com>
Soshi Katsuta <soshi.katsuta@gmail.com> <katsuta_soshi@cyberagent.co.jp>
Sridhar Ratnakumar <sridharr@activestate.com>
Sridhar Ratnakumar <sridharr@activestate.com> <github@srid.name>
Srini Brahmaroutu <srbrahma@us.ibm.com> <sbrahma@us.ibm.com>
Srinivasan Srivatsan <srinivasan.srivatsan@hpe.com> <srinsriv@users.noreply.github.com>
Stefan Berger <stefanb@linux.vnet.ibm.com>
Stefan Berger <stefanb@linux.vnet.ibm.com> <stefanb@us.ibm.com>
Stefan J. Wernli <swernli@microsoft.com> <swernli@ntdev.microsoft.com>
Stefan S. <tronicum@user.github.com>
Stephen Day <stephen.day@docker.com>
Stephen Day <stephen.day@docker.com> <stevvooe@users.noreply.github.com>
Steve Desmond <steve@vtsv.ca> <stevedesmond-ca@users.noreply.github.com>
Sun Gengze <690388648@qq.com>
Sun Jianbo <wonderflow.sun@gmail.com>
Sun Jianbo <wonderflow.sun@gmail.com> <wonderflow@zju.edu.cn>
Sven Dowideit <SvenDowideit@home.org.au>
Sven Dowideit <SvenDowideit@home.org.au> <sven@t440s.home.gateway>
Sven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@docker.com>
Sven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@fosiki.com>
Sven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@home.org.au>
Sven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@users.noreply.github.com>
Sven Dowideit <SvenDowideit@home.org.au> <¨SvenDowideit@home.org.au¨>
Sylvain Bellemare <sylvain@ascribe.io>
Sylvain Bellemare <sylvain@ascribe.io> <sylvain.bellemare@ezeep.com>
Tangi Colin <tangicolin@gmail.com>
Tejesh Mehta <tejesh.mehta@gmail.com> <tj@init.me>
Thatcher Peskens <thatcher@docker.com>
Thatcher Peskens <thatcher@docker.com> <thatcher@dotcloud.com>
Thatcher Peskens <thatcher@docker.com> <thatcher@gmx.net>
Thomas Gazagnaire <thomas@gazagnaire.org> <thomas@gazagnaire.com>
Thomas Krzero <thomas.kovatchitch@gmail.com>
Thomas Léveil <thomasleveil@gmail.com>
Thomas Léveil <thomasleveil@gmail.com> <thomasleveil@users.noreply.github.com>
Tibor Vass <teabee89@gmail.com> <tibor@docker.com>
Tibor Vass <teabee89@gmail.com> <tiborvass@users.noreply.github.com>
Tim Bart <tim@fewagainstmany.com>
Tim Bosse <taim@bosboot.org> <maztaim@users.noreply.github.com>
Tim Ruffles <oi@truffles.me.uk> <timruffles@googlemail.com>
Tim Terhorst <mynamewastaken+git@gmail.com>
Tim Zju <21651152@zju.edu.cn>
Timothy Hobbs <timothyhobbs@seznam.cz>
Toli Kuznets <toli@docker.com>
Tom Barlow <tomwbarlow@gmail.com>
Tom Sweeney <tsweeney@redhat.com>
Tõnis Tiigi <tonistiigi@gmail.com>
Trishna Guha <trishnaguha17@gmail.com>
Tristan Carel <tristan@cogniteev.com>
Tristan Carel <tristan@cogniteev.com> <tristan.carel@gmail.com>
Umesh Yadav <umesh4257@gmail.com>
Umesh Yadav <umesh4257@gmail.com> <dungeonmaster18@users.noreply.github.com>
Victor Lyuboslavsky <victor@victoreda.com>
Victor Vieux <victor.vieux@docker.com> <dev@vvieux.com>
Victor Vieux <victor.vieux@docker.com> <victor.vieux@dotcloud.com>
Victor Vieux <victor.vieux@docker.com> <victor@docker.com>
Victor Vieux <victor.vieux@docker.com> <victor@dotcloud.com>
Victor Vieux <victor.vieux@docker.com> <victorvieux@gmail.com>
Victor Vieux <victor.vieux@docker.com> <vieux@docker.com>
Viktor Vojnovski <viktor.vojnovski@amadeus.com> <vojnovski@gmail.com>
Vincent Batts <vbatts@redhat.com> <vbatts@hashbangbash.com>
Vincent Bernat <Vincent.Bernat@exoscale.ch> <bernat@luffy.cx>
Vincent Bernat <Vincent.Bernat@exoscale.ch> <vincent@bernat.im>
Vincent Demeester <vincent.demeester@docker.com> <vincent+github@demeester.fr>
Vincent Demeester <vincent.demeester@docker.com> <vincent@demeester.fr>
Vincent Demeester <vincent.demeester@docker.com> <vincent@sbr.pm>
Vishnu Kannan <vishnuk@google.com>
Vladimir Rutsky <altsysrq@gmail.com> <iamironbob@gmail.com>
Walter Stanish <walter@pratyeka.org>
Wang Guoliang <liangcszzu@163.com>
Wang Jie <wangjie5@chinaskycloud.com>
Wang Ping <present.wp@icloud.com>
Wang Xing <hzwangxing@corp.netease.com> <root@localhost>
Wang Yuexiao <wang.yuexiao@zte.com.cn>
Wayne Chang <wayne@neverfear.org>
Wayne Song <wsong@docker.com> <wsong@users.noreply.github.com>
Wei Wu <wuwei4455@gmail.com> cizixs <cizixs@163.com>
Wenjun Tang <tangwj2@lenovo.com> <dodia@163.com>
Wewang Xiaorenfine <wang.xiaoren@zte.com.cn>
Will Weaver <monkey@buildingbananas.com>
Xianglin Gao <xlgao@zju.edu.cn>
Xianlu Bird <xianlubird@gmail.com>
Xiaoyu Zhang <zhang.xiaoyu33@zte.com.cn>
Xuecong Liao <satorulogic@gmail.com>
Yamasaki Masahide <masahide.y@gmail.com>
Yao Zaiyong <yaozaiyong@hotmail.com>
Yassine Tijani <yasstij11@gmail.com>
Yazhong Liu <yorkiefixer@gmail.com>
Yestin Sun <sunyi0804@gmail.com> <yestin.sun@polyera.com>
Yi EungJun <eungjun.yi@navercorp.com> <semtlenori@gmail.com>
Ying Li <ying.li@docker.com>
Ying Li <ying.li@docker.com> <cyli@twistedmatrix.com>
Yong Tang <yong.tang.github@outlook.com> <yongtang@users.noreply.github.com>
Yosef Fertel <yfertel@gmail.com> <frosforever@users.noreply.github.com>
Yu Changchun <yuchangchun1@huawei.com>
Yu Chengxia <yuchengxia@huawei.com>
Yu Peng <yu.peng36@zte.com.cn>
Yu Peng <yu.peng36@zte.com.cn> <yupeng36@zte.com.cn>
Zachary Jaffee <zjaffee@us.ibm.com> <zij@case.edu>
Zachary Jaffee <zjaffee@us.ibm.com> <zjaffee@apache.org>
ZhangHang <stevezhang2014@gmail.com>
Zhenkun Bi <bi.zhenkun@zte.com.cn>
Zhou Hao <zhouhao@cn.fujitsu.com>
Zhu Kunjia <zhu.kunjia@zte.com.cn>
Zou Yu <zouyu7@huawei.com>

638
components/cli/AUTHORS Normal file
View File

@ -0,0 +1,638 @@
# This file lists all individuals having contributed content to the repository.
# For how it is generated, see `scripts/docs/generate-authors.sh`.
Aanand Prasad <aanand.prasad@gmail.com>
Aaron L. Xu <liker.xu@foxmail.com>
Aaron Lehmann <aaron.lehmann@docker.com>
Aaron.L.Xu <likexu@harmonycloud.cn>
Abdur Rehman <abdur_rehman@mentor.com>
Abhinandan Prativadi <abhi@docker.com>
Abin Shahab <ashahab@altiscale.com>
Addam Hardy <addam.hardy@gmail.com>
Adolfo Ochagavía <aochagavia92@gmail.com>
Adrien Duermael <adrien@duermael.com>
Adrien Folie <folie.adrien@gmail.com>
Ahmet Alp Balkan <ahmetb@microsoft.com>
Aidan Feldman <aidan.feldman@gmail.com>
Aidan Hobson Sayers <aidanhs@cantab.net>
AJ Bowen <aj@gandi.net>
Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Akim Demaille <akim.demaille@docker.com>
Alan Thompson <cloojure@gmail.com>
Albert Callarisa <shark234@gmail.com>
Aleksa Sarai <asarai@suse.de>
Alessandro Boch <aboch@tetrationanalytics.com>
Alex Mavrogiannis <alex.mavrogiannis@docker.com>
Alexander Boyd <alex@opengroove.org>
Alexander Larsson <alexl@redhat.com>
Alexander Morozov <lk4d4@docker.com>
Alexandre González <agonzalezro@gmail.com>
Alfred Landrum <alfred.landrum@docker.com>
Alicia Lauerman <alicia@eta.im>
Allen Sun <allensun.shl@alibaba-inc.com>
Alvin Deng <alvin.q.deng@utexas.edu>
Amen Belayneh <amenbelayneh@gmail.com>
Amir Goldstein <amir73il@aquasec.com>
Amit Krishnan <amit.krishnan@oracle.com>
Amit Shukla <amit.shukla@docker.com>
Amy Lindburg <amy.lindburg@docker.com>
Andrea Luzzardi <aluzzardi@gmail.com>
Andreas Köhler <andi5.py@gmx.net>
Andrew France <andrew@avito.co.uk>
Andrew Hsu <andrewhsu@docker.com>
Andrew Macpherson <hopscotch23@gmail.com>
Andrew McDonnell <bugs@andrewmcdonnell.net>
Andrew Po <absourd.noise@gmail.com>
Andrey Petrov <andrey.petrov@shazow.net>
André Martins <aanm90@gmail.com>
Andy Goldstein <agoldste@redhat.com>
Andy Rothfusz <github@developersupport.net>
Anil Madhavapeddy <anil@recoil.org>
Ankush Agarwal <ankushagarwal11@gmail.com>
Anton Polonskiy <anton.polonskiy@gmail.com>
Antonio Murdaca <antonio.murdaca@gmail.com>
Antonis Kalipetis <akalipetis@gmail.com>
Anusha Ragunathan <anusha.ragunathan@docker.com>
Arash Deshmeh <adeshmeh@ca.ibm.com>
Arnaud Porterie <arnaud.porterie@docker.com>
Ashwini Oruganti <ashwini.oruganti@gmail.com>
Azat Khuyiyakhmetov <shadow_uz@mail.ru>
Bardia Keyoumarsi <bkeyouma@ucsc.edu>
Barnaby Gray <barnaby@pickle.me.uk>
Bastiaan Bakker <bbakker@xebia.com>
BastianHofmann <bastianhofmann@me.com>
Ben Bonnefoy <frenchben@docker.com>
Ben Firshman <ben@firshman.co.uk>
Benjamin Boudreau <boudreau.benjamin@gmail.com>
Bhumika Bayani <bhumikabayani@gmail.com>
Bill Wang <ozbillwang@gmail.com>
Bin Liu <liubin0329@gmail.com>
Bingshen Wang <bingshen.wbs@alibaba-inc.com>
Boaz Shuster <ripcurld.github@gmail.com>
Boris Pruessmann <boris@pruessmann.org>
Bradley Cicenas <bradley.cicenas@gmail.com>
Brandon Philips <brandon.philips@coreos.com>
Brent Salisbury <brent.salisbury@docker.com>
Bret Fisher <bret@bretfisher.com>
Brian (bex) Exelbierd <bexelbie@redhat.com>
Brian Goff <cpuguy83@gmail.com>
Bryan Bess <squarejaw@bsbess.com>
Bryan Boreham <bjboreham@gmail.com>
Bryan Murphy <bmurphy1976@gmail.com>
bryfry <bryon.fryer@gmail.com>
Cameron Spear <cameronspear@gmail.com>
Cao Weiwei <cao.weiwei30@zte.com.cn>
Carlo Mion <mion00@gmail.com>
Carlos Alexandro Becker <caarlos0@gmail.com>
Ce Gao <ce.gao@outlook.com>
Cedric Davies <cedricda@microsoft.com>
Cezar Sa Espinola <cezarsa@gmail.com>
Chao Wang <wangchao.fnst@cn.fujitsu.com>
Charles Chan <charleswhchan@users.noreply.github.com>
Charles Law <claw@conduce.com>
Charles Smith <charles.smith@docker.com>
Charlie Drage <charlie@charliedrage.com>
ChaYoung You <yousbe@gmail.com>
Chen Chuanliang <chen.chuanliang@zte.com.cn>
Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Chen Mingjie <chenmingjie0828@163.com>
Chen Qiu <cheney-90@hotmail.com>
Chris Gavin <chris@chrisgavin.me>
Chris Gibson <chris@chrisg.io>
Chris McKinnel <chrismckinnel@gmail.com>
Chris Snow <chsnow123@gmail.com>
Chris Weyl <cweyl@alumni.drew.edu>
Christian Persson <saser@live.se>
Christian Stefanescu <st.chris@gmail.com>
Christophe Robin <crobin@nekoo.com>
Christophe Vidal <kriss@krizalys.com>
Christopher Biscardi <biscarch@sketcht.com>
Christopher Jones <tophj@linux.vnet.ibm.com>
Christy Perez <christy@linux.vnet.ibm.com>
Chun Chen <ramichen@tencent.com>
Clinton Kitson <clintonskitson@gmail.com>
Coenraad Loubser <coenraad@wish.org.za>
Colin Hebert <hebert.colin@gmail.com>
Collin Guarino <collin.guarino@gmail.com>
Colm Hally <colmhally@gmail.com>
Corey Farrell <git@cfware.com>
Cristian Staretu <cristian.staretu@gmail.com>
Daehyeok Mun <daehyeok@gmail.com>
Dafydd Crosby <dtcrsby@gmail.com>
dalanlan <dalanlan925@gmail.com>
Damien Nadé <github@livna.org>
Dan Cotora <dan@bluevision.ro>
Daniel Dao <dqminh@cloudflare.com>
Daniel Farrell <dfarrell@redhat.com>
Daniel Gasienica <daniel@gasienica.ch>
Daniel Goosen <daniel.goosen@surveysampling.com>
Daniel Hiltgen <daniel.hiltgen@docker.com>
Daniel J Walsh <dwalsh@redhat.com>
Daniel Nephin <dnephin@docker.com>
Daniel Norberg <dano@spotify.com>
Daniel Watkins <daniel@daniel-watkins.co.uk>
Daniel Zhang <jmzwcn@gmail.com>
Danny Berger <dpb587@gmail.com>
Darren Shepherd <darren.s.shepherd@gmail.com>
Darren Stahl <darst@microsoft.com>
Dattatraya Kumbhar <dattatraya.kumbhar@gslab.com>
Dave Goodchild <buddhamagnet@gmail.com>
Dave Henderson <dhenderson@gmail.com>
Dave Tucker <dt@docker.com>
David Calavera <david.calavera@gmail.com>
David Cramer <davcrame@cisco.com>
David Dooling <dooling@gmail.com>
David Gageot <david@gageot.net>
David Lechner <david@lechnology.com>
David Sheets <dsheets@docker.com>
David Williamson <david.williamson@docker.com>
David Xia <dxia@spotify.com>
David Young <yangboh@cn.ibm.com>
Deng Guangxing <dengguangxing@huawei.com>
Denis Defreyne <denis@soundcloud.com>
Denis Gladkikh <denis@gladkikh.email>
Denis Ollier <larchunix@users.noreply.github.com>
Dennis Docter <dennis@d23.nl>
Derek McGowan <derek@mcgstyle.net>
Deshi Xiao <dxiao@redhat.com>
Dharmit Shah <shahdharmit@gmail.com>
Dhawal Yogesh Bhanushali <dbhanushali@vmware.com>
Dieter Reuter <dieter.reuter@me.com>
Dima Stopel <dima@twistlock.com>
Dimitry Andric <d.andric@activevideo.com>
Ding Fei <dingfei@stars.org.cn>
Diogo Monica <diogo@docker.com>
Dmitry Gusev <dmitry.gusev@gmail.com>
Dmitry Smirnov <onlyjob@member.fsf.org>
Dmitry V. Krivenok <krivenok.dmitry@gmail.com>
Don Kjer <don.kjer@gmail.com>
Dong Chen <dongluo.chen@docker.com>
Doug Davis <dug@us.ibm.com>
Drew Erny <drew.erny@docker.com>
Ed Costello <epc@epcostello.com>
Eli Uriegas <eli.uriegas@docker.com>
Eli Uriegas <seemethere101@gmail.com>
Elias Faxö <elias.faxo@tre.se>
Eric G. Noriega <enoriega@vizuri.com>
Eric Rosenberg <ehaydenr@gmail.com>
Eric Sage <eric.david.sage@gmail.com>
Eric-Olivier Lamey <eo@lamey.me>
Erica Windisch <erica@windisch.us>
Erik Hollensbe <github@hollensbe.org>
Erik St. Martin <alakriti@gmail.com>
Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Eugene Yakubovich <eugene.yakubovich@coreos.com>
Evan Allrich <evan@unguku.com>
Evan Hazlett <ejhazlett@gmail.com>
Evan Krall <krall@yelp.com>
Evelyn Xu <evelynhsu21@gmail.com>
Everett Toews <everett.toews@rackspace.com>
Fabio Falci <fabiofalci@gmail.com>
Fabrizio Soppelsa <fsoppelsa@mirantis.com>
Felix Hupfeld <felix@quobyte.com>
Felix Rabe <felix@rabe.io>
Flavio Crisciani <flavio.crisciani@docker.com>
Florian Klein <florian.klein@free.fr>
Foysal Iqbal <foysal.iqbal.fb@gmail.com>
Fred Lifton <fred.lifton@docker.com>
Frederick F. Kautz IV <fkautz@redhat.com>
Frederik Nordahl Jul Sabroe <frederikns@gmail.com>
Frieder Bluemle <frieder.bluemle@gmail.com>
Gabriel Nicolas Avellaneda <avellaneda.gabriel@gmail.com>
Gaetan de Villele <gdevillele@gmail.com>
Gang Qiao <qiaohai8866@gmail.com>
Gary Schaetz <gary@schaetzkc.com>
Genki Takiuchi <genki@s21g.com>
George MacRorie <gmacr31@gmail.com>
George Xie <georgexsh@gmail.com>
Gianluca Borello <g.borello@gmail.com>
Gildas Cuisinier <gildas.cuisinier@gcuisinier.net>
Gou Rao <gou@portworx.com>
Grant Reaber <grant.reaber@gmail.com>
Greg Pflaum <gpflaum@users.noreply.github.com>
Guilhem Lettron <guilhem+github@lettron.fr>
Guillaume J. Charmes <guillaume.charmes@docker.com>
gwx296173 <gaojing3@huawei.com>
Günther Jungbluth <gunther@gameslabs.net>
Hakan Özler <hakan.ozler@kodcu.com>
Hao Zhang <21521210@zju.edu.cn>
Harald Albers <github@albersweb.de>
Harold Cooper <hrldcpr@gmail.com>
Harry Zhang <harryz@hyper.sh>
He Simei <hesimei@zju.edu.cn>
Helen Xie <chenjg@harmonycloud.cn>
Henning Sprang <henning.sprang@gmail.com>
Hernan Garcia <hernandanielg@gmail.com>
Hongbin Lu <hongbin034@gmail.com>
Hu Keping <hukeping@huawei.com>
Huayi Zhang <irachex@gmail.com>
huqun <huqun@zju.edu.cn>
Huu Nguyen <huu@prismskylabs.com>
Hyzhou Zhy <hyzhou.zhy@alibaba-inc.com>
Ian Campbell <ian.campbell@docker.com>
Ian Philpot <ian.philpot@microsoft.com>
Ignacio Capurro <icapurrofagian@gmail.com>
Ilya Dmitrichenko <errordeveloper@gmail.com>
Ilya Khlopotov <ilya.khlopotov@gmail.com>
Ilya Sotkov <ilya@sotkov.com>
Isabel Jimenez <contact.isabeljimenez@gmail.com>
Ivan Grcic <igrcic@gmail.com>
Ivan Markin <sw@nogoegst.net>
Jacob Atzen <jacob@jacobatzen.dk>
Jacob Tomlinson <jacob@tom.linson.uk>
Jaivish Kothari <janonymous.codevulture@gmail.com>
Jake Sanders <jsand@google.com>
James Nesbitt <james.nesbitt@wunderkraut.com>
James Turnbull <james@lovedthanlost.net>
Jamie Hannaford <jamie@limetree.org>
Jan Koprowski <jan.koprowski@gmail.com>
Jan Pazdziora <jpazdziora@redhat.com>
Jan-Jaap Driessen <janjaapdriessen@gmail.com>
Jana Radhakrishnan <mrjana@docker.com>
Jared Hocutt <jaredh@netapp.com>
Jasmine Hegman <jasmine@jhegman.com>
Jason Heiss <jheiss@aput.net>
Jason Plum <jplum@devonit.com>
Jay Kamat <github@jgkamat.33mail.com>
Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Jean-Pierre Huynh <jp@moogsoft.com>
Jeff Lindsay <progrium@gmail.com>
Jeff Nickoloff <jeff.nickoloff@gmail.com>
Jeff Silberman <jsilberm@gmail.com>
Jeremy Chambers <jeremy@thehipbot.com>
Jeremy Unruh <jeremybunruh@gmail.com>
Jeremy Yallop <yallop@docker.com>
Jeroen Franse <jeroenfranse@gmail.com>
Jesse Adametz <jesseadametz@gmail.com>
Jessica Frazelle <jessfraz@google.com>
Jezeniel Zapanta <jpzapanta22@gmail.com>
Jian Zhang <zhangjian.fnst@cn.fujitsu.com>
Jie Luo <luo612@zju.edu.cn>
Jilles Oldenbeuving <ojilles@gmail.com>
Jim Galasyn <jim.galasyn@docker.com>
Jimmy Leger <jimmy.leger@gmail.com>
Jimmy Song <rootsongjc@gmail.com>
jimmyxian <jimmyxian2004@yahoo.com.cn>
Joao Fernandes <joao.fernandes@docker.com>
Joe Doliner <jdoliner@pachyderm.io>
Joe Gordon <joe.gordon0@gmail.com>
Joel Handwell <joelhandwell@gmail.com>
Joey Geiger <jgeiger@gmail.com>
Joffrey F <joffrey@docker.com>
Johan Euphrosine <proppy@google.com>
Johannes 'fish' Ziemke <github@freigeist.org>
John Feminella <jxf@jxf.me>
John Harris <john@johnharris.io>
John Howard (VM) <John.Howard@microsoft.com>
John Laswell <john.n.laswell@gmail.com>
John Maguire <jmaguire@duosecurity.com>
John Mulhausen <john@docker.com>
John Starks <jostarks@microsoft.com>
John Stephens <johnstep@docker.com>
John Tims <john.k.tims@gmail.com>
John V. Martinez <jvmatl@gmail.com>
John Willis <john.willis@docker.com>
Jonathan Boulle <jonathanboulle@gmail.com>
Jonathan Lee <jonjohn1232009@gmail.com>
Jonathan Lomas <jonathan@floatinglomas.ca>
Jonathan McCrohan <jmccrohan@gmail.com>
Jonh Wendell <jonh.wendell@redhat.com>
Jordan Jennings <jjn2009@gmail.com>
Joseph Kern <jkern@semafour.net>
Josh Bodah <jb3689@yahoo.com>
Josh Chorlton <jchorlton@gmail.com>
Josh Hawn <josh.hawn@docker.com>
Josh Horwitz <horwitz@addthis.com>
Josh Soref <jsoref@gmail.com>
Julien Barbier <write0@gmail.com>
Julien Kassar <github@kassisol.com>
Julien Maitrehenry <julien.maitrehenry@me.com>
Justas Brazauskas <brazauskasjustas@gmail.com>
Justin Cormack <justin.cormack@docker.com>
Justin Simonelis <justin.p.simonelis@gmail.com>
Jyrki Puttonen <jyrkiput@gmail.com>
Jérôme Petazzoni <jerome.petazzoni@docker.com>
Jörg Thalheim <joerg@higgsboson.tk>
Kai Blin <kai@samba.org>
Kai Qiang Wu (Kennan) <wkq5325@gmail.com>
Kara Alexandra <kalexandra@us.ibm.com>
Kareem Khazem <karkhaz@karkhaz.com>
Karthik Nayak <Karthik.188@gmail.com>
Kat Samperi <kat.samperi@gmail.com>
Katie McLaughlin <katie@glasnt.com>
Ke Xu <leonhartx.k@gmail.com>
Kei Ohmura <ohmura.kei@gmail.com>
Keith Hudgins <greenman@greenman.org>
Ken Cochrane <kencochrane@gmail.com>
Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
Kenfe-Mickaël Laventure <mickael.laventure@gmail.com>
Kevin Burke <kev@inburke.com>
Kevin Feyrer <kevin.feyrer@btinternet.com>
Kevin Kern <kaiwentan@harmonycloud.cn>
Kevin Meredith <kevin.m.meredith@gmail.com>
Kevin Richardson <kevin@kevinrichardson.co>
khaled souf <khaled.souf@gmail.com>
Kim Eik <kim@heldig.org>
Kir Kolyshkin <kolyshkin@gmail.com>
Kotaro Yoshimatsu <kotaro.yoshimatsu@gmail.com>
Krasi Georgiev <krasi@vip-consult.solutions>
Kris-Mikael Krister <krismikael@protonmail.com>
Kun Zhang <zkazure@gmail.com>
Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Kyle Spiers <kyle@spiers.me>
Lachlan Cooper <lachlancooper@gmail.com>
Lai Jiangshan <jiangshanlai@gmail.com>
Lars Kellogg-Stedman <lars@redhat.com>
Laura Frank <ljfrank@gmail.com>
Laurent Erignoux <lerignoux@gmail.com>
Lei Jitang <leijitang@huawei.com>
Lennie <github@consolejunkie.net>
Leo Gallucci <elgalu3@gmail.com>
Lewis Daly <lewisdaly@me.com>
Li Yi <denverdino@gmail.com>
Li Yi <weiyuan.yl@alibaba-inc.com>
Liang-Chi Hsieh <viirya@gmail.com>
Lily Guo <lily.guo@docker.com>
Lin Lu <doraalin@163.com>
Linus Heckemann <lheckemann@twig-world.com>
Liping Xue <lipingxue@gmail.com>
Liron Levin <liron@twistlock.com>
liwenqi <vikilwq@zju.edu.cn>
lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Lloyd Dewolf <foolswisdom@gmail.com>
Lorenzo Fontana <lo@linux.com>
Louis Opter <kalessin@kalessin.fr>
Luca Favatella <luca.favatella@erlang-solutions.com>
Luca Marturana <lucamarturana@gmail.com>
Lucas Chan <lucas-github@lucaschan.com>
Luka Hartwig <mail@lukahartwig.de>
Lukasz Zajaczkowski <Lukasz.Zajaczkowski@ts.fujitsu.com>
Lénaïc Huard <lhuard@amadeus.com>
Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Mabin <bin.ma@huawei.com>
Madhav Puri <madhav.puri@gmail.com>
Madhu Venugopal <madhu@socketplane.io>
Malte Janduda <mail@janduda.net>
Manjunath A Kumatagi <mkumatag@in.ibm.com>
Mansi Nahar <mmn4185@rit.edu>
mapk0y <mapk0y@gmail.com>
Marc Bihlmaier <marc.bihlmaier@reddoxx.com>
Marco Mariani <marco.mariani@alterway.fr>
Marcus Martins <marcus@docker.com>
Marianna Tessel <mtesselh@gmail.com>
Marius Sturm <marius@graylog.com>
Mark Oates <fl0yd@me.com>
Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
Mary Anthony <mary.anthony@docker.com>
Mason Malone <mason.malone@gmail.com>
Mateusz Major <apkd@users.noreply.github.com>
Matt Gucci <matt9ucci@gmail.com>
Matt Robenolt <matt@ydekproductions.com>
Matthew Heon <mheon@redhat.com>
Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
Max Shytikov <mshytikov@gmail.com>
Maxime Petazzoni <max@signalfuse.com>
Mei ChunTao <mei.chuntao@zte.com.cn>
Micah Zoltu <micah@newrelic.com>
Michael A. Smith <michael@smith-li.com>
Michael Bridgen <mikeb@squaremobius.net>
Michael Crosby <michael@docker.com>
Michael Friis <friism@gmail.com>
Michael Irwin <mikesir87@gmail.com>
Michael Käufl <docker@c.michael-kaeufl.de>
Michael Prokop <github@michael-prokop.at>
Michael Scharf <github@scharf.gr>
Michael Spetsiotis <michael_spets@hotmail.com>
Michael Steinert <mike.steinert@gmail.com>
Michael West <mwest@mdsol.com>
Michal Minář <miminar@redhat.com>
Michał Czeraszkiewicz <czerasz@gmail.com>
Miguel Angel Alvarez Cabrerizo <doncicuto@gmail.com>
Mihai Borobocea <MihaiBorob@gmail.com>
Mihuleacc Sergiu <mihuleac.sergiu@gmail.com>
Mike Brown <brownwm@us.ibm.com>
Mike Casas <mkcsas0@gmail.com>
Mike Danese <mikedanese@google.com>
Mike Dillon <mike@embody.org>
Mike Goelzer <mike.goelzer@docker.com>
Mike MacCana <mike.maccana@gmail.com>
mikelinjie <294893458@qq.com>
Mikhail Vasin <vasin@cloud-tv.ru>
Milind Chawre <milindchawre@gmail.com>
Misty Stanley-Jones <misty@docker.com>
Mohammad Banikazemi <mb@us.ibm.com>
Mohammed Aaqib Ansari <maaquib@gmail.com>
Moorthy RS <rsmoorthy@gmail.com>
Morgan Bauer <mbauer@us.ibm.com>
Moysés Borges <moysesb@gmail.com>
Mrunal Patel <mrunalp@gmail.com>
muicoder <muicoder@gmail.com>
Muthukumar R <muthur@gmail.com>
Máximo Cuadros <mcuadros@gmail.com>
Nace Oroz <orkica@gmail.com>
Nahum Shalman <nshalman@omniti.com>
Nalin Dahyabhai <nalin@redhat.com>
Natalie Parker <nparker@omnifone.com>
Nate Brennand <nate.brennand@clever.com>
Nathan Hsieh <hsieh.nathan@gmail.com>
Nathan LeClaire <nathan.leclaire@docker.com>
Nathan McCauley <nathan.mccauley@docker.com>
Neil Peterson <neilpeterson@outlook.com>
Nicola Kabar <nicolaka@gmail.com>
Nicolas Borboën <ponsfrilus@gmail.com>
Nicolas De Loof <nicolas.deloof@gmail.com>
Nikhil Chawla <chawlanikhil24@gmail.com>
Nikolas Garofil <nikolas.garofil@uantwerpen.be>
Nikolay Milovanov <nmil@itransformers.net>
Nishant Totla <nishanttotla@gmail.com>
NIWA Hideyuki <niwa.niwa@nifty.ne.jp>
Noah Treuhaft <noah.treuhaft@docker.com>
O.S. Tezer <ostezer@gmail.com>
ohmystack <jun.jiang02@ele.me>
Olle Jonsson <olle.jonsson@gmail.com>
Otto Kekäläinen <otto@seravo.fi>
Ovidio Mallo <ovidio.mallo@gmail.com>
Pascal Borreli <pascal@borreli.com>
Patrick Böänziger <patrick.baenziger@bsi-software.com>
Patrick Hemmer <patrick.hemmer@gmail.com>
Patrick Lang <plang@microsoft.com>
Paul <paul9869@gmail.com>
Paul Kehrer <paul.l.kehrer@gmail.com>
Paul Lietar <paul@lietar.net>
Paul Weaver <pauweave@cisco.com>
Pavel Pospisil <pospispa@gmail.com>
Paweł Szczekutowicz <pszczekutowicz@gmail.com>
Peeyush Gupta <gpeeyush@linux.vnet.ibm.com>
Peter Edge <peter.edge@gmail.com>
Peter Jaffe <pjaffe@nevo.com>
Peter Nagy <xificurC@gmail.com>
Peter Salvatore <peter@psftw.com>
Peter Waller <p@pwaller.net>
Phil Estes <estesp@linux.vnet.ibm.com>
Philip Alexander Etling <paetling@gmail.com>
Philipp Gillé <philipp.gille@gmail.com>
pidster <pid@pidster.com>
pixelistik <pixelistik@users.noreply.github.com>
Pratik Karki <prertik@outlook.com>
Prayag Verma <prayag.verma@gmail.com>
Pure White <daniel48@126.com>
Qiang Huang <h.huangqiang@huawei.com>
Qinglan Peng <qinglanpeng@zju.edu.cn>
qudongfang <qudongfang@gmail.com>
Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Ray Tsang <rayt@google.com>
Reficul <xuzhenglun@gmail.com>
Remy Suen <remy.suen@gmail.com>
Renaud Gaubert <rgaubert@nvidia.com>
Ricardo N Feliciano <FelicianoTech@gmail.com>
Rich Moyse <rich@moyse.us>
Richard Mathie <richard.mathie@amey.co.uk>
Richard Scothern <richard.scothern@gmail.com>
Rick Wieman <git@rickw.nl>
Ritesh H Shukla <sritesh@vmware.com>
Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Robert Wallis <smilingrob@gmail.com>
Robin Naundorf <r.naundorf@fh-muenster.de>
Robin Speekenbrink <robin@kingsquare.nl>
Rodolfo Ortiz <rodolfo.ortiz@definityfirst.com>
Rogelio Canedo <rcanedo@mappy.priv>
Roland Kammerer <roland.kammerer@linbit.com>
Roman Dudin <katrmr@gmail.com>
Rory Hunter <roryhunter2@gmail.com>
Ross Boucher <rboucher@gmail.com>
Rubens Figueiredo <r.figueiredo.52@gmail.com>
Ryan Belgrave <rmb1993@gmail.com>
Ryan Detzel <ryan.detzel@gmail.com>
Ryan Stelly <ryan.stelly@live.com>
Sainath Grandhi <sainath.grandhi@intel.com>
Sakeven Jiang <jc5930@sina.cn>
Sally O'Malley <somalley@redhat.com>
Sam Neirinck <sam@samneirinck.com>
Sambuddha Basu <sambuddhabasu1@gmail.com>
Samuel Karp <skarp@amazon.com>
Santhosh Manohar <santhosh@docker.com>
Scott Collier <emailscottcollier@gmail.com>
Sean Christopherson <sean.j.christopherson@intel.com>
Sean Rodman <srodman7689@gmail.com>
Sebastiaan van Stijn <github@gone.nl>
Sergey Tryuber <Sergeant007@users.noreply.github.com>
Serhat Gülçiçek <serhat25@gmail.com>
Sevki Hasirci <s@sevki.org>
Shaun Kaasten <shaunk@gmail.com>
Sheng Yang <sheng@yasker.org>
Shijiang Wei <mountkin@gmail.com>
Shishir Mahajan <shishir.mahajan@redhat.com>
Shoubhik Bose <sbose78@gmail.com>
Shukui Yang <yangshukui@huawei.com>
Sian Lerk Lau <kiawin@gmail.com>
Sidhartha Mani <sidharthamn@gmail.com>
sidharthamani <sid@rancher.com>
Silvin Lubecki <silvin.lubecki@docker.com>
Simei He <hesimei@zju.edu.cn>
Simon Ferquel <simon.ferquel@docker.com>
Sindhu S <sindhus@live.in>
Slava Semushin <semushin@redhat.com>
Solomon Hykes <solomon@docker.com>
Song Gao <song@gao.io>
Spencer Brown <spencer@spencerbrown.org>
squeegels <1674195+squeegels@users.noreply.github.com>
Srini Brahmaroutu <srbrahma@us.ibm.com>
Stefan S. <tronicum@user.github.com>
Stefan Scherer <scherer_stefan@icloud.com>
Stefan Weil <sw@weilnetz.de>
Stephen Day <stephen.day@docker.com>
Stephen Rust <srust@blockbridge.com>
Steve Durrheimer <s.durrheimer@gmail.com>
Steven Burgess <steven.a.burgess@hotmail.com>
Subhajit Ghosh <isubuz.g@gmail.com>
Sun Jianbo <wonderflow.sun@gmail.com>
Sungwon Han <sungwon.han@navercorp.com>
Sven Dowideit <SvenDowideit@home.org.au>
Sylvain Baubeau <sbaubeau@redhat.com>
Sébastien HOUZÉ <cto@verylastroom.com>
T K Sourabh <sourabhtk37@gmail.com>
TAGOMORI Satoshi <tagomoris@gmail.com>
Taylor Jones <monitorjbl@gmail.com>
Thatcher Peskens <thatcher@docker.com>
Thomas Gazagnaire <thomas@gazagnaire.org>
Thomas Krzero <thomas.kovatchitch@gmail.com>
Thomas Leonard <thomas.leonard@docker.com>
Thomas Léveil <thomasleveil@gmail.com>
Thomas Riccardi <riccardi@systran.fr>
Thomas Swift <tgs242@gmail.com>
Tianon Gravi <admwiggin@gmail.com>
Tianyi Wang <capkurmagati@gmail.com>
Tibor Vass <teabee89@gmail.com>
Tim Dettrick <t.dettrick@uq.edu.au>
Tim Hockin <thockin@google.com>
Tim Smith <timbot@google.com>
Tim Waugh <twaugh@redhat.com>
Tim Wraight <tim.wraight@tangentlabs.co.uk>
timfeirg <kkcocogogo@gmail.com>
Timothy Hobbs <timothyhobbs@seznam.cz>
Tobias Bradtke <webwurst@gmail.com>
Tobias Gesellchen <tobias@gesellix.de>
Todd Whiteman <todd.whiteman@joyent.com>
Tom Denham <tom@tomdee.co.uk>
Tom Fotherby <tom+github@peopleperhour.com>
Tom X. Tobin <tomxtobin@tomxtobin.com>
Tomas Tomecek <ttomecek@redhat.com>
Tomasz Kopczynski <tomek@kopczynski.net.pl>
Tomáš Hrčka <thrcka@redhat.com>
Tony Abboud <tdabboud@hotmail.com>
Tõnis Tiigi <tonistiigi@gmail.com>
Trapier Marshall <trapier.marshall@docker.com>
Travis Cline <travis.cline@gmail.com>
Tristan Carel <tristan@cogniteev.com>
Tycho Andersen <tycho@docker.com>
Tycho Andersen <tycho@tycho.ws>
uhayate <uhayate.gong@daocloud.io>
Umesh Yadav <umesh4257@gmail.com>
Valentin Lorentz <progval+git@progval.net>
Veres Lajos <vlajos@gmail.com>
Victor Vieux <victor.vieux@docker.com>
Victoria Bialas <victoria.bialas@docker.com>
Viktor Stanchev <me@viktorstanchev.com>
Vincent Batts <vbatts@redhat.com>
Vincent Bernat <Vincent.Bernat@exoscale.ch>
Vincent Demeester <vincent.demeester@docker.com>
Vincent Woo <me@vincentwoo.com>
Vishnu Kannan <vishnuk@google.com>
Vivek Goyal <vgoyal@redhat.com>
Wang Jie <wangjie5@chinaskycloud.com>
Wang Long <long.wanglong@huawei.com>
Wang Ping <present.wp@icloud.com>
Wang Xing <hzwangxing@corp.netease.com>
Wang Yuexiao <wang.yuexiao@zte.com.cn>
Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Wayne Song <wsong@docker.com>
Wen Cheng Ma <wenchma@cn.ibm.com>
Wenzhi Liang <wenzhi.liang@gmail.com>
Wes Morgan <cap10morgan@gmail.com>
Wewang Xiaorenfine <wang.xiaoren@zte.com.cn>
William Henry <whenry@redhat.com>
Xianglin Gao <xlgao@zju.edu.cn>
Xinbo Weng <xihuanbo_0521@zju.edu.cn>
Xuecong Liao <satorulogic@gmail.com>
Yan Feng <yanfeng2@huawei.com>
Yanqiang Miao <miao.yanqiang@zte.com.cn>
Yassine Tijani <yasstij11@gmail.com>
Yi EungJun <eungjun.yi@navercorp.com>
Ying Li <ying.li@docker.com>
Yong Tang <yong.tang.github@outlook.com>
Yosef Fertel <yfertel@gmail.com>
Yu Peng <yu.peng36@zte.com.cn>
Yuan Sun <sunyuan3@huawei.com>
Yunxiang Huang <hyxqshk@vip.qq.com>
zebrilee <zebrilee@gmail.com>
Zhang Kun <zkazure@gmail.com>
Zhang Wei <zhangwei555@huawei.com>
Zhang Wentao <zhangwentao234@huawei.com>
ZhangHang <stevezhang2014@gmail.com>
zhenghenghuo <zhenghenghuo@zju.edu.cn>
Zhou Hao <zhouhao@cn.fujitsu.com>
Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Álex González <agonzalezro@gmail.com>
Álvaro Lázaro <alvaro.lazaro.g@gmail.com>
Átila Camurça Alves <camurca.home@gmail.com>
徐俊杰 <paco.xu@daocloud.io>

View File

@ -1,6 +1,6 @@
# Docker maintainers file
#
# This file describes who runs the docker/docker project and how.
# This file describes who runs the docker/cli project and how.
# This is a living document - if you see something out of date or missing, speak up!
#
# It is structured to be consumable by both humans and programs.
@ -21,22 +21,12 @@
# a subsystem, they are responsible for doing so and holding the
# subsystem maintainers accountable. If ownership is unclear, they are the de facto owners.
# For each release (including minor releases), a "release captain" is assigned from the
# pool of core maintainers. Rotation is encouraged across all maintainers, to ensure
# the release process is clear and up-to-date.
people = [
"aaronlehmann",
"aluzzardi",
"anusha",
"albers",
"cpuguy83",
"crosbymichael",
"dnephin",
"ehazlett",
"johnstep",
"justincormack",
"mavenugo",
"mlaventure",
"stevvooe",
"tibor",
"tonistiigi",
@ -66,7 +56,6 @@
# - close an issue or pull request when it's inappropriate or off-topic
people = [
"ehazlett",
"programmerq",
"thajeztah"
]
@ -84,41 +73,21 @@
Email = "aaron.lehmann@docker.com"
GitHub = "aaronlehmann"
[people.aluzzardi]
Name = "Andrea Luzzardi"
Email = "al@docker.com"
GitHub = "aluzzardi"
[people.anusha]
Name = "Anusha Ragunathan"
Email = "anusha@docker.com"
GitHub = "anusha-ragunathan"
[people.albers]
Name = "Harald Albers"
Email = "github@albersweb.de"
GitHub = "albers"
[people.cpuguy83]
Name = "Brian Goff"
Email = "cpuguy83@gmail.com"
Github = "cpuguy83"
[people.crosbymichael]
Name = "Michael Crosby"
Email = "crosbymichael@gmail.com"
GitHub = "crosbymichael"
GitHub = "cpuguy83"
[people.dnephin]
Name = "Daniel Nephin"
Email = "dnephin@gmail.com"
GitHub = "dnephin"
[people.ehazlett]
Name = "Evan Hazlett"
Email = "ejhazlett@gmail.com"
GitHub = "ehazlett"
[people.johnstep]
Name = "John Stephens"
Email = "johnstep@docker.com"
GitHub = "johnstep"
[people.justincormack]
Name = "Justin Cormack"
Email = "justin.cormack@docker.com"
@ -127,17 +96,12 @@
[people.misty]
Name = "Misty Stanley-Jones"
Email = "misty@docker.com"
GitHub = "mstanleyjones"
GitHub = "mistyhacks"
[people.mlaventure]
Name = "Kenfe-Mickaël Laventure"
Email = "mickael.laventure@docker.com"
GitHub = "mlaventure"
[people.shykes]
Name = "Solomon Hykes"
Email = "solomon@docker.com"
GitHub = "shykes"
[people.programmerq]
Name = "Jeff Anderson"
Email = "jeff@docker.com"
GitHub = "programmerq"
[people.stevvooe]
Name = "Stephen Day"

View File

@ -34,6 +34,14 @@ binary: ## build executable for Linux
cross: ## build executable for macOS and Windows
./scripts/build/cross
.PHONY: binary-windows
binary-windows: ## build executable for Windows
./scripts/build/windows
.PHONY: binary-osx
binary-osx: ## build executable for macOS
./scripts/build/osx
.PHONY: dynbinary
dynbinary: ## build dynamically linked binary
./scripts/build/dynbinary
@ -43,9 +51,14 @@ watch: ## monitor file changes and run go test
./scripts/test/watch
vendor: vendor.conf ## check that vendor matches vendor.conf
vndr 2> /dev/null
rm -rf vendor
bash -c 'vndr |& grep -v -i clone'
scripts/validate/check-git-diff vendor
.PHONY: authors
authors: ## generate AUTHORS file from git history
scripts/docs/generate-authors.sh
.PHONY: manpages
manpages: ## generate man pages from go source and markdown
scripts/docs/generate-man.sh

View File

@ -1,4 +1,4 @@
[![build status](https://circleci.com/gh/docker/cli.svg?style=shield)](https://circleci.com/gh/docker/cli/tree/master)
[![build status](https://circleci.com/gh/docker/cli.svg?style=shield)](https://circleci.com/gh/docker/cli/tree/master) [![Build Status](https://jenkins.dockerproject.org/job/docker/job/cli/job/master/badge/icon)](https://jenkins.dockerproject.org/job/docker/job/cli/job/master/)
docker/cli
==========

View File

@ -1 +1 @@
17.08.0-dev
18.03.0-ce-rc3

View File

@ -17,6 +17,7 @@ func SetupRootCommand(rootCmd *cobra.Command) {
cobra.AddTemplateFunc("operationSubCommands", operationSubCommands)
cobra.AddTemplateFunc("managementSubCommands", managementSubCommands)
cobra.AddTemplateFunc("wrappedFlagUsages", wrappedFlagUsages)
cobra.AddTemplateFunc("useLine", UseLine)
rootCmd.SetUsageTemplate(usageTemplate)
rootCmd.SetHelpTemplate(helpTemplate)
@ -25,6 +26,7 @@ func SetupRootCommand(rootCmd *cobra.Command) {
rootCmd.PersistentFlags().BoolP("help", "h", false, "Print usage")
rootCmd.PersistentFlags().MarkShorthandDeprecated("help", "please use --help")
rootCmd.PersistentFlags().Lookup("help").Hidden = true
}
// FlagErrorFunc prints an error message which matches the format of the
@ -97,9 +99,19 @@ func managementSubCommands(cmd *cobra.Command) []*cobra.Command {
return cmds
}
// UseLine returns the usage line for a command. This implementation is different
// from the default Command.UseLine in that it does not add a `[flags]` to the
// end of the line.
func UseLine(cmd *cobra.Command) string {
if cmd.HasParent() {
return cmd.Parent().CommandPath() + " " + cmd.Use
}
return cmd.Use
}
var usageTemplate = `Usage:
{{- if not .HasSubCommands}} {{.UseLine}}{{end}}
{{- if not .HasSubCommands}} {{ useLine . }}{{end}}
{{- if .HasSubCommands}} {{ .CommandPath}} COMMAND{{end}}
{{ .Short | trim }}

View File

@ -9,11 +9,11 @@ import (
// NewCheckpointCommand returns the `checkpoint` subcommand (only in experimental)
func NewCheckpointCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "checkpoint",
Short: "Manage checkpoints",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
Tags: map[string]string{"experimental": "", "version": "1.25"},
Use: "checkpoint",
Short: "Manage checkpoints",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
Annotations: map[string]string{"experimental": "", "version": "1.25"},
}
cmd.AddCommand(
newCreateCommand(dockerCli),

View File

@ -5,21 +5,30 @@ import (
"net"
"net/http"
"os"
"path/filepath"
"runtime"
"time"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/config"
cliconfig "github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/configfile"
cliflags "github.com/docker/cli/cli/flags"
manifeststore "github.com/docker/cli/cli/manifest/store"
registryclient "github.com/docker/cli/cli/registry/client"
"github.com/docker/cli/cli/trust"
dopts "github.com/docker/cli/opts"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
registrytypes "github.com/docker/docker/api/types/registry"
"github.com/docker/docker/client"
"github.com/docker/go-connections/sockets"
"github.com/docker/go-connections/tlsconfig"
"github.com/docker/notary/passphrase"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/theupdateframework/notary"
notaryclient "github.com/theupdateframework/notary/client"
"github.com/theupdateframework/notary/passphrase"
"golang.org/x/net/context"
)
@ -39,23 +48,28 @@ type Cli interface {
SetIn(in *InStream)
ConfigFile() *configfile.ConfigFile
ServerInfo() ServerInfo
ClientInfo() ClientInfo
NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error)
DefaultVersion() string
ManifestStore() manifeststore.Store
RegistryClient(bool) registryclient.RegistryClient
}
// DockerCli is an instance the docker command line client.
// Instances of the client can be returned from NewDockerCli.
type DockerCli struct {
configFile *configfile.ConfigFile
in *InStream
out *OutStream
err io.Writer
client client.APIClient
defaultVersion string
server ServerInfo
configFile *configfile.ConfigFile
in *InStream
out *OutStream
err io.Writer
client client.APIClient
serverInfo ServerInfo
clientInfo ClientInfo
}
// DefaultVersion returns api.defaultVersion or DOCKER_API_VERSION if specified.
func (cli *DockerCli) DefaultVersion() string {
return cli.defaultVersion
return cli.clientInfo.DefaultVersion
}
// Client returns the APIClient
@ -100,7 +114,27 @@ func (cli *DockerCli) ConfigFile() *configfile.ConfigFile {
// ServerInfo returns the server version details for the host this client is
// connected to
func (cli *DockerCli) ServerInfo() ServerInfo {
return cli.server
return cli.serverInfo
}
// ClientInfo returns the client details for the cli
func (cli *DockerCli) ClientInfo() ClientInfo {
return cli.clientInfo
}
// ManifestStore returns a store for local manifests
func (cli *DockerCli) ManifestStore() manifeststore.Store {
// TODO: support override default location from config file
return manifeststore.NewStore(filepath.Join(config.Dir(), "manifests"))
}
// RegistryClient returns a client for communicating with a Docker distribution
// registry
func (cli *DockerCli) RegistryClient(allowInsecure bool) registryclient.RegistryClient {
resolver := func(ctx context.Context, index *registrytypes.IndexInfo) types.AuthConfig {
return ResolveAuthConfig(ctx, cli, index)
}
return registryclient.NewRegistryClient(resolver, UserAgent(), allowInsecure)
}
// Initialize the dockerCli runs initialization that must happen after command
@ -111,44 +145,77 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions) error {
var err error
cli.client, err = NewAPIClientFromFlags(opts.Common, cli.configFile)
if tlsconfig.IsErrEncryptedKey(err) {
var (
passwd string
giveup bool
)
passRetriever := passphrase.PromptRetrieverWithInOut(cli.In(), cli.Out(), nil)
for attempts := 0; tlsconfig.IsErrEncryptedKey(err); attempts++ {
// some code and comments borrowed from notary/trustmanager/keystore.go
passwd, giveup, err = passRetriever("private", "encrypted TLS private", false, attempts)
// Check if the passphrase retriever got an error or if it is telling us to give up
if giveup || err != nil {
return errors.Wrap(err, "private key is encrypted, but could not get passphrase")
}
opts.Common.TLSOptions.Passphrase = passwd
cli.client, err = NewAPIClientFromFlags(opts.Common, cli.configFile)
newClient := func(password string) (client.APIClient, error) {
opts.Common.TLSOptions.Passphrase = password
return NewAPIClientFromFlags(opts.Common, cli.configFile)
}
cli.client, err = getClientWithPassword(passRetriever, newClient)
}
if err != nil {
return err
}
hasExperimental, err := isEnabled(cli.configFile.Experimental)
if err != nil {
return errors.Wrap(err, "Experimental field")
}
orchestrator := GetOrchestrator(hasExperimental, opts.Common.Orchestrator, cli.configFile.Orchestrator)
cli.clientInfo = ClientInfo{
DefaultVersion: cli.client.ClientVersion(),
HasExperimental: hasExperimental,
Orchestrator: orchestrator,
}
cli.initializeFromClient()
return nil
}
cli.defaultVersion = cli.client.ClientVersion()
func isEnabled(value string) (bool, error) {
switch value {
case "enabled":
return true, nil
case "", "disabled":
return false, nil
default:
return false, errors.Errorf("%q is not valid, should be either enabled or disabled", value)
}
}
if ping, err := cli.client.Ping(context.Background()); err == nil {
cli.server = ServerInfo{
HasExperimental: ping.Experimental,
OSType: ping.OSType,
}
cli.client.NegotiateAPIVersionPing(ping)
} else {
func (cli *DockerCli) initializeFromClient() {
ping, err := cli.client.Ping(context.Background())
if err != nil {
// Default to true if we fail to connect to daemon
cli.server = ServerInfo{HasExperimental: true}
cli.serverInfo = ServerInfo{HasExperimental: true}
if ping.APIVersion != "" {
cli.client.NegotiateAPIVersionPing(ping)
}
return
}
return nil
cli.serverInfo = ServerInfo{
HasExperimental: ping.Experimental,
OSType: ping.OSType,
}
cli.client.NegotiateAPIVersionPing(ping)
}
func getClientWithPassword(passRetriever notary.PassRetriever, newClient func(password string) (client.APIClient, error)) (client.APIClient, error) {
for attempts := 0; ; attempts++ {
passwd, giveup, err := passRetriever("private", "encrypted TLS private", false, attempts)
if giveup || err != nil {
return nil, errors.Wrap(err, "private key is encrypted, but could not get passphrase")
}
apiclient, err := newClient(passwd)
if !tlsconfig.IsErrEncryptedKey(err) {
return apiclient, err
}
}
}
// NotaryClient provides a Notary Repository to interact with signed metadata for an image
func (cli *DockerCli) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error) {
return trust.GetNotaryRepository(cli.In(), cli.Out(), UserAgent(), imgRefAndAuth.RepoInfo(), imgRefAndAuth.AuthConfig(), actions...)
}
// ServerInfo stores details about the supported features and platform of the
@ -158,6 +225,18 @@ type ServerInfo struct {
OSType string
}
// ClientInfo stores details about the supported features of the client
type ClientInfo struct {
HasExperimental bool
DefaultVersion string
Orchestrator Orchestrator
}
// HasKubernetes checks if kubernetes orchestrator is enabled
func (c ClientInfo) HasKubernetes() bool {
return c.HasExperimental && c.Orchestrator == OrchestratorKubernetes
}
// NewDockerCli returns a DockerCli instance with IO output and error streams set by in, out and err.
func NewDockerCli(in io.ReadCloser, out, err io.Writer) *DockerCli {
return &DockerCli{in: NewInStream(in), out: NewOutStream(out), err: err}
@ -189,7 +268,8 @@ func NewAPIClientFromFlags(opts *cliflags.CommonOptions, configFile *configfile.
return client.NewClient(host, verStr, httpClient, customHeaders)
}
func getServerHost(hosts []string, tlsOptions *tlsconfig.Options) (host string, err error) {
func getServerHost(hosts []string, tlsOptions *tlsconfig.Options) (string, error) {
var host string
switch len(hosts) {
case 0:
host = os.Getenv("DOCKER_HOST")
@ -199,8 +279,7 @@ func getServerHost(hosts []string, tlsOptions *tlsconfig.Options) (host string,
return "", errors.New("Please specify only one -H")
}
host, err = dopts.ParseHost(tlsOptions != nil, host)
return
return dopts.ParseHost(tlsOptions != nil, host)
}
func newHTTPClient(host string, tlsOptions *tlsconfig.Options) (*http.Client, error) {
@ -221,12 +300,12 @@ func newHTTPClient(host string, tlsOptions *tlsconfig.Options) (*http.Client, er
Timeout: 30 * time.Second,
}).DialContext,
}
proto, addr, _, err := client.ParseHost(host)
hostURL, err := client.ParseHostURL(host)
if err != nil {
return nil, err
}
sockets.ConfigureTransport(tr, proto, addr)
sockets.ConfigureTransport(tr, hostURL.Scheme, hostURL.Host)
return &http.Client{
Transport: tr,

View File

@ -1,15 +1,22 @@
package command
import (
"crypto/x509"
"os"
"testing"
cliconfig "github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/cli/flags"
"github.com/docker/cli/internal/test/testutil"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)
func TestNewAPIClientFromFlags(t *testing.T) {
@ -43,7 +50,7 @@ func TestNewAPIClientFromFlagsWithAPIVersionFromEnv(t *testing.T) {
assert.Equal(t, customVersion, apiclient.ClientVersion())
}
// TODO: move to gotestyourself
// TODO: use gotestyourself/env.Patch
func patchEnvVariable(t *testing.T, key, value string) func() {
oldValue, ok := os.LookupEnv(key)
require.NoError(t, os.Setenv(key, value))
@ -55,3 +62,280 @@ func patchEnvVariable(t *testing.T, key, value string) func() {
require.NoError(t, os.Setenv(key, oldValue))
}
}
type fakeClient struct {
client.Client
pingFunc func() (types.Ping, error)
version string
negotiated bool
}
func (c *fakeClient) Ping(_ context.Context) (types.Ping, error) {
return c.pingFunc()
}
func (c *fakeClient) ClientVersion() string {
return c.version
}
func (c *fakeClient) NegotiateAPIVersionPing(types.Ping) {
c.negotiated = true
}
func TestInitializeFromClient(t *testing.T) {
defaultVersion := "v1.55"
var testcases = []struct {
doc string
pingFunc func() (types.Ping, error)
expectedServer ServerInfo
negotiated bool
}{
{
doc: "successful ping",
pingFunc: func() (types.Ping, error) {
return types.Ping{Experimental: true, OSType: "linux", APIVersion: "v1.30"}, nil
},
expectedServer: ServerInfo{HasExperimental: true, OSType: "linux"},
negotiated: true,
},
{
doc: "failed ping, no API version",
pingFunc: func() (types.Ping, error) {
return types.Ping{}, errors.New("failed")
},
expectedServer: ServerInfo{HasExperimental: true},
},
{
doc: "failed ping, with API version",
pingFunc: func() (types.Ping, error) {
return types.Ping{APIVersion: "v1.33"}, errors.New("failed")
},
expectedServer: ServerInfo{HasExperimental: true},
negotiated: true,
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
apiclient := &fakeClient{
pingFunc: testcase.pingFunc,
version: defaultVersion,
}
cli := &DockerCli{client: apiclient}
cli.initializeFromClient()
assert.Equal(t, testcase.expectedServer, cli.serverInfo)
assert.Equal(t, testcase.negotiated, apiclient.negotiated)
})
}
}
func TestExperimentalCLI(t *testing.T) {
defaultVersion := "v1.55"
var testcases = []struct {
doc string
configfile string
expectedExperimentalCLI bool
}{
{
doc: "default",
configfile: `{}`,
expectedExperimentalCLI: false,
},
{
doc: "experimental",
configfile: `{
"experimental": "enabled"
}`,
expectedExperimentalCLI: true,
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
dir := fs.NewDir(t, testcase.doc, fs.WithFile("config.json", testcase.configfile))
defer dir.Remove()
apiclient := &fakeClient{
version: defaultVersion,
}
cli := &DockerCli{client: apiclient, err: os.Stderr}
cliconfig.SetDir(dir.Path())
err := cli.Initialize(flags.NewClientOptions())
assert.NoError(t, err)
assert.Equal(t, testcase.expectedExperimentalCLI, cli.ClientInfo().HasExperimental)
})
}
}
func TestOrchestratorSwitch(t *testing.T) {
defaultVersion := "v0.00"
var testcases = []struct {
doc string
configfile string
envOrchestrator string
flagOrchestrator string
expectedOrchestrator string
expectedKubernetes bool
}{
{
doc: "default",
configfile: `{
"experimental": "enabled"
}`,
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
{
doc: "kubernetesIsExperimental",
configfile: `{
"experimental": "disabled",
"orchestrator": "kubernetes"
}`,
envOrchestrator: "kubernetes",
flagOrchestrator: "kubernetes",
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
{
doc: "kubernetesConfigFile",
configfile: `{
"experimental": "enabled",
"orchestrator": "kubernetes"
}`,
expectedOrchestrator: "kubernetes",
expectedKubernetes: true,
},
{
doc: "kubernetesEnv",
configfile: `{
"experimental": "enabled"
}`,
envOrchestrator: "kubernetes",
expectedOrchestrator: "kubernetes",
expectedKubernetes: true,
},
{
doc: "kubernetesFlag",
configfile: `{
"experimental": "enabled"
}`,
flagOrchestrator: "kubernetes",
expectedOrchestrator: "kubernetes",
expectedKubernetes: true,
},
{
doc: "envOverridesConfigFile",
configfile: `{
"experimental": "enabled",
"orchestrator": "kubernetes"
}`,
envOrchestrator: "swarm",
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
{
doc: "flagOverridesEnv",
configfile: `{
"experimental": "enabled"
}`,
envOrchestrator: "kubernetes",
flagOrchestrator: "swarm",
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
dir := fs.NewDir(t, testcase.doc, fs.WithFile("config.json", testcase.configfile))
defer dir.Remove()
apiclient := &fakeClient{
version: defaultVersion,
}
if testcase.envOrchestrator != "" {
defer patchEnvVariable(t, "DOCKER_ORCHESTRATOR", testcase.envOrchestrator)()
}
cli := &DockerCli{client: apiclient, err: os.Stderr}
cliconfig.SetDir(dir.Path())
options := flags.NewClientOptions()
if testcase.flagOrchestrator != "" {
options.Common.Orchestrator = testcase.flagOrchestrator
}
err := cli.Initialize(options)
assert.NoError(t, err)
assert.Equal(t, testcase.expectedKubernetes, cli.ClientInfo().HasKubernetes())
assert.Equal(t, testcase.expectedOrchestrator, string(cli.ClientInfo().Orchestrator))
})
}
}
func TestGetClientWithPassword(t *testing.T) {
expected := "password"
var testcases = []struct {
doc string
password string
retrieverErr error
retrieverGiveup bool
newClientErr error
expectedErr string
}{
{
doc: "successful connect",
password: expected,
},
{
doc: "password retriever exhausted",
retrieverGiveup: true,
retrieverErr: errors.New("failed"),
expectedErr: "private key is encrypted, but could not get passphrase",
},
{
doc: "password retriever error",
retrieverErr: errors.New("failed"),
expectedErr: "failed",
},
{
doc: "newClient error",
newClientErr: errors.New("failed to connect"),
expectedErr: "failed to connect",
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
passRetriever := func(_, _ string, _ bool, attempts int) (passphrase string, giveup bool, err error) {
// Always return an invalid pass first to test iteration
switch attempts {
case 0:
return "something else", false, nil
default:
return testcase.password, testcase.retrieverGiveup, testcase.retrieverErr
}
}
newClient := func(currentPassword string) (client.APIClient, error) {
if testcase.newClientErr != nil {
return nil, testcase.newClientErr
}
if currentPassword == expected {
return &client.Client{}, nil
}
return &client.Client{}, x509.IncorrectPasswordError
}
_, err := getClientWithPassword(passRetriever, newClient)
if testcase.expectedErr != "" {
testutil.ErrorContains(t, err, testcase.expectedErr)
return
}
assert.NoError(t, err)
})
}
}

View File

@ -8,6 +8,7 @@ import (
"github.com/docker/cli/cli/command/config"
"github.com/docker/cli/cli/command/container"
"github.com/docker/cli/cli/command/image"
"github.com/docker/cli/cli/command/manifest"
"github.com/docker/cli/cli/command/network"
"github.com/docker/cli/cli/command/node"
"github.com/docker/cli/cli/command/plugin"
@ -17,6 +18,7 @@ import (
"github.com/docker/cli/cli/command/stack"
"github.com/docker/cli/cli/command/swarm"
"github.com/docker/cli/cli/command/system"
"github.com/docker/cli/cli/command/trust"
"github.com/docker/cli/cli/command/volume"
"github.com/spf13/cobra"
)
@ -38,12 +40,15 @@ func AddCommands(cmd *cobra.Command, dockerCli *command.DockerCli) {
image.NewImageCommand(dockerCli),
image.NewBuildCommand(dockerCli),
// node
node.NewNodeCommand(dockerCli),
// manifest
manifest.NewManifestCommand(dockerCli),
// network
network.NewNetworkCommand(dockerCli),
// node
node.NewNodeCommand(dockerCli),
// plugin
plugin.NewPluginCommand(dockerCli),
@ -69,6 +74,9 @@ func AddCommands(cmd *cobra.Command, dockerCli *command.DockerCli) {
// swarm
swarm.NewSwarmCommand(dockerCli),
// trust
trust.NewTrustCommand(dockerCli),
// volume
volume.NewVolumeCommand(dockerCli),

View File

@ -8,14 +8,16 @@ import (
)
// NewConfigCommand returns a cobra command for `config` subcommands
// nolint: interfacer
func NewConfigCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewConfigCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "config",
Short: "Manage Docker configs",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
Tags: map[string]string{"version": "1.30"},
Annotations: map[string]string{
"version": "1.30",
"swarm": "",
},
}
cmd.AddCommand(
newConfigListCommand(dockerCli),

View File

@ -16,9 +16,10 @@ import (
)
type createOptions struct {
name string
file string
labels opts.ListOpts
name string
templateDriver string
file string
labels opts.ListOpts
}
func newConfigCreateCommand(dockerCli command.Cli) *cobra.Command {
@ -28,7 +29,7 @@ func newConfigCreateCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "create [OPTIONS] CONFIG file|-",
Short: "Create a configuration file from a file or STDIN as content",
Short: "Create a config from a file or STDIN",
Args: cli.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
createOpts.name = args[0]
@ -38,6 +39,8 @@ func newConfigCreateCommand(dockerCli command.Cli) *cobra.Command {
}
flags := cmd.Flags()
flags.VarP(&createOpts.labels, "label", "l", "Config labels")
flags.StringVar(&createOpts.templateDriver, "template-driver", "", "Template driver")
flags.SetAnnotation("driver", "version", []string{"1.37"})
return cmd
}
@ -68,7 +71,11 @@ func runConfigCreate(dockerCli command.Cli, options createOptions) error {
},
Data: configData,
}
if options.templateDriver != "" {
spec.Templating = &swarm.Driver{
Name: options.templateDriver,
}
}
r, err := client.ConfigCreate(ctx, spec)
if err != nil {
return err

View File

@ -82,14 +82,21 @@ func TestConfigCreateWithLabels(t *testing.T) {
}
name := "foo"
data, err := ioutil.ReadFile(filepath.Join("testdata", configDataFile))
assert.NoError(t, err)
expected := swarm.ConfigSpec{
Annotations: swarm.Annotations{
Name: name,
Labels: expectedLabels,
},
Data: data,
}
cli := test.NewFakeCli(&fakeClient{
configCreateFunc: func(spec swarm.ConfigSpec) (types.ConfigCreateResponse, error) {
if spec.Name != name {
return types.ConfigCreateResponse{}, errors.Errorf("expected name %q, got %q", name, spec.Name)
}
if !reflect.DeepEqual(spec.Labels, expectedLabels) {
return types.ConfigCreateResponse{}, errors.Errorf("expected labels %v, got %v", expectedLabels, spec.Labels)
if !reflect.DeepEqual(spec, expected) {
return types.ConfigCreateResponse{}, errors.Errorf("expected %+v, got %+v", expected, spec)
}
return types.ConfigCreateResponse{
@ -105,3 +112,32 @@ func TestConfigCreateWithLabels(t *testing.T) {
assert.NoError(t, cmd.Execute())
assert.Equal(t, "ID-"+name, strings.TrimSpace(cli.OutBuffer().String()))
}
func TestConfigCreateWithTemplatingDriver(t *testing.T) {
expectedDriver := &swarm.Driver{
Name: "template-driver",
}
name := "foo"
cli := test.NewFakeCli(&fakeClient{
configCreateFunc: func(spec swarm.ConfigSpec) (types.ConfigCreateResponse, error) {
if spec.Name != name {
return types.ConfigCreateResponse{}, errors.Errorf("expected name %q, got %q", name, spec.Name)
}
if spec.Templating.Name != expectedDriver.Name {
return types.ConfigCreateResponse{}, errors.Errorf("expected driver %v, got %v", expectedDriver, spec.Labels)
}
return types.ConfigCreateResponse{
ID: "ID-" + spec.Name,
}, nil
},
})
cmd := newConfigCreateCommand(cli)
cmd.SetArgs([]string{name, filepath.Join("testdata", configDataFile)})
cmd.Flags().Set("template-driver", expectedDriver.Name)
assert.NoError(t, cmd.Execute())
assert.Equal(t, "ID-"+name, strings.TrimSpace(cli.OutBuffer().String()))
}

View File

@ -21,7 +21,7 @@ func newConfigInspectCommand(dockerCli command.Cli) *cobra.Command {
opts := inspectOptions{}
cmd := &cobra.Command{
Use: "inspect [OPTIONS] CONFIG [CONFIG...]",
Short: "Display detailed information on one or more configuration files",
Short: "Display detailed information on one or more configs",
Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
opts.names = args

View File

@ -1,15 +1,27 @@
package config
import (
"sort"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/spf13/cobra"
"golang.org/x/net/context"
"vbom.ml/util/sortorder"
)
type byConfigName []swarm.Config
func (r byConfigName) Len() int { return len(r) }
func (r byConfigName) Swap(i, j int) { r[i], r[j] = r[j], r[i] }
func (r byConfigName) Less(i, j int) bool {
return sortorder.NaturalLess(r[i].Spec.Name, r[j].Spec.Name)
}
type listOptions struct {
quiet bool
format string
@ -55,6 +67,8 @@ func runConfigList(dockerCli command.Cli, options listOptions) error {
}
}
sort.Sort(byConfigName(configs))
configCtx := formatter.Context{
Output: dockerCli.Out(),
Format: formatter.NewConfigFormat(format, options.quiet),

View File

@ -50,14 +50,20 @@ func TestConfigList(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
configListFunc: func(options types.ConfigListOptions) ([]swarm.Config, error) {
return []swarm.Config{
*Config(ConfigID("ID-foo"),
ConfigName("foo"),
*Config(ConfigID("ID-1-foo"),
ConfigName("1-foo"),
ConfigVersion(swarm.Version{Index: 10}),
ConfigCreatedAt(time.Now().Add(-2*time.Hour)),
ConfigUpdatedAt(time.Now().Add(-1*time.Hour)),
),
*Config(ConfigID("ID-bar"),
ConfigName("bar"),
*Config(ConfigID("ID-10-foo"),
ConfigName("10-foo"),
ConfigVersion(swarm.Version{Index: 11}),
ConfigCreatedAt(time.Now().Add(-2*time.Hour)),
ConfigUpdatedAt(time.Now().Add(-1*time.Hour)),
),
*Config(ConfigID("ID-2-foo"),
ConfigName("2-foo"),
ConfigVersion(swarm.Version{Index: 11}),
ConfigCreatedAt(time.Now().Add(-2*time.Hour)),
ConfigUpdatedAt(time.Now().Add(-1*time.Hour)),
@ -66,9 +72,8 @@ func TestConfigList(t *testing.T) {
},
})
cmd := newConfigListCommand(cli)
cmd.SetOutput(cli.OutBuffer())
assert.NoError(t, cmd.Execute())
golden.Assert(t, cli.OutBuffer().String(), "config-list.golden")
golden.Assert(t, cli.OutBuffer().String(), "config-list-sort.golden")
}
func TestConfigListWithQuietOption(t *testing.T) {

View File

@ -19,7 +19,7 @@ func newConfigRemoveCommand(dockerCli command.Cli) *cobra.Command {
return &cobra.Command{
Use: "rm CONFIG [CONFIG...]",
Aliases: []string{"remove"},
Short: "Remove one or more configuration files",
Short: "Remove one or more configs",
Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
opts := removeOptions{

View File

@ -0,0 +1,4 @@
ID NAME CREATED UPDATED
ID-1-foo 1-foo 2 hours ago About an hour ago
ID-2-foo 2-foo 2 hours ago About an hour ago
ID-10-foo 10-foo 2 hours ago About an hour ago

View File

@ -1,2 +1,2 @@
foo
bar label=label-bar
foo

View File

@ -1,3 +1,3 @@
ID NAME CREATED UPDATED
ID-foo foo 2 hours ago About an hour ago
ID-bar bar 2 hours ago About an hour ago
ID-foo foo 2 hours ago About an hour ago

View File

@ -1,2 +1,2 @@
foo
bar label=label-bar
foo

View File

@ -1,2 +1,2 @@
ID-foo
ID-bar
ID-foo

View File

@ -1,3 +0,0 @@
ID NAME CREATED UPDATED
ID-foo foo 2 hours ago About an hour ago
ID-bar bar 2 hours ago About an hour ago

View File

@ -1,16 +1,18 @@
package container
import (
"fmt"
"io"
"net/http/httputil"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/signal"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
@ -66,6 +68,9 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error {
ctx := context.Background()
client := dockerCli.Client()
// request channel to wait for client
resultC, errC := client.ContainerWait(ctx, opts.container, "")
c, err := inspectContainerAndCheckState(ctx, client, opts.container)
if err != nil {
return err
@ -140,7 +145,24 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error {
if errAttach != nil {
return errAttach
}
return getExitStatus(ctx, dockerCli.Client(), opts.container)
return getExitStatus(errC, resultC)
}
func getExitStatus(errC <-chan error, resultC <-chan container.ContainerWaitOKBody) error {
select {
case result := <-resultC:
if result.Error != nil {
return fmt.Errorf(result.Error.Message)
}
if result.StatusCode != 0 {
return cli.StatusError{StatusCode: int(result.StatusCode)}
}
case err := <-errC:
return err
}
return nil
}
func resizeTTY(ctx context.Context, dockerCli command.Cli, containerID string) {
@ -157,19 +179,3 @@ func resizeTTY(ctx context.Context, dockerCli command.Cli, containerID string) {
logrus.Debugf("Error monitoring TTY size: %s", err)
}
}
func getExitStatus(ctx context.Context, apiclient client.ContainerAPIClient, containerID string) error {
container, err := apiclient.ContainerInspect(ctx, containerID)
if err != nil {
// If we can't connect, then the daemon probably died.
if !client.IsErrConnectionFailed(err) {
return err
}
return cli.StatusError{StatusCode: -1}
}
status := container.State.ExitCode
if status != 0 {
return cli.StatusError{StatusCode: status}
}
return nil
}

View File

@ -1,6 +1,7 @@
package container
import (
"fmt"
"io/ioutil"
"testing"
@ -8,9 +9,9 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/cli/internal/test/testutil"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)
func TestNewAttachCommandErrors(t *testing.T) {
@ -78,40 +79,50 @@ func TestNewAttachCommandErrors(t *testing.T) {
}
func TestGetExitStatus(t *testing.T) {
containerID := "the exec id"
expecatedErr := errors.New("unexpected error")
var (
expectedErr = fmt.Errorf("unexpected error")
errC = make(chan error, 1)
resultC = make(chan container.ContainerWaitOKBody, 1)
)
testcases := []struct {
inspectError error
exitCode int
result *container.ContainerWaitOKBody
err error
expectedError error
}{
{
inspectError: nil,
exitCode: 0,
result: &container.ContainerWaitOKBody{
StatusCode: 0,
},
},
{
inspectError: expecatedErr,
expectedError: expecatedErr,
err: expectedErr,
expectedError: expectedErr,
},
{
exitCode: 15,
result: &container.ContainerWaitOKBody{
Error: &container.ContainerWaitOKBodyError{
expectedErr.Error(),
},
},
expectedError: expectedErr,
},
{
result: &container.ContainerWaitOKBody{
StatusCode: 15,
},
expectedError: cli.StatusError{StatusCode: 15},
},
}
for _, testcase := range testcases {
client := &fakeClient{
inspectFunc: func(id string) (types.ContainerJSON, error) {
assert.Equal(t, containerID, id)
return types.ContainerJSON{
ContainerJSONBase: &types.ContainerJSONBase{
State: &types.ContainerState{ExitCode: testcase.exitCode},
},
}, testcase.inspectError
},
if testcase.err != nil {
errC <- testcase.err
}
err := getExitStatus(context.Background(), client, containerID)
if testcase.result != nil {
resultC <- *testcase.result
}
err := getExitStatus(errC, resultC)
assert.Equal(t, testcase.expectedError, err)
}
}

View File

@ -12,12 +12,26 @@ import (
type fakeClient struct {
client.Client
inspectFunc func(string) (types.ContainerJSON, error)
execInspectFunc func(execID string) (types.ContainerExecInspect, error)
execCreateFunc func(container string, config types.ExecConfig) (types.IDResponse, error)
createContainerFunc func(config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
imageCreateFunc func(parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
infoFunc func() (types.Info, error)
inspectFunc func(string) (types.ContainerJSON, error)
execInspectFunc func(execID string) (types.ContainerExecInspect, error)
execCreateFunc func(container string, config types.ExecConfig) (types.IDResponse, error)
createContainerFunc func(config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
containerStartFunc func(container string, options types.ContainerStartOptions) error
imageCreateFunc func(parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
infoFunc func() (types.Info, error)
containerStatPathFunc func(container, path string) (types.ContainerPathStat, error)
containerCopyFromFunc func(container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
logFunc func(string, types.ContainerLogsOptions) (io.ReadCloser, error)
waitFunc func(string) (<-chan container.ContainerWaitOKBody, <-chan error)
containerListFunc func(types.ContainerListOptions) ([]types.Container, error)
Version string
}
func (f *fakeClient) ContainerList(_ context.Context, options types.ContainerListOptions) ([]types.Container, error) {
if f.containerListFunc != nil {
return f.containerListFunc(options)
}
return []types.Container{}, nil
}
func (f *fakeClient) ContainerInspect(_ context.Context, containerID string) (types.ContainerJSON, error) {
@ -71,3 +85,42 @@ func (f *fakeClient) Info(_ context.Context) (types.Info, error) {
}
return types.Info{}, nil
}
func (f *fakeClient) ContainerStatPath(_ context.Context, container, path string) (types.ContainerPathStat, error) {
if f.containerStatPathFunc != nil {
return f.containerStatPathFunc(container, path)
}
return types.ContainerPathStat{}, nil
}
func (f *fakeClient) CopyFromContainer(_ context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) {
if f.containerCopyFromFunc != nil {
return f.containerCopyFromFunc(container, srcPath)
}
return nil, types.ContainerPathStat{}, nil
}
func (f *fakeClient) ContainerLogs(_ context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) {
if f.logFunc != nil {
return f.logFunc(container, options)
}
return nil, nil
}
func (f *fakeClient) ClientVersion() string {
return f.Version
}
func (f *fakeClient) ContainerWait(_ context.Context, container string, _ container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) {
if f.waitFunc != nil {
return f.waitFunc(container)
}
return nil, nil
}
func (f *fakeClient) ContainerStart(_ context.Context, container string, options types.ContainerStartOptions) error {
if f.containerStartFunc != nil {
return f.containerStartFunc(container, options)
}
return nil
}

View File

@ -7,8 +7,7 @@ import (
)
// NewContainerCommand returns a cobra command for `container` subcommands
// nolint: interfacer
func NewContainerCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewContainerCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "container",
Short: "Manage containers",

View File

@ -22,7 +22,7 @@ type commitOptions struct {
}
// NewCommitCommand creates a new cobra.Command for `docker commit`
func NewCommitCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewCommitCommand(dockerCli command.Cli) *cobra.Command {
var options commitOptions
cmd := &cobra.Command{
@ -51,7 +51,7 @@ func NewCommitCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runCommit(dockerCli *command.DockerCli, options *commitOptions) error {
func runCommit(dockerCli command.Cli, options *commitOptions) error {
ctx := context.Background()
name := options.container

View File

@ -26,17 +26,21 @@ type copyOptions struct {
type copyDirection int
const (
fromContainer copyDirection = (1 << iota)
fromContainer copyDirection = 1 << iota
toContainer
acrossContainers = fromContainer | toContainer
)
type cpConfig struct {
followLink bool
copyUIDGID bool
sourcePath string
destPath string
container string
}
// NewCopyCommand creates a new `docker cp` command
func NewCopyCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewCopyCommand(dockerCli command.Cli) *cobra.Command {
var opts copyOptions
cmd := &cobra.Command{
@ -65,58 +69,57 @@ func NewCopyCommand(dockerCli *command.DockerCli) *cobra.Command {
}
flags := cmd.Flags()
flags.BoolVarP(&opts.followLink, "follow-link", "L", false, "Always follow symbol link in SRC_PATH")
flags.BoolVarP(&opts.copyUIDGID, "archive", "a", false, "Archive mode (copy all uid/gid information)")
return cmd
}
func runCopy(dockerCli *command.DockerCli, opts copyOptions) error {
func runCopy(dockerCli command.Cli, opts copyOptions) error {
srcContainer, srcPath := splitCpArg(opts.source)
dstContainer, dstPath := splitCpArg(opts.destination)
destContainer, destPath := splitCpArg(opts.destination)
copyConfig := cpConfig{
followLink: opts.followLink,
copyUIDGID: opts.copyUIDGID,
sourcePath: srcPath,
destPath: destPath,
}
var direction copyDirection
if srcContainer != "" {
direction |= fromContainer
copyConfig.container = srcContainer
}
if dstContainer != "" {
if destContainer != "" {
direction |= toContainer
}
cpParam := &cpConfig{
followLink: opts.followLink,
copyConfig.container = destContainer
}
ctx := context.Background()
switch direction {
case fromContainer:
return copyFromContainer(ctx, dockerCli, srcContainer, srcPath, dstPath, cpParam)
return copyFromContainer(ctx, dockerCli, copyConfig)
case toContainer:
return copyToContainer(ctx, dockerCli, srcPath, dstContainer, dstPath, cpParam, opts.copyUIDGID)
return copyToContainer(ctx, dockerCli, copyConfig)
case acrossContainers:
// Copying between containers isn't supported.
return errors.New("copying between containers is not supported")
default:
// User didn't specify any container.
return errors.New("must specify at least one container source")
}
}
func statContainerPath(ctx context.Context, dockerCli *command.DockerCli, containerName, path string) (types.ContainerPathStat, error) {
return dockerCli.Client().ContainerStatPath(ctx, containerName, path)
}
func resolveLocalPath(localPath string) (absPath string, err error) {
if absPath, err = filepath.Abs(localPath); err != nil {
return
}
return archive.PreserveTrailingDotOrSeparator(absPath, localPath), nil
return archive.PreserveTrailingDotOrSeparator(absPath, localPath, filepath.Separator), nil
}
func copyFromContainer(ctx context.Context, dockerCli *command.DockerCli, srcContainer, srcPath, dstPath string, cpParam *cpConfig) (err error) {
func copyFromContainer(ctx context.Context, dockerCli command.Cli, copyConfig cpConfig) (err error) {
dstPath := copyConfig.destPath
srcPath := copyConfig.sourcePath
if dstPath != "-" {
// Get an absolute destination path.
dstPath, err = resolveLocalPath(dstPath)
@ -125,10 +128,11 @@ func copyFromContainer(ctx context.Context, dockerCli *command.DockerCli, srcCon
}
}
client := dockerCli.Client()
// if client requests to follow symbol link, then must decide target file to be copied
var rebaseName string
if cpParam.followLink {
srcStat, err := statContainerPath(ctx, dockerCli, srcContainer, srcPath)
if copyConfig.followLink {
srcStat, err := client.ContainerStatPath(ctx, copyConfig.container, srcPath)
// If the destination is a symbolic link, we should follow it.
if err == nil && srcStat.Mode&os.ModeSymlink != 0 {
@ -145,20 +149,17 @@ func copyFromContainer(ctx context.Context, dockerCli *command.DockerCli, srcCon
}
content, stat, err := dockerCli.Client().CopyFromContainer(ctx, srcContainer, srcPath)
content, stat, err := client.CopyFromContainer(ctx, copyConfig.container, srcPath)
if err != nil {
return err
}
defer content.Close()
if dstPath == "-" {
// Send the response to STDOUT.
_, err = io.Copy(os.Stdout, content)
_, err = io.Copy(dockerCli.Out(), content)
return err
}
// Prepare source copy info.
srcInfo := archive.CopyInfo{
Path: srcPath,
Exists: true,
@ -171,13 +172,17 @@ func copyFromContainer(ctx context.Context, dockerCli *command.DockerCli, srcCon
_, srcBase := archive.SplitPathDirEntry(srcInfo.Path)
preArchive = archive.RebaseArchiveEntries(content, srcBase, srcInfo.RebaseName)
}
// See comments in the implementation of `archive.CopyTo` for exactly what
// goes into deciding how and whether the source archive needs to be
// altered for the correct copy behavior.
return archive.CopyTo(preArchive, srcInfo, dstPath)
}
func copyToContainer(ctx context.Context, dockerCli *command.DockerCli, srcPath, dstContainer, dstPath string, cpParam *cpConfig, copyUIDGID bool) (err error) {
// In order to get the copy behavior right, we need to know information
// about both the source and destination. The API is a simple tar
// archive/extract API but we can use the stat info header about the
// destination to be more informed about exactly what the destination is.
func copyToContainer(ctx context.Context, dockerCli command.Cli, copyConfig cpConfig) (err error) {
srcPath := copyConfig.sourcePath
dstPath := copyConfig.destPath
if srcPath != "-" {
// Get an absolute source path.
srcPath, err = resolveLocalPath(srcPath)
@ -186,14 +191,10 @@ func copyToContainer(ctx context.Context, dockerCli *command.DockerCli, srcPath,
}
}
// In order to get the copy behavior right, we need to know information
// about both the source and destination. The API is a simple tar
// archive/extract API but we can use the stat info header about the
// destination to be more informed about exactly what the destination is.
client := dockerCli.Client()
// Prepare destination copy info by stat-ing the container path.
dstInfo := archive.CopyInfo{Path: dstPath}
dstStat, err := statContainerPath(ctx, dockerCli, dstContainer, dstPath)
dstStat, err := client.ContainerStatPath(ctx, copyConfig.container, dstPath)
// If the destination is a symbolic link, we should evaluate it.
if err == nil && dstStat.Mode&os.ModeSymlink != 0 {
@ -205,7 +206,7 @@ func copyToContainer(ctx context.Context, dockerCli *command.DockerCli, srcPath,
}
dstInfo.Path = linkTarget
dstStat, err = statContainerPath(ctx, dockerCli, dstContainer, linkTarget)
dstStat, err = client.ContainerStatPath(ctx, copyConfig.container, linkTarget)
}
// Ignore any error and assume that the parent directory of the destination
@ -224,15 +225,14 @@ func copyToContainer(ctx context.Context, dockerCli *command.DockerCli, srcPath,
)
if srcPath == "-" {
// Use STDIN.
content = os.Stdin
resolvedDstPath = dstInfo.Path
if !dstInfo.IsDir {
return errors.Errorf("destination \"%s:%s\" must be a directory", dstContainer, dstPath)
return errors.Errorf("destination \"%s:%s\" must be a directory", copyConfig.container, dstPath)
}
} else {
// Prepare source copy info.
srcInfo, err := archive.CopyInfoSourcePath(srcPath, cpParam.followLink)
srcInfo, err := archive.CopyInfoSourcePath(srcPath, copyConfig.followLink)
if err != nil {
return err
}
@ -267,10 +267,9 @@ func copyToContainer(ctx context.Context, dockerCli *command.DockerCli, srcPath,
options := types.CopyToContainerOptions{
AllowOverwriteDirWithFile: false,
CopyUIDGID: copyUIDGID,
CopyUIDGID: copyConfig.copyUIDGID,
}
return dockerCli.Client().CopyToContainer(ctx, dstContainer, resolvedDstPath, content, options)
return client.CopyToContainer(ctx, copyConfig.container, resolvedDstPath, content, options)
}
// We use `:` as a delimiter between CONTAINER and PATH, but `:` could also be

View File

@ -0,0 +1,188 @@
package container
import (
"io"
"io/ioutil"
"os"
"runtime"
"strings"
"testing"
"github.com/docker/cli/internal/test"
"github.com/docker/cli/internal/test/testutil"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/archive"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/gotestyourself/gotestyourself/skip"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestRunCopyWithInvalidArguments(t *testing.T) {
var testcases = []struct {
doc string
options copyOptions
expectedErr string
}{
{
doc: "copy between container",
options: copyOptions{
source: "first:/path",
destination: "second:/path",
},
expectedErr: "copying between containers is not supported",
},
{
doc: "copy without a container",
options: copyOptions{
source: "./source",
destination: "./dest",
},
expectedErr: "must specify at least one container source",
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
err := runCopy(test.NewFakeCli(nil), testcase.options)
assert.EqualError(t, err, testcase.expectedErr)
})
}
}
func TestRunCopyFromContainerToStdout(t *testing.T) {
tarContent := "the tar content"
fakeClient := &fakeClient{
containerCopyFromFunc: func(container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) {
assert.Equal(t, "container", container)
return ioutil.NopCloser(strings.NewReader(tarContent)), types.ContainerPathStat{}, nil
},
}
options := copyOptions{source: "container:/path", destination: "-"}
cli := test.NewFakeCli(fakeClient)
err := runCopy(cli, options)
require.NoError(t, err)
assert.Equal(t, tarContent, cli.OutBuffer().String())
assert.Equal(t, "", cli.ErrBuffer().String())
}
func TestRunCopyFromContainerToFilesystem(t *testing.T) {
destDir := fs.NewDir(t, "cp-test",
fs.WithFile("file1", "content\n"))
defer destDir.Remove()
fakeClient := &fakeClient{
containerCopyFromFunc: func(container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) {
assert.Equal(t, "container", container)
readCloser, err := archive.TarWithOptions(destDir.Path(), &archive.TarOptions{})
return readCloser, types.ContainerPathStat{}, err
},
}
options := copyOptions{source: "container:/path", destination: destDir.Path()}
cli := test.NewFakeCli(fakeClient)
err := runCopy(cli, options)
require.NoError(t, err)
assert.Equal(t, "", cli.OutBuffer().String())
assert.Equal(t, "", cli.ErrBuffer().String())
content, err := ioutil.ReadFile(destDir.Join("file1"))
require.NoError(t, err)
assert.Equal(t, "content\n", string(content))
}
func TestRunCopyFromContainerToFilesystemMissingDestinationDirectory(t *testing.T) {
destDir := fs.NewDir(t, "cp-test",
fs.WithFile("file1", "content\n"))
defer destDir.Remove()
fakeClient := &fakeClient{
containerCopyFromFunc: func(container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) {
assert.Equal(t, "container", container)
readCloser, err := archive.TarWithOptions(destDir.Path(), &archive.TarOptions{})
return readCloser, types.ContainerPathStat{}, err
},
}
options := copyOptions{
source: "container:/path",
destination: destDir.Join("missing", "foo"),
}
cli := test.NewFakeCli(fakeClient)
err := runCopy(cli, options)
testutil.ErrorContains(t, err, destDir.Join("missing"))
}
func TestRunCopyToContainerFromFileWithTrailingSlash(t *testing.T) {
srcFile := fs.NewFile(t, t.Name())
defer srcFile.Remove()
options := copyOptions{
source: srcFile.Path() + string(os.PathSeparator),
destination: "container:/path",
}
cli := test.NewFakeCli(&fakeClient{})
err := runCopy(cli, options)
testutil.ErrorContains(t, err, "not a directory")
}
func TestRunCopyToContainerSourceDoesNotExist(t *testing.T) {
options := copyOptions{
source: "/does/not/exist",
destination: "container:/path",
}
cli := test.NewFakeCli(&fakeClient{})
err := runCopy(cli, options)
expected := "no such file or directory"
if runtime.GOOS == "windows" {
expected = "cannot find the file specified"
}
testutil.ErrorContains(t, err, expected)
}
func TestSplitCpArg(t *testing.T) {
var testcases = []struct {
doc string
path string
os string
expectedContainer string
expectedPath string
}{
{
doc: "absolute path with colon",
os: "linux",
path: "/abs/path:withcolon",
expectedPath: "/abs/path:withcolon",
},
{
doc: "relative path with colon",
path: "./relative:path",
expectedPath: "./relative:path",
},
{
doc: "absolute path with drive",
os: "windows",
path: `d:\abs\path`,
expectedPath: `d:\abs\path`,
},
{
doc: "no separator",
path: "relative/path",
expectedPath: "relative/path",
},
{
doc: "with separator",
path: "container:/opt/foo",
expectedPath: "/opt/foo",
expectedContainer: "container",
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
skip.IfCondition(t, testcase.os != "" && testcase.os != runtime.GOOS)
container, path := splitCpArg(testcase.path)
assert.Equal(t, testcase.expectedContainer, container)
assert.Equal(t, testcase.expectedPath, path)
})
}
}

View File

@ -21,7 +21,8 @@ import (
)
type createOptions struct {
name string
name string
platform string
}
// NewCreateCommand creates a new cobra.Command for `docker create`
@ -51,6 +52,7 @@ func NewCreateCommand(dockerCli command.Cli) *cobra.Command {
// with hostname
flags.Bool("help", false, "Print usage")
command.AddPlatformFlag(flags, &opts.platform)
command.AddTrustVerificationFlags(flags)
copts = addFlags(flags)
return cmd
@ -62,7 +64,7 @@ func runCreate(dockerCli command.Cli, flags *pflag.FlagSet, opts *createOptions,
reportError(dockerCli.Err(), "create", err.Error(), true)
return cli.StatusError{StatusCode: 125}
}
response, err := createContainer(context.Background(), dockerCli, containerConfig, opts.name)
response, err := createContainer(context.Background(), dockerCli, containerConfig, opts.name, opts.platform)
if err != nil {
return err
}
@ -70,7 +72,7 @@ func runCreate(dockerCli command.Cli, flags *pflag.FlagSet, opts *createOptions,
return nil
}
func pullImage(ctx context.Context, dockerCli command.Cli, image string, out io.Writer) error {
func pullImage(ctx context.Context, dockerCli command.Cli, image string, platform string, out io.Writer) error {
ref, err := reference.ParseNormalizedNamed(image)
if err != nil {
return err
@ -90,6 +92,7 @@ func pullImage(ctx context.Context, dockerCli command.Cli, image string, out io.
options := types.ImageCreateOptions{
RegistryAuth: encodedAuth,
Platform: platform,
}
responseBody, err := dockerCli.Client().ImageCreate(ctx, image, options)
@ -155,7 +158,7 @@ func newCIDFile(path string) (*cidFile, error) {
return &cidFile{path: path, file: f}, nil
}
func createContainer(ctx context.Context, dockerCli command.Cli, containerConfig *containerConfig, name string) (*container.ContainerCreateCreatedBody, error) {
func createContainer(ctx context.Context, dockerCli command.Cli, containerConfig *containerConfig, name string, platform string) (*container.ContainerCreateCreatedBody, error) {
config := containerConfig.Config
hostConfig := containerConfig.HostConfig
networkingConfig := containerConfig.NetworkingConfig
@ -194,11 +197,11 @@ func createContainer(ctx context.Context, dockerCli command.Cli, containerConfig
//if image not found try to pull it
if err != nil {
if apiclient.IsErrImageNotFound(err) && namedRef != nil {
if apiclient.IsErrNotFound(err) && namedRef != nil {
fmt.Fprintf(stderr, "Unable to find image '%s' locally\n", reference.FamiliarString(namedRef))
// we don't want to write to stdout anything apart from container.ID
if err := pullImage(ctx, dockerCli, config.Image, stderr); err != nil {
if err := pullImage(ctx, dockerCli, config.Image, platform, stderr); err != nil {
return nil, err
}
if taggedRef, ok := namedRef.(reference.NamedTagged); ok && trustedRef != nil {

View File

@ -5,6 +5,7 @@ import (
"io"
"io/ioutil"
"os"
"runtime"
"strings"
"testing"
@ -106,7 +107,7 @@ func TestCreateContainerPullsImageIfMissing(t *testing.T) {
},
HostConfig: &container.HostConfig{},
}
body, err := createContainer(context.Background(), cli, config, "name")
body, err := createContainer(context.Background(), cli, config, "name", runtime.GOOS)
require.NoError(t, err)
expected := container.ContainerCreateCreatedBody{ID: containerID}
assert.Equal(t, expected, *body)

View File

@ -14,7 +14,7 @@ type diffOptions struct {
}
// NewDiffCommand creates a new cobra.Command for `docker diff`
func NewDiffCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewDiffCommand(dockerCli command.Cli) *cobra.Command {
var opts diffOptions
return &cobra.Command{
@ -28,7 +28,7 @@ func NewDiffCommand(dockerCli *command.DockerCli) *cobra.Command {
}
}
func runDiff(dockerCli *command.DockerCli, opts *diffOptions) error {
func runDiff(dockerCli command.Cli, opts *diffOptions) error {
if opts.container == "" {
return errors.New("Container name cannot be empty")
}

View File

@ -4,15 +4,14 @@ import (
"fmt"
"io"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
apiclient "github.com/docker/docker/client"
"github.com/docker/docker/pkg/promise"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
@ -25,6 +24,7 @@ type execOptions struct {
user string
privileged bool
env opts.ListOpts
workdir string
container string
command []string
}
@ -59,6 +59,8 @@ func NewExecCommand(dockerCli command.Cli) *cobra.Command {
flags.BoolVarP(&options.privileged, "privileged", "", false, "Give extended privileges to the command")
flags.VarP(&options.env, "env", "e", "Set environment variables")
flags.SetAnnotation("env", "version", []string{"1.25"})
flags.StringVarP(&options.workdir, "workdir", "w", "", "Working directory inside the container")
flags.SetAnnotation("workdir", "version", []string{"1.35"})
return cmd
}
@ -106,7 +108,6 @@ func interactiveExec(ctx context.Context, dockerCli command.Cli, execConfig *typ
var (
out, stderr io.Writer
in io.ReadCloser
errCh chan error
)
if execConfig.AttachStdin {
@ -124,24 +125,33 @@ func interactiveExec(ctx context.Context, dockerCli command.Cli, execConfig *typ
}
client := dockerCli.Client()
resp, err := client.ContainerExecAttach(ctx, execID, *execConfig)
execStartCheck := types.ExecStartCheck{
Tty: execConfig.Tty,
}
resp, err := client.ContainerExecAttach(ctx, execID, execStartCheck)
if err != nil {
return err
}
defer resp.Close()
errCh = promise.Go(func() error {
streamer := hijackedIOStreamer{
streams: dockerCli,
inputStream: in,
outputStream: out,
errorStream: stderr,
resp: resp,
tty: execConfig.Tty,
detachKeys: execConfig.DetachKeys,
}
return streamer.stream(ctx)
})
errCh := make(chan error, 1)
go func() {
defer close(errCh)
errCh <- func() error {
streamer := hijackedIOStreamer{
streams: dockerCli,
inputStream: in,
outputStream: out,
errorStream: stderr,
resp: resp,
tty: execConfig.Tty,
detachKeys: execConfig.DetachKeys,
}
return streamer.stream(ctx)
}()
}()
if execConfig.Tty && dockerCli.In().IsTerminal() {
if err := MonitorTtySize(ctx, dockerCli, execID, true); err != nil {
@ -183,6 +193,7 @@ func parseExec(opts execOptions, configFile *configfile.ConfigFile) *types.ExecC
Cmd: opts.command,
Detach: opts.detach,
Env: opts.env.GetAll(),
WorkingDir: opts.workdir,
}
// If -d is not set, attach to everything by default

View File

@ -16,7 +16,7 @@ type exportOptions struct {
}
// NewExportCommand creates a new `docker export` command
func NewExportCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewExportCommand(dockerCli command.Cli) *cobra.Command {
var opts exportOptions
cmd := &cobra.Command{
@ -36,7 +36,7 @@ func NewExportCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runExport(dockerCli *command.DockerCli, opts exportOptions) error {
func runExport(dockerCli command.Cli, opts exportOptions) error {
if opts.output == "" && dockerCli.Out().IsTerminal() {
return errors.New("cowardly refusing to save to a terminal. Use the -o flag or redirect")
}

View File

@ -6,12 +6,12 @@ import (
"runtime"
"sync"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/pkg/term"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
@ -185,6 +185,7 @@ func setRawTerminal(streams command.Streams) error {
return streams.Out().SetRawTerminal()
}
// nolint: unparam
func restoreTerminal(streams command.Streams, in io.Closer) error {
streams.In().RestoreTerminal()
streams.Out().RestoreTerminal()

View File

@ -15,7 +15,7 @@ type inspectOptions struct {
}
// newInspectCommand creates a new cobra.Command for `docker container inspect`
func newInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
func newInspectCommand(dockerCli command.Cli) *cobra.Command {
var opts inspectOptions
cmd := &cobra.Command{
@ -35,7 +35,7 @@ func newInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runInspect(dockerCli *command.DockerCli, opts inspectOptions) error {
func runInspect(dockerCli command.Cli, opts inspectOptions) error {
client := dockerCli.Client()
ctx := context.Background()

View File

@ -18,7 +18,7 @@ type killOptions struct {
}
// NewKillCommand creates a new cobra.Command for `docker kill`
func NewKillCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewKillCommand(dockerCli command.Cli) *cobra.Command {
var opts killOptions
cmd := &cobra.Command{
@ -36,7 +36,7 @@ func NewKillCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runKill(dockerCli *command.DockerCli, opts *killOptions) error {
func runKill(dockerCli command.Cli, opts *killOptions) error {
var errs []string
ctx := context.Background()
errChan := parallelOperation(ctx, opts.containers, func(ctx context.Context, container string) error {

View File

@ -25,7 +25,7 @@ type psOptions struct {
}
// NewPsCommand creates a new cobra.Command for `docker ps`
func NewPsCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewPsCommand(dockerCli command.Cli) *cobra.Command {
options := psOptions{filter: opts.NewFilterOpt()}
cmd := &cobra.Command{
@ -51,7 +51,7 @@ func NewPsCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
func newListCommand(dockerCli command.Cli) *cobra.Command {
cmd := *NewPsCommand(dockerCli)
cmd.Aliases = []string{"ps", "list"}
cmd.Use = "ls [OPTIONS]"
@ -109,7 +109,7 @@ func buildContainerListOptions(opts *psOptions) (*types.ContainerListOptions, er
return options, nil
}
func runPs(dockerCli *command.DockerCli, options *psOptions) error {
func runPs(dockerCli command.Cli, options *psOptions) error {
ctx := context.Background()
listOptions, err := buildContainerListOptions(options)

View File

@ -0,0 +1,165 @@
package container
import (
"fmt"
"io/ioutil"
"testing"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/internal/test"
"github.com/docker/cli/internal/test/testutil"
"github.com/docker/docker/api/types"
"github.com/stretchr/testify/assert"
// Import builders to get the builder function as package function
. "github.com/docker/cli/internal/test/builders"
"github.com/gotestyourself/gotestyourself/golden"
)
func TestContainerListErrors(t *testing.T) {
testCases := []struct {
args []string
flags map[string]string
containerListFunc func(types.ContainerListOptions) ([]types.Container, error)
expectedError string
}{
{
flags: map[string]string{
"format": "{{invalid}}",
},
expectedError: `function "invalid" not defined`,
},
{
flags: map[string]string{
"format": "{{join}}",
},
expectedError: `wrong number of args for join`,
},
{
containerListFunc: func(_ types.ContainerListOptions) ([]types.Container, error) {
return nil, fmt.Errorf("error listing containers")
},
expectedError: "error listing containers",
},
}
for _, tc := range testCases {
cmd := newListCommand(
test.NewFakeCli(&fakeClient{
containerListFunc: tc.containerListFunc,
}),
)
cmd.SetArgs(tc.args)
for key, value := range tc.flags {
cmd.Flags().Set(key, value)
}
cmd.SetOutput(ioutil.Discard)
testutil.ErrorContains(t, cmd.Execute(), tc.expectedError)
}
}
func TestContainerListWithoutFormat(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
containerListFunc: func(_ types.ContainerListOptions) ([]types.Container, error) {
return []types.Container{
*Container("c1"),
*Container("c2", WithName("foo")),
*Container("c3", WithPort(80, 80, TCP), WithPort(81, 81, TCP), WithPort(82, 82, TCP)),
*Container("c4", WithPort(81, 81, UDP)),
*Container("c5", WithPort(82, 82, IP("8.8.8.8"), TCP)),
}, nil
},
})
cmd := newListCommand(cli)
assert.NoError(t, cmd.Execute())
golden.Assert(t, cli.OutBuffer().String(), "container-list-without-format.golden")
}
func TestContainerListNoTrunc(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
containerListFunc: func(_ types.ContainerListOptions) ([]types.Container, error) {
return []types.Container{
*Container("c1"),
*Container("c2", WithName("foo/bar")),
}, nil
},
})
cmd := newListCommand(cli)
cmd.Flags().Set("no-trunc", "true")
assert.NoError(t, cmd.Execute())
golden.Assert(t, cli.OutBuffer().String(), "container-list-without-format-no-trunc.golden")
}
// Test for GitHub issue docker/docker#21772
func TestContainerListNamesMultipleTime(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
containerListFunc: func(_ types.ContainerListOptions) ([]types.Container, error) {
return []types.Container{
*Container("c1"),
*Container("c2", WithName("foo/bar")),
}, nil
},
})
cmd := newListCommand(cli)
cmd.Flags().Set("format", "{{.Names}} {{.Names}}")
assert.NoError(t, cmd.Execute())
golden.Assert(t, cli.OutBuffer().String(), "container-list-format-name-name.golden")
}
// Test for GitHub issue docker/docker#30291
func TestContainerListFormatTemplateWithArg(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
containerListFunc: func(_ types.ContainerListOptions) ([]types.Container, error) {
return []types.Container{
*Container("c1", WithLabel("some.label", "value")),
*Container("c2", WithName("foo/bar"), WithLabel("foo", "bar")),
}, nil
},
})
cmd := newListCommand(cli)
cmd.Flags().Set("format", `{{.Names}} {{.Label "some.label"}}`)
assert.NoError(t, cmd.Execute())
golden.Assert(t, cli.OutBuffer().String(), "container-list-format-with-arg.golden")
}
func TestContainerListFormatSizeSetsOption(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
containerListFunc: func(options types.ContainerListOptions) ([]types.Container, error) {
assert.True(t, options.Size)
return []types.Container{}, nil
},
})
cmd := newListCommand(cli)
cmd.Flags().Set("format", `{{.Size}}`)
assert.NoError(t, cmd.Execute())
}
func TestContainerListWithConfigFormat(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
containerListFunc: func(_ types.ContainerListOptions) ([]types.Container, error) {
return []types.Container{
*Container("c1", WithLabel("some.label", "value")),
*Container("c2", WithName("foo/bar"), WithLabel("foo", "bar")),
}, nil
},
})
cli.SetConfigFile(&configfile.ConfigFile{
PsFormat: "{{ .Names }} {{ .Image }} {{ .Labels }}",
})
cmd := newListCommand(cli)
assert.NoError(t, cmd.Execute())
golden.Assert(t, cli.OutBuffer().String(), "container-list-with-config-format.golden")
}
func TestContainerListWithFormat(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
containerListFunc: func(_ types.ContainerListOptions) ([]types.Container, error) {
return []types.Container{
*Container("c1", WithLabel("some.label", "value")),
*Container("c2", WithName("foo/bar"), WithLabel("foo", "bar")),
}, nil
},
})
cmd := newListCommand(cli)
cmd.Flags().Set("format", "{{ .Names }} {{ .Image }} {{ .Labels }}")
assert.NoError(t, cmd.Execute())
golden.Assert(t, cli.OutBuffer().String(), "container-list-with-format.golden")
}

View File

@ -14,6 +14,7 @@ import (
type logsOptions struct {
follow bool
since string
until string
timestamps bool
details bool
tail string
@ -22,7 +23,7 @@ type logsOptions struct {
}
// NewLogsCommand creates a new cobra.Command for `docker logs`
func NewLogsCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewLogsCommand(dockerCli command.Cli) *cobra.Command {
var opts logsOptions
cmd := &cobra.Command{
@ -38,19 +39,22 @@ func NewLogsCommand(dockerCli *command.DockerCli) *cobra.Command {
flags := cmd.Flags()
flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)")
flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)")
flags.SetAnnotation("until", "version", []string{"1.35"})
flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")
flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs")
flags.StringVar(&opts.tail, "tail", "all", "Number of lines to show from the end of the logs")
return cmd
}
func runLogs(dockerCli *command.DockerCli, opts *logsOptions) error {
func runLogs(dockerCli command.Cli, opts *logsOptions) error {
ctx := context.Background()
options := types.ContainerLogsOptions{
ShowStdout: true,
ShowStderr: true,
Since: opts.since,
Until: opts.until,
Timestamps: opts.timestamps,
Follow: opts.follow,
Tail: opts.tail,

View File

@ -0,0 +1,62 @@
package container
import (
"io"
"io/ioutil"
"strings"
"testing"
"github.com/docker/cli/internal/test"
"github.com/docker/cli/internal/test/testutil"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/stretchr/testify/assert"
)
var logFn = func(expectedOut string) func(string, types.ContainerLogsOptions) (io.ReadCloser, error) {
return func(container string, opts types.ContainerLogsOptions) (io.ReadCloser, error) {
return ioutil.NopCloser(strings.NewReader(expectedOut)), nil
}
}
func TestRunLogs(t *testing.T) {
inspectFn := func(containerID string) (types.ContainerJSON, error) {
return types.ContainerJSON{
Config: &container.Config{Tty: true},
ContainerJSONBase: &types.ContainerJSONBase{State: &types.ContainerState{Running: false}},
}, nil
}
var testcases = []struct {
doc string
options *logsOptions
client fakeClient
expectedError string
expectedOut string
expectedErr string
}{
{
doc: "successful logs",
expectedOut: "foo",
options: &logsOptions{},
client: fakeClient{logFunc: logFn("foo"), inspectFunc: inspectFn},
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
cli := test.NewFakeCli(&testcase.client)
err := runLogs(cli, testcase.options)
if testcase.expectedError != "" {
testutil.ErrorContains(t, err, testcase.expectedError)
} else {
if !assert.NoError(t, err) {
return
}
}
assert.Equal(t, testcase.expectedOut, cli.OutBuffer().String())
assert.Equal(t, testcase.expectedErr, cli.ErrBuffer().String())
})
}
}

View File

@ -11,7 +11,6 @@ import (
"strings"
"time"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/compose/loader"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types/container"
@ -20,6 +19,7 @@ import (
"github.com/docker/docker/pkg/signal"
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
)
@ -145,7 +145,7 @@ func addFlags(flags *pflag.FlagSet) *containerOptions {
expose: opts.NewListOpts(nil),
extraHosts: opts.NewListOpts(opts.ValidateExtraHost),
groupAdd: opts.NewListOpts(nil),
labels: opts.NewListOpts(opts.ValidateEnv),
labels: opts.NewListOpts(nil),
labelsFile: opts.NewListOpts(nil),
linkLocalIPs: opts.NewListOpts(nil),
links: opts.NewListOpts(opts.ValidateLink),
@ -410,7 +410,7 @@ func parse(flags *pflag.FlagSet, copts *containerOptions) (*containerConfig, err
}
// collect all the environment variables for the container
envVariables, err := opts.ReadKVStrings(copts.envFile.GetAll(), copts.env.GetAll())
envVariables, err := opts.ReadKVEnvStrings(copts.envFile.GetAll(), copts.env.GetAll())
if err != nil {
return nil, err
}

View File

@ -43,11 +43,9 @@ func TestValidateAttach(t *testing.T) {
}
}
// nolint: unparam
func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, error) {
flags := pflag.NewFlagSet("run", pflag.ContinueOnError)
flags.SetOutput(ioutil.Discard)
flags.Usage = nil
copts := addFlags(flags)
flags, copts := setupRunFlags()
if err := flags.Parse(args); err != nil {
return nil, nil, nil, err
}
@ -59,6 +57,14 @@ func parseRun(args []string) (*container.Config, *container.HostConfig, *network
return containerConfig.Config, containerConfig.HostConfig, containerConfig.NetworkingConfig, err
}
func setupRunFlags() (*pflag.FlagSet, *containerOptions) {
flags := pflag.NewFlagSet("run", pflag.ContinueOnError)
flags.SetOutput(ioutil.Discard)
flags.Usage = nil
copts := addFlags(flags)
return flags, copts
}
func parseMustError(t *testing.T, args string) {
_, _, _, err := parseRun(strings.Split(args+" ubuntu bash", " "))
assert.Error(t, err, args)
@ -226,20 +232,21 @@ func TestParseWithMacAddress(t *testing.T) {
}
}
func TestParseWithMemory(t *testing.T) {
invalidMemory := "--memory=invalid"
_, _, _, err := parseRun([]string{invalidMemory, "img", "cmd"})
testutil.ErrorContains(t, err, invalidMemory)
func TestRunFlagsParseWithMemory(t *testing.T) {
flags, _ := setupRunFlags()
args := []string{"--memory=invalid", "img", "cmd"}
err := flags.Parse(args)
testutil.ErrorContains(t, err, `invalid argument "invalid" for "-m, --memory" flag`)
_, hostconfig := mustParse(t, "--memory=1G")
assert.Equal(t, int64(1073741824), hostconfig.Memory)
}
func TestParseWithMemorySwap(t *testing.T) {
invalidMemory := "--memory-swap=invalid"
_, _, _, err := parseRun([]string{invalidMemory, "img", "cmd"})
testutil.ErrorContains(t, err, invalidMemory)
flags, _ := setupRunFlags()
args := []string{"--memory-swap=invalid", "img", "cmd"}
err := flags.Parse(args)
testutil.ErrorContains(t, err, `invalid argument "invalid" for "--memory-swap" flag`)
_, hostconfig := mustParse(t, "--memory-swap=1G")
assert.Equal(t, int64(1073741824), hostconfig.MemorySwap)
@ -364,7 +371,10 @@ func TestParseDevice(t *testing.T) {
func TestParseModes(t *testing.T) {
// pid ko
_, _, _, err := parseRun([]string{"--pid=container:", "img", "cmd"})
flags, copts := setupRunFlags()
args := []string{"--pid=container:", "img", "cmd"}
require.NoError(t, flags.Parse(args))
_, err := parse(flags, copts)
testutil.ErrorContains(t, err, "--pid: invalid PID mode")
// pid ok
@ -384,14 +394,18 @@ func TestParseModes(t *testing.T) {
if !hostconfig.UTSMode.Valid() {
t.Fatalf("Expected a valid UTSMode, got %v", hostconfig.UTSMode)
}
}
func TestRunFlagsParseShmSize(t *testing.T) {
// shm-size ko
expectedErr := `invalid argument "a128m" for --shm-size=a128m: invalid size: 'a128m'`
_, _, _, err = parseRun([]string{"--shm-size=a128m", "img", "cmd"})
flags, _ := setupRunFlags()
args := []string{"--shm-size=a128m", "img", "cmd"}
expectedErr := `invalid argument "a128m" for "--shm-size" flag: invalid size: 'a128m'`
err := flags.Parse(args)
testutil.ErrorContains(t, err, expectedErr)
// shm-size ok
_, hostconfig, _, err = parseRun([]string{"--shm-size=128m", "img", "cmd"})
_, hostconfig, _, err := parseRun([]string{"--shm-size=128m", "img", "cmd"})
require.NoError(t, err)
if hostconfig.ShmSize != 134217728 {
t.Fatalf("Expected a valid ShmSize, got %d", hostconfig.ShmSize)

View File

@ -16,7 +16,7 @@ type pauseOptions struct {
}
// NewPauseCommand creates a new cobra.Command for `docker pause`
func NewPauseCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewPauseCommand(dockerCli command.Cli) *cobra.Command {
var opts pauseOptions
return &cobra.Command{
@ -30,7 +30,7 @@ func NewPauseCommand(dockerCli *command.DockerCli) *cobra.Command {
}
}
func runPause(dockerCli *command.DockerCli, opts *pauseOptions) error {
func runPause(dockerCli command.Cli, opts *pauseOptions) error {
ctx := context.Background()
var errs []string

View File

@ -19,7 +19,7 @@ type portOptions struct {
}
// NewPortCommand creates a new cobra.Command for `docker port`
func NewPortCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewPortCommand(dockerCli command.Cli) *cobra.Command {
var opts portOptions
cmd := &cobra.Command{
@ -37,7 +37,7 @@ func NewPortCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runPort(dockerCli *command.DockerCli, opts *portOptions) error {
func runPort(dockerCli command.Cli, opts *portOptions) error {
ctx := context.Background()
c, err := dockerCli.Client().ContainerInspect(ctx, opts.container)

View File

@ -35,7 +35,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
fmt.Fprintln(dockerCli.Out(), "Total reclaimed space:", units.HumanSize(float64(spaceReclaimed)))
return nil
},
Tags: map[string]string{"version": "1.25"},
Annotations: map[string]string{"version": "1.25"},
}
flags := cmd.Flags()
@ -52,12 +52,12 @@ func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint6
pruneFilters := command.PruneFilters(dockerCli, options.filter.Value())
if !options.force && !command.PromptForConfirmation(dockerCli.In(), dockerCli.Out(), warning) {
return
return 0, "", nil
}
report, err := dockerCli.Client().ContainersPrune(context.Background(), pruneFilters)
if err != nil {
return
return 0, "", err
}
if len(report.ContainersDeleted) > 0 {
@ -68,7 +68,7 @@ func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint6
spaceReclaimed = report.SpaceReclaimed
}
return
return spaceReclaimed, output, nil
}
// RunPrune calls the Container Prune API

View File

@ -17,7 +17,7 @@ type renameOptions struct {
}
// NewRenameCommand creates a new cobra.Command for `docker rename`
func NewRenameCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewRenameCommand(dockerCli command.Cli) *cobra.Command {
var opts renameOptions
cmd := &cobra.Command{
@ -33,7 +33,7 @@ func NewRenameCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runRename(dockerCli *command.DockerCli, opts *renameOptions) error {
func runRename(dockerCli command.Cli, opts *renameOptions) error {
ctx := context.Background()
oldName := strings.TrimSpace(opts.oldName)

View File

@ -20,7 +20,7 @@ type restartOptions struct {
}
// NewRestartCommand creates a new cobra.Command for `docker restart`
func NewRestartCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewRestartCommand(dockerCli command.Cli) *cobra.Command {
var opts restartOptions
cmd := &cobra.Command{
@ -39,7 +39,7 @@ func NewRestartCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runRestart(dockerCli *command.DockerCli, opts *restartOptions) error {
func runRestart(dockerCli command.Cli, opts *restartOptions) error {
ctx := context.Background()
var errs []string
var timeout *time.Duration

View File

@ -21,7 +21,7 @@ type rmOptions struct {
}
// NewRmCommand creates a new cobra.Command for `docker rm`
func NewRmCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewRmCommand(dockerCli command.Cli) *cobra.Command {
var opts rmOptions
cmd := &cobra.Command{
@ -41,7 +41,7 @@ func NewRmCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runRm(dockerCli *command.DockerCli, opts *rmOptions) error {
func runRm(dockerCli command.Cli, opts *rmOptions) error {
ctx := context.Background()
var errs []string

View File

@ -10,16 +10,15 @@ import (
"strings"
"syscall"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/promise"
"github.com/docker/docker/pkg/signal"
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
@ -30,10 +29,11 @@ type runOptions struct {
sigProxy bool
name string
detachKeys string
platform string
}
// NewRunCommand create a new `docker run` command
func NewRunCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewRunCommand(dockerCli command.Cli) *cobra.Command {
var opts runOptions
var copts *containerOptions
@ -63,6 +63,7 @@ func NewRunCommand(dockerCli *command.DockerCli) *cobra.Command {
// with hostname
flags.Bool("help", false, "Print usage")
command.AddPlatformFlag(flags, &opts.platform)
command.AddTrustVerificationFlags(flags)
copts = addFlags(flags)
return cmd
@ -97,7 +98,7 @@ func isLocalhost(ip string) bool {
return localhostIPRegexp.MatchString(ip)
}
func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, ropts *runOptions, copts *containerOptions) error {
func runRun(dockerCli command.Cli, flags *pflag.FlagSet, ropts *runOptions, copts *containerOptions) error {
proxyConfig := dockerCli.ConfigFile().ParseProxyConfig(dockerCli.Client().DaemonHost(), copts.env.GetAll())
newEnv := []string{}
for k, v := range proxyConfig {
@ -118,7 +119,7 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, ropts *runOption
}
// nolint: gocyclo
func runContainer(dockerCli *command.DockerCli, opts *runOptions, copts *containerOptions, containerConfig *containerConfig) error {
func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptions, containerConfig *containerConfig) error {
config := containerConfig.Config
hostConfig := containerConfig.HostConfig
stdout, stderr := dockerCli.Out(), dockerCli.Err()
@ -161,7 +162,7 @@ func runContainer(dockerCli *command.DockerCli, opts *runOptions, copts *contain
ctx, cancelFun := context.WithCancel(context.Background())
createResponse, err := createContainer(ctx, dockerCli, containerConfig, opts.name)
createResponse, err := createContainer(ctx, dockerCli, containerConfig, opts.name, opts.platform)
if err != nil {
reportError(stderr, cmdPath, err.Error(), true)
return runStartContainerErr(err)
@ -291,22 +292,27 @@ func attachContainer(
return nil, errAttach
}
*errCh = promise.Go(func() error {
streamer := hijackedIOStreamer{
streams: dockerCli,
inputStream: in,
outputStream: out,
errorStream: cerr,
resp: resp,
tty: config.Tty,
detachKeys: options.DetachKeys,
}
ch := make(chan error, 1)
*errCh = ch
if errHijack := streamer.stream(ctx); errHijack != nil {
return errHijack
}
return errAttach
})
go func() {
ch <- func() error {
streamer := hijackedIOStreamer{
streams: dockerCli,
inputStream: in,
outputStream: out,
errorStream: cerr,
resp: resp,
tty: config.Tty,
detachKeys: options.DetachKeys,
}
if errHijack := streamer.stream(ctx); errHijack != nil {
return errHijack
}
return errAttach
}()
}()
return resp.Close, nil
}

View File

@ -0,0 +1,25 @@
package container
import (
"testing"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/stretchr/testify/assert"
)
func TestRunLabel(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
createContainerFunc: func(_ *container.Config, _ *container.HostConfig, _ *network.NetworkingConfig, _ string) (container.ContainerCreateCreatedBody, error) {
return container.ContainerCreateCreatedBody{
ID: "id",
}, nil
},
Version: "1.36",
})
cmd := NewRunCommand(cli)
cmd.Flags().Set("detach", "true")
cmd.SetArgs([]string{"--label", "foo", "busybox"})
assert.NoError(t, cmd.Execute())
}

View File

@ -9,7 +9,6 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/promise"
"github.com/docker/docker/pkg/signal"
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
@ -28,7 +27,7 @@ type startOptions struct {
}
// NewStartCommand creates a new cobra.Command for `docker start`
func NewStartCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewStartCommand(dockerCli command.Cli) *cobra.Command {
var opts startOptions
cmd := &cobra.Command{
@ -54,7 +53,7 @@ func NewStartCommand(dockerCli *command.DockerCli) *cobra.Command {
}
// nolint: gocyclo
func runStart(dockerCli *command.DockerCli, opts *startOptions) error {
func runStart(dockerCli command.Cli, opts *startOptions) error {
ctx, cancelFun := context.WithCancel(context.Background())
if opts.attach || opts.openStdin {
@ -103,23 +102,28 @@ func runStart(dockerCli *command.DockerCli, opts *startOptions) error {
return errAttach
}
defer resp.Close()
cErr := promise.Go(func() error {
streamer := hijackedIOStreamer{
streams: dockerCli,
inputStream: in,
outputStream: dockerCli.Out(),
errorStream: dockerCli.Err(),
resp: resp,
tty: c.Config.Tty,
detachKeys: options.DetachKeys,
}
errHijack := streamer.stream(ctx)
if errHijack == nil {
return errAttach
}
return errHijack
})
cErr := make(chan error, 1)
go func() {
cErr <- func() error {
streamer := hijackedIOStreamer{
streams: dockerCli,
inputStream: in,
outputStream: dockerCli.Out(),
errorStream: dockerCli.Err(),
resp: resp,
tty: c.Config.Tty,
detachKeys: options.DetachKeys,
}
errHijack := streamer.stream(ctx)
if errHijack == nil {
return errAttach
}
return errHijack
}()
}()
// 3. We should open a channel for receiving status code of the container
// no matter it's detached, removed on daemon side(--rm) or exit normally.
@ -177,7 +181,7 @@ func runStart(dockerCli *command.DockerCli, opts *startOptions) error {
return nil
}
func startContainersWithoutAttachments(ctx context.Context, dockerCli *command.DockerCli, containers []string) error {
func startContainersWithoutAttachments(ctx context.Context, dockerCli command.Cli, containers []string) error {
var failedContainers []string
for _, container := range containers {
if err := dockerCli.Client().ContainerStart(ctx, container, types.ContainerStartOptions{}); err != nil {

View File

@ -21,12 +21,13 @@ import (
type statsOptions struct {
all bool
noStream bool
noTrunc bool
format string
containers []string
}
// NewStatsCommand creates a new cobra.Command for `docker stats`
func NewStatsCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewStatsCommand(dockerCli command.Cli) *cobra.Command {
var opts statsOptions
cmd := &cobra.Command{
@ -42,6 +43,7 @@ func NewStatsCommand(dockerCli *command.DockerCli) *cobra.Command {
flags := cmd.Flags()
flags.BoolVarP(&opts.all, "all", "a", false, "Show all containers (default shows just running)")
flags.BoolVar(&opts.noStream, "no-stream", false, "Disable streaming stats and only pull the first result")
flags.BoolVar(&opts.noTrunc, "no-trunc", false, "Do not truncate output")
flags.StringVar(&opts.format, "format", "", "Pretty-print images using a Go template")
return cmd
}
@ -49,7 +51,7 @@ func NewStatsCommand(dockerCli *command.DockerCli) *cobra.Command {
// runStats displays a live stream of resource usage statistics for one or more containers.
// This shows real-time information on CPU usage, memory usage, and network I/O.
// nolint: gocyclo
func runStats(dockerCli *command.DockerCli, opts *statsOptions) error {
func runStats(dockerCli command.Cli, opts *statsOptions) error {
showAll := len(opts.containers) == 0
closeChan := make(chan error)
@ -214,7 +216,7 @@ func runStats(dockerCli *command.DockerCli, opts *statsOptions) error {
ccstats = append(ccstats, c.GetStatistics())
}
cStats.mu.Unlock()
if err = formatter.ContainerStatsWrite(statsCtx, ccstats, daemonOSType); err != nil {
if err = formatter.ContainerStatsWrite(statsCtx, ccstats, daemonOSType, !opts.noTrunc); err != nil {
break
}
if len(cStats.cs) == 0 && !showAll {

View File

@ -7,11 +7,11 @@ import (
"sync"
"time"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
@ -200,7 +200,8 @@ func calculateCPUPercentWindows(v *types.StatsJSON) float64 {
return 0.00
}
func calculateBlockIO(blkio types.BlkioStats) (blkRead uint64, blkWrite uint64) {
func calculateBlockIO(blkio types.BlkioStats) (uint64, uint64) {
var blkRead, blkWrite uint64
for _, bioEntry := range blkio.IoServiceBytesRecursive {
switch strings.ToLower(bioEntry.Op) {
case "read":
@ -209,7 +210,7 @@ func calculateBlockIO(blkio types.BlkioStats) (blkRead uint64, blkWrite uint64)
blkWrite = blkWrite + bioEntry.Value
}
}
return
return blkRead, blkWrite
}
func calculateNetwork(network map[string]types.NetworkStats) (float64, float64) {

View File

@ -20,7 +20,7 @@ type stopOptions struct {
}
// NewStopCommand creates a new cobra.Command for `docker stop`
func NewStopCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewStopCommand(dockerCli command.Cli) *cobra.Command {
var opts stopOptions
cmd := &cobra.Command{
@ -39,7 +39,7 @@ func NewStopCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runStop(dockerCli *command.DockerCli, opts *stopOptions) error {
func runStop(dockerCli command.Cli, opts *stopOptions) error {
ctx := context.Background()
var timeout *time.Duration

View File

@ -0,0 +1,2 @@
c1 c1
c2 c2

View File

@ -0,0 +1,2 @@
c1 value
c2

View File

@ -0,0 +1,2 @@
c1 busybox:latest some.label=value
c2 busybox:latest foo=bar

View File

@ -0,0 +1,2 @@
c1 busybox:latest some.label=value
c2 busybox:latest foo=bar

View File

@ -0,0 +1,3 @@
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
container_id busybox:latest "top" Less than a second ago Up 1 second c1
container_id busybox:latest "top" Less than a second ago Up 1 second c2,foo/bar

View File

@ -0,0 +1,6 @@
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
container_id busybox:latest "top" Less than a second ago Up 1 second c1
container_id busybox:latest "top" Less than a second ago Up 1 second c2
container_id busybox:latest "top" Less than a second ago Up 1 second 80-82/tcp c3
container_id busybox:latest "top" Less than a second ago Up 1 second 81/udp c4
container_id busybox:latest "top" Less than a second ago Up 1 second 8.8.8.8:82->82/tcp c5

View File

@ -18,7 +18,7 @@ type topOptions struct {
}
// NewTopCommand creates a new cobra.Command for `docker top`
func NewTopCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewTopCommand(dockerCli command.Cli) *cobra.Command {
var opts topOptions
cmd := &cobra.Command{
@ -38,7 +38,7 @@ func NewTopCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runTop(dockerCli *command.DockerCli, opts *topOptions) error {
func runTop(dockerCli command.Cli, opts *topOptions) error {
ctx := context.Background()
procList, err := dockerCli.Client().ContainerTop(ctx, opts.container, opts.args)

View File

@ -7,11 +7,11 @@ import (
"runtime"
"time"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/signal"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)

View File

@ -16,7 +16,7 @@ type unpauseOptions struct {
}
// NewUnpauseCommand creates a new cobra.Command for `docker unpause`
func NewUnpauseCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewUnpauseCommand(dockerCli command.Cli) *cobra.Command {
var opts unpauseOptions
cmd := &cobra.Command{
@ -31,7 +31,7 @@ func NewUnpauseCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runUnpause(dockerCli *command.DockerCli, opts *unpauseOptions) error {
func runUnpause(dockerCli command.Cli, opts *unpauseOptions) error {
ctx := context.Background()
var errs []string

View File

@ -35,7 +35,7 @@ type updateOptions struct {
}
// NewUpdateCommand creates a new cobra.Command for `docker update`
func NewUpdateCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewUpdateCommand(dockerCli command.Cli) *cobra.Command {
var options updateOptions
cmd := &cobra.Command{
@ -72,7 +72,7 @@ func NewUpdateCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runUpdate(dockerCli *command.DockerCli, options *updateOptions) error {
func runUpdate(dockerCli command.Cli, options *updateOptions) error {
var err error
if options.nFlag == 0 {

View File

@ -3,17 +3,17 @@ package container
import (
"strconv"
"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/versions"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
func waitExitOrRemoved(ctx context.Context, dockerCli *command.DockerCli, containerID string, waitRemove bool) <-chan int {
func waitExitOrRemoved(ctx context.Context, dockerCli command.Cli, containerID string, waitRemove bool) <-chan int {
if len(containerID) == 0 {
// containerID can never be empty
panic("Internal Error: waitExitOrRemoved needs a containerID as parameter")
@ -37,7 +37,12 @@ func waitExitOrRemoved(ctx context.Context, dockerCli *command.DockerCli, contai
go func() {
select {
case result := <-resultC:
statusC <- int(result.StatusCode)
if result.Error != nil {
logrus.Errorf("Error waiting for container: %v", result.Error.Message)
statusC <- 125
} else {
statusC <- int(result.StatusCode)
}
case err := <-errC:
logrus.Errorf("error waiting for container: %v", err)
statusC <- 125
@ -47,7 +52,7 @@ func waitExitOrRemoved(ctx context.Context, dockerCli *command.DockerCli, contai
return statusC
}
func legacyWaitExitOrRemoved(ctx context.Context, dockerCli *command.DockerCli, containerID string, waitRemove bool) <-chan int {
func legacyWaitExitOrRemoved(ctx context.Context, dockerCli command.Cli, containerID string, waitRemove bool) <-chan int {
var removeErr error
statusChan := make(chan int)
exitCode := 125

View File

@ -0,0 +1,69 @@
package container
import (
"strings"
"testing"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types/container"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)
func waitFn(cid string) (<-chan container.ContainerWaitOKBody, <-chan error) {
resC := make(chan container.ContainerWaitOKBody)
errC := make(chan error, 1)
var res container.ContainerWaitOKBody
go func() {
switch {
case strings.Contains(cid, "exit-code-42"):
res.StatusCode = 42
resC <- res
case strings.Contains(cid, "non-existent"):
err := errors.Errorf("No such container: %v", cid)
errC <- err
case strings.Contains(cid, "wait-error"):
res.Error = &container.ContainerWaitOKBodyError{Message: "removal failed"}
resC <- res
default:
// normal exit
resC <- res
}
}()
return resC, errC
}
func TestWaitExitOrRemoved(t *testing.T) {
testcases := []struct {
cid string
exitCode int
}{
{
cid: "normal-container",
exitCode: 0,
},
{
cid: "give-me-exit-code-42",
exitCode: 42,
},
{
cid: "i-want-a-wait-error",
exitCode: 125,
},
{
cid: "non-existent-container-id",
exitCode: 125,
},
}
client := test.NewFakeCli(&fakeClient{waitFunc: waitFn, Version: api.DefaultVersion})
for _, testcase := range testcases {
statusC := waitExitOrRemoved(context.Background(), client, testcase.cid, true)
exitCode := <-statusC
assert.Equal(t, testcase.exitCode, exitCode)
}
}

View File

@ -16,7 +16,7 @@ type waitOptions struct {
}
// NewWaitCommand creates a new cobra.Command for `docker wait`
func NewWaitCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewWaitCommand(dockerCli command.Cli) *cobra.Command {
var opts waitOptions
cmd := &cobra.Command{
@ -32,7 +32,7 @@ func NewWaitCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runWait(dockerCli *command.DockerCli, opts *waitOptions) error {
func runWait(dockerCli command.Cli, opts *waitOptions) error {
ctx := context.Background()
var errs []string

View File

@ -3,8 +3,8 @@ package command
import (
"sync"
"github.com/Sirupsen/logrus"
eventtypes "github.com/docker/docker/api/types/events"
"github.com/sirupsen/logrus"
)
// EventHandler is abstract interface for user to customize

View File

@ -10,7 +10,6 @@ import (
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/stringutils"
"github.com/docker/go-units"
)
@ -165,7 +164,7 @@ func (c *containerContext) Image() string {
func (c *containerContext) Command() string {
command := c.c.Command
if c.trunc {
command = stringutils.Ellipsis(command, 20)
command = Ellipsis(command, 20)
}
return strconv.Quote(command)
}
@ -227,7 +226,7 @@ func (c *containerContext) Mounts() string {
name = m.Name
}
if c.trunc {
name = stringutils.Ellipsis(name, 15)
name = Ellipsis(name, 15)
}
mounts = append(mounts, name)
}

View File

@ -10,6 +10,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stringid"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@ -65,7 +66,7 @@ func TestContainerPsContext(t *testing.T) {
Source: "/a/path",
},
},
}, true, "this-is-a-lo...", ctx.Mounts},
}, true, "this-is-a-long…", ctx.Mounts},
{types.Container{
Mounts: []types.MountPoint{
{
@ -230,10 +231,7 @@ size: 0B
// Special headers for customized table format
{
Context{Format: NewContainerFormat(`table {{truncate .ID 5}}\t{{json .Image}} {{.RunningFor}}/{{title .Status}}/{{pad .Ports 2 2}}.{{upper .Names}} {{lower .Status}}`, false, true)},
`CONTAINER ID IMAGE CREATED/STATUS/ PORTS .NAMES STATUS
conta "ubuntu" 24 hours ago//.FOOBAR_BAZ
conta "ubuntu" 24 hours ago//.FOOBAR_BAR
`,
string(golden.Get(t, "container-context-write-special-headers.golden")),
},
}
@ -644,9 +642,12 @@ func TestDisplayablePorts(t *testing.T) {
PublicPort: 1024,
PrivatePort: 80,
Type: "udp",
}, {
PrivatePort: 12345,
Type: "sctp",
},
},
"80/tcp, 80/udp, 1024/tcp, 1024/udp, 1.1.1.1:1024->80/tcp, 1.1.1.1:1024->80/udp, 2.1.1.1:1024->80/tcp, 2.1.1.1:1024->80/udp, 1.1.1.1:80->1024/tcp, 1.1.1.1:80->1024/udp, 2.1.1.1:80->1024/tcp, 2.1.1.1:80->1024/udp",
"80/tcp, 80/udp, 1024/tcp, 1024/udp, 12345/sctp, 1.1.1.1:1024->80/tcp, 1.1.1.1:1024->80/udp, 2.1.1.1:1024->80/tcp, 2.1.1.1:1024->80/udp, 1.1.1.1:80->1024/tcp, 1.1.1.1:80->1024/udp, 2.1.1.1:80->1024/tcp, 2.1.1.1:80->1024/udp",
},
}

View File

@ -118,11 +118,11 @@ func (ctx *DiskUsageContext) Write() (err error) {
return err
}
func (ctx *DiskUsageContext) verboseWrite() (err error) {
func (ctx *DiskUsageContext) verboseWrite() error {
// First images
tmpl, err := ctx.startSubsection(defaultDiskUsageImageTableFormat)
if err != nil {
return
return err
}
ctx.Output.Write([]byte("Images space usage:\n\n"))
@ -141,14 +141,14 @@ func (ctx *DiskUsageContext) verboseWrite() (err error) {
}
}
err = ctx.contextFormat(tmpl, &imageContext{
err := ctx.contextFormat(tmpl, &imageContext{
repo: repo,
tag: tag,
trunc: true,
i: *i,
})
if err != nil {
return
return err
}
}
ctx.postFormat(tmpl, newImageContext())
@ -157,17 +157,14 @@ func (ctx *DiskUsageContext) verboseWrite() (err error) {
ctx.Output.Write([]byte("\nContainers space usage:\n\n"))
tmpl, err = ctx.startSubsection(defaultDiskUsageContainerTableFormat)
if err != nil {
return
return err
}
for _, c := range ctx.Containers {
// Don't display the virtual size
c.SizeRootFs = 0
err = ctx.contextFormat(tmpl, &containerContext{
trunc: true,
c: *c,
})
err := ctx.contextFormat(tmpl, &containerContext{trunc: true, c: *c})
if err != nil {
return
return err
}
}
ctx.postFormat(tmpl, newContainerContext())
@ -176,21 +173,18 @@ func (ctx *DiskUsageContext) verboseWrite() (err error) {
ctx.Output.Write([]byte("\nLocal Volumes space usage:\n\n"))
tmpl, err = ctx.startSubsection(defaultDiskUsageVolumeTableFormat)
if err != nil {
return
return err
}
for _, v := range ctx.Volumes {
err = ctx.contextFormat(tmpl, &volumeContext{
v: *v,
})
if err != nil {
return
if err := ctx.contextFormat(tmpl, &volumeContext{v: *v}); err != nil {
return err
}
}
ctx.postFormat(tmpl, newVolumeContext())
// And build cache
fmt.Fprintf(ctx.Output, "\nBuild cache usage: %s\n\n", units.HumanSize(float64(ctx.BuilderSize)))
return
return nil
}
type diskUsageImagesContext struct {

View File

@ -4,6 +4,7 @@ import (
"bytes"
"testing"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
)
@ -83,12 +84,7 @@ Build Cache 0B
Format: NewDiskUsageFormat("table {{.Type}}\t{{.Active}}"),
},
},
`TYPE ACTIVE
Images 0
Containers 0
Local Volumes 0
Build Cache
`,
string(golden.Get(t, "disk-usage-context-write-custom.golden")),
},
// Raw Format
{
@ -97,31 +93,7 @@ Build Cache
Format: NewDiskUsageFormat("raw"),
},
},
`type: Images
total: 0
active: 0
size: 0B
reclaimable: 0B
type: Containers
total: 0
active: 0
size: 0B
reclaimable: 0B
type: Local Volumes
total: 0
active: 0
size: 0B
reclaimable: 0B
type: Build Cache
total:
active:
size: 0B
reclaimable: 0B
`,
string(golden.Get(t, "disk-usage-raw-format.golden")),
},
}

View File

@ -0,0 +1,61 @@
package formatter
import (
"unicode/utf8"
"golang.org/x/text/width"
)
// charWidth returns the number of horizontal positions a character occupies,
// and is used to account for wide characters when displaying strings.
//
// In a broad sense, wide characters include East Asian Wide, East Asian Full-width,
// (when not in East Asian context) see http://unicode.org/reports/tr11/.
func charWidth(r rune) int {
switch width.LookupRune(r).Kind() {
case width.EastAsianWide, width.EastAsianFullwidth:
return 2
default:
return 1
}
}
// Ellipsis truncates a string to fit within maxDisplayWidth, and appends ellipsis (…).
// For maxDisplayWidth of 1 and lower, no ellipsis is appended.
// For maxDisplayWidth of 1, first char of string will return even if its width > 1.
func Ellipsis(s string, maxDisplayWidth int) string {
if maxDisplayWidth <= 0 {
return ""
}
rs := []rune(s)
if maxDisplayWidth == 1 {
return string(rs[0])
}
byteLen := len(s)
if byteLen == utf8.RuneCountInString(s) {
if byteLen <= maxDisplayWidth {
return s
}
return string(rs[:maxDisplayWidth-1]) + "…"
}
var (
display []int
displayWidth int
)
for _, r := range rs {
cw := charWidth(r)
displayWidth += cw
display = append(display, displayWidth)
}
if displayWidth <= maxDisplayWidth {
return s
}
for i := range display {
if display[i] <= maxDisplayWidth-1 && display[i+1] > maxDisplayWidth-1 {
return string(rs[:i+1]) + "…"
}
}
return s
}

View File

@ -0,0 +1,30 @@
package formatter
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestEllipsis(t *testing.T) {
var testcases = []struct {
source string
width int
expected string
}{
{source: "t🐳ststring", width: 0, expected: ""},
{source: "t🐳ststring", width: 1, expected: "t"},
{source: "t🐳ststring", width: 2, expected: "t…"},
{source: "t🐳ststring", width: 6, expected: "t🐳st…"},
{source: "t🐳ststring", width: 20, expected: "t🐳ststring"},
{source: "你好世界teststring", width: 0, expected: ""},
{source: "你好世界teststring", width: 1, expected: "你"},
{source: "你好世界teststring", width: 3, expected: "你…"},
{source: "你好世界teststring", width: 6, expected: "你好…"},
{source: "你好世界teststring", width: 20, expected: "你好世界teststring"},
}
for _, testcase := range testcases {
assert.Equal(t, testcase.expected, Ellipsis(testcase.source, testcase.width))
}
}

View File

@ -7,7 +7,6 @@ import (
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/stringutils"
units "github.com/docker/go-units"
)
@ -93,7 +92,7 @@ func (c *historyContext) CreatedSince() string {
func (c *historyContext) CreatedBy() string {
createdBy := strings.Replace(c.h.CreatedBy, "\t", " ", -1)
if c.trunc {
return stringutils.Ellipsis(createdBy, 45)
return Ellipsis(createdBy, 45)
}
return createdBy
}

View File

@ -10,7 +10,6 @@ import (
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/stringutils"
"github.com/stretchr/testify/assert"
)
@ -96,7 +95,7 @@ func TestHistoryContext_CreatedBy(t *testing.T) {
historyContext{
h: image.HistoryResponseItem{CreatedBy: withTabs},
trunc: true,
}, stringutils.Ellipsis(expected, 45), ctx.CreatedBy,
}, Ellipsis(expected, 45), ctx.CreatedBy,
},
}
@ -191,7 +190,7 @@ imageID3 24 hours ago /bin/bash ls
imageID4 24 hours ago /bin/bash grep 183MB Hi
`
expectedTrunc := `IMAGE CREATED CREATED BY SIZE COMMENT
imageID1 24 hours ago /bin/bash ls && npm i && npm run test && k... 183MB Hi
imageID1 24 hours ago /bin/bash ls && npm i && npm run test && kar… 183MB Hi
imageID2 24 hours ago /bin/bash echo 183MB Hi
imageID3 24 hours ago /bin/bash ls 183MB Hi
imageID4 24 hours ago /bin/bash grep 183MB Hi

View File

@ -14,7 +14,7 @@ import (
)
const (
defaultNodeTableFormat = "table {{.ID}} {{if .Self}}*{{else}} {{ end }}\t{{.Hostname}}\t{{.Status}}\t{{.Availability}}\t{{.ManagerStatus}}"
defaultNodeTableFormat = "table {{.ID}} {{if .Self}}*{{else}} {{ end }}\t{{.Hostname}}\t{{.Status}}\t{{.Availability}}\t{{.ManagerStatus}}\t{{.EngineVersion}}"
nodeInspectPrettyTemplate Format = `ID: {{.ID}}
{{- if .Name }}
Name: {{.Name}}
@ -75,6 +75,7 @@ TLS Info:
hostnameHeader = "HOSTNAME"
availabilityHeader = "AVAILABILITY"
managerStatusHeader = "MANAGER STATUS"
engineVersionHeader = "ENGINE VERSION"
tlsStatusHeader = "TLS STATUS"
)
@ -115,6 +116,7 @@ func NodeWrite(ctx Context, nodes []swarm.Node, info types.Info) error {
"Status": statusHeader,
"Availability": availabilityHeader,
"ManagerStatus": managerStatusHeader,
"EngineVersion": engineVersionHeader,
"TLSStatus": tlsStatusHeader,
}
nodeCtx := nodeContext{}
@ -176,6 +178,10 @@ func (c *nodeContext) TLSStatus() string {
return "Needs Rotation"
}
func (c *nodeContext) EngineVersion() string {
return c.n.Description.Engine.EngineVersion
}
// NodeInspectWrite renders the context for a list of nodes
func NodeInspectWrite(ctx Context, refs []string, getRef inspect.GetRefFunc) error {
if ctx.Format != nodeInspectPrettyTemplate {

View File

@ -74,10 +74,10 @@ func TestNodeContextWrite(t *testing.T) {
// Table format
{
context: Context{Format: NewNodeFormat("table", false)},
expected: `ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
nodeID1 foobar_baz Foo Drain Leader
nodeID2 foobar_bar Bar Active Reachable
nodeID3 foobar_boo Boo Active ` + "\n", // (to preserve whitespace)
expected: `ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
nodeID1 foobar_baz Foo Drain Leader 18.03.0-ce
nodeID2 foobar_bar Bar Active Reachable 1.2.3
nodeID3 foobar_boo Boo Active ` + "\n", // (to preserve whitespace)
clusterInfo: swarm.ClusterInfo{TLSInfo: swarm.TLSInfo{TrustRoot: "hi"}},
},
{
@ -172,6 +172,7 @@ foobar_boo Unknown
Description: swarm.NodeDescription{
Hostname: "foobar_baz",
TLSInfo: swarm.TLSInfo{TrustRoot: "no"},
Engine: swarm.EngineDescription{EngineVersion: "18.03.0-ce"},
},
Status: swarm.NodeStatus{State: swarm.NodeState("foo")},
Spec: swarm.NodeSpec{Availability: swarm.NodeAvailability("drain")},
@ -182,6 +183,7 @@ foobar_boo Unknown
Description: swarm.NodeDescription{
Hostname: "foobar_bar",
TLSInfo: swarm.TLSInfo{TrustRoot: "hi"},
Engine: swarm.EngineDescription{EngineVersion: "1.2.3"},
},
Status: swarm.NodeStatus{State: swarm.NodeState("bar")},
Spec: swarm.NodeSpec{Availability: swarm.NodeAvailability("active")},
@ -215,17 +217,17 @@ func TestNodeContextWriteJSON(t *testing.T) {
}{
{
expected: []map[string]interface{}{
{"Availability": "", "Hostname": "foobar_baz", "ID": "nodeID1", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown"},
{"Availability": "", "Hostname": "foobar_bar", "ID": "nodeID2", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown"},
{"Availability": "", "Hostname": "foobar_boo", "ID": "nodeID3", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown"},
{"Availability": "", "Hostname": "foobar_baz", "ID": "nodeID1", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown", "EngineVersion": "1.2.3"},
{"Availability": "", "Hostname": "foobar_bar", "ID": "nodeID2", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown", "EngineVersion": ""},
{"Availability": "", "Hostname": "foobar_boo", "ID": "nodeID3", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown", "EngineVersion": "18.03.0-ce"},
},
info: types.Info{},
},
{
expected: []map[string]interface{}{
{"Availability": "", "Hostname": "foobar_baz", "ID": "nodeID1", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Ready"},
{"Availability": "", "Hostname": "foobar_bar", "ID": "nodeID2", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Needs Rotation"},
{"Availability": "", "Hostname": "foobar_boo", "ID": "nodeID3", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown"},
{"Availability": "", "Hostname": "foobar_baz", "ID": "nodeID1", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Ready", "EngineVersion": "1.2.3"},
{"Availability": "", "Hostname": "foobar_bar", "ID": "nodeID2", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Needs Rotation", "EngineVersion": ""},
{"Availability": "", "Hostname": "foobar_boo", "ID": "nodeID3", "ManagerStatus": "", "Status": "", "Self": false, "TLSStatus": "Unknown", "EngineVersion": "18.03.0-ce"},
},
info: types.Info{
Swarm: swarm.Info{
@ -240,9 +242,9 @@ func TestNodeContextWriteJSON(t *testing.T) {
for _, testcase := range cases {
nodes := []swarm.Node{
{ID: "nodeID1", Description: swarm.NodeDescription{Hostname: "foobar_baz", TLSInfo: swarm.TLSInfo{TrustRoot: "hi"}}},
{ID: "nodeID1", Description: swarm.NodeDescription{Hostname: "foobar_baz", TLSInfo: swarm.TLSInfo{TrustRoot: "hi"}, Engine: swarm.EngineDescription{EngineVersion: "1.2.3"}}},
{ID: "nodeID2", Description: swarm.NodeDescription{Hostname: "foobar_bar", TLSInfo: swarm.TLSInfo{TrustRoot: "no"}}},
{ID: "nodeID3", Description: swarm.NodeDescription{Hostname: "foobar_boo"}},
{ID: "nodeID3", Description: swarm.NodeDescription{Hostname: "foobar_boo", Engine: swarm.EngineDescription{EngineVersion: "18.03.0-ce"}}},
}
out := bytes.NewBufferString("")
err := NodeWrite(Context{Format: "{{json .}}", Output: out}, nodes, testcase.info)

View File

@ -5,7 +5,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/stringutils"
)
const (
@ -80,7 +79,7 @@ func (c *pluginContext) Description() string {
desc := strings.Replace(c.p.Config.Description, "\n", "", -1)
desc = strings.Replace(desc, "\r", "", -1)
if c.trunc {
desc = stringutils.Ellipsis(desc, 45)
desc = Ellipsis(desc, 45)
}
return desc

View File

@ -5,7 +5,6 @@ import (
"strings"
registry "github.com/docker/docker/api/types/registry"
"github.com/docker/docker/pkg/stringutils"
)
const (
@ -73,7 +72,7 @@ func (c *searchContext) Description() string {
desc := strings.Replace(c.s.Description, "\n", " ", -1)
desc = strings.Replace(desc, "\r", " ", -1)
if c.trunc {
desc = stringutils.Ellipsis(desc, 45)
desc = Ellipsis(desc, 45)
}
return desc
}

View File

@ -7,7 +7,7 @@ import (
"testing"
registrytypes "github.com/docker/docker/api/types/registry"
"github.com/docker/docker/pkg/stringutils"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
)
@ -78,7 +78,7 @@ func TestSearchContextDescription(t *testing.T) {
{searchContext{
s: registrytypes.SearchResult{Description: longDescription},
trunc: true,
}, stringutils.Ellipsis(longDescription, 45), ctx.Description},
}, Ellipsis(longDescription, 45), ctx.Description},
{searchContext{
s: registrytypes.SearchResult{Description: descriptionWReturns},
trunc: false,
@ -86,7 +86,7 @@ func TestSearchContextDescription(t *testing.T) {
{searchContext{
s: registrytypes.SearchResult{Description: descriptionWReturns},
trunc: true,
}, stringutils.Ellipsis(longDescription, 45), ctx.Description},
}, Ellipsis(longDescription, 45), ctx.Description},
}
for _, c := range cases {
@ -120,10 +120,7 @@ func TestSearchContextWrite(t *testing.T) {
// Table format
{
Context{Format: NewSearchFormat("table")},
`NAME DESCRIPTION STARS OFFICIAL AUTOMATED
result1 Official build 5000 [OK]
result2 Not official 5 [OK]
`,
string(golden.Get(t, "search-context-write-table.golden")),
},
{
Context{Format: NewSearchFormat("table {{.Name}}")},
@ -210,9 +207,7 @@ func TestSearchContextWriteStars(t *testing.T) {
// Table format
{
Context{Format: NewSearchFormat("table")},
`NAME DESCRIPTION STARS OFFICIAL AUTOMATED
result1 Official build 5000 [OK]
`,
string(golden.Get(t, "search-context-write-stars-table.golden")),
},
{
Context{Format: NewSearchFormat("table {{.Name}}")},

View File

@ -12,19 +12,20 @@ import (
)
const (
defaultSecretTableFormat = "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}"
defaultSecretTableFormat = "table {{.ID}}\t{{.Name}}\t{{.Driver}}\t{{.CreatedAt}}\t{{.UpdatedAt}}"
secretIDHeader = "ID"
secretCreatedHeader = "CREATED"
secretUpdatedHeader = "UPDATED"
secretInspectPrettyTemplate Format = `ID: {{.ID}}
Name: {{.Name}}
secretInspectPrettyTemplate Format = `ID: {{.ID}}
Name: {{.Name}}
{{- if .Labels }}
Labels:
{{- range $k, $v := .Labels }}
- {{ $k }}{{if $v }}={{ $v }}{{ end }}
{{- end }}{{ end }}
Created at: {{.CreatedAt}}
Updated at: {{.UpdatedAt}}`
Driver: {{.Driver}}
Created at: {{.CreatedAt}}
Updated at: {{.UpdatedAt}}`
)
// NewSecretFormat returns a Format for rendering using a secret Context
@ -61,6 +62,7 @@ func newSecretContext() *secretContext {
sCtx.header = map[string]string{
"ID": secretIDHeader,
"Name": nameHeader,
"Driver": driverHeader,
"CreatedAt": secretCreatedHeader,
"UpdatedAt": secretUpdatedHeader,
"Labels": labelsHeader,
@ -89,6 +91,13 @@ func (c *secretContext) CreatedAt() string {
return units.HumanDuration(time.Now().UTC().Sub(c.s.Meta.CreatedAt)) + " ago"
}
func (c *secretContext) Driver() string {
if c.s.Spec.Driver == nil {
return ""
}
return c.s.Spec.Driver.Name
}
func (c *secretContext) UpdatedAt() string {
return units.HumanDuration(time.Now().UTC().Sub(c.s.Meta.UpdatedAt)) + " ago"
}
@ -153,6 +162,13 @@ func (ctx *secretInspectContext) Labels() map[string]string {
return ctx.Secret.Spec.Labels
}
func (ctx *secretInspectContext) Driver() string {
if ctx.Secret.Spec.Driver == nil {
return ""
}
return ctx.Secret.Spec.Driver.Name
}
func (ctx *secretInspectContext) CreatedAt() string {
return command.PrettyPrint(ctx.Secret.CreatedAt)
}

View File

@ -28,9 +28,9 @@ func TestSecretContextFormatWrite(t *testing.T) {
},
// Table format
{Context{Format: NewSecretFormat("table", false)},
`ID NAME CREATED UPDATED
1 passwords Less than a second ago Less than a second ago
2 id_rsa Less than a second ago Less than a second ago
`ID NAME DRIVER CREATED UPDATED
1 passwords Less than a second ago Less than a second ago
2 id_rsa Less than a second ago Less than a second ago
`},
{Context{Format: NewSecretFormat("table {{.Name}}", true)},
`NAME

View File

@ -2,6 +2,7 @@ package formatter
import (
"fmt"
"sort"
"strings"
"time"
@ -504,7 +505,10 @@ func (c *serviceContext) Replicas() string {
}
func (c *serviceContext) Image() string {
image := c.service.Spec.TaskTemplate.ContainerSpec.Image
var image string
if c.service.Spec.TaskTemplate.ContainerSpec != nil {
image = c.service.Spec.TaskTemplate.ContainerSpec.Image
}
if ref, err := reference.ParseNormalizedNamed(image); err == nil {
// update image string for display, (strips any digest)
if nt, ok := ref.(reference.NamedTagged); ok {
@ -517,19 +521,95 @@ func (c *serviceContext) Image() string {
return image
}
type portRange struct {
pStart uint32
pEnd uint32
tStart uint32
tEnd uint32
protocol swarm.PortConfigProtocol
}
func (pr portRange) String() string {
var (
pub string
tgt string
)
if pr.pEnd > pr.pStart {
pub = fmt.Sprintf("%d-%d", pr.pStart, pr.pEnd)
} else {
pub = fmt.Sprintf("%d", pr.pStart)
}
if pr.tEnd > pr.tStart {
tgt = fmt.Sprintf("%d-%d", pr.tStart, pr.tEnd)
} else {
tgt = fmt.Sprintf("%d", pr.tStart)
}
return fmt.Sprintf("*:%s->%s/%s", pub, tgt, pr.protocol)
}
// Ports formats published ports on the ingress network for output.
//
// Where possible, ranges are grouped to produce a compact output:
// - multiple ports mapped to a single port (80->80, 81->80); is formatted as *:80-81->80
// - multiple consecutive ports on both sides; (80->80, 81->81) are formatted as: *:80-81->80-81
//
// The above should not be grouped together, i.e.:
// - 80->80, 81->81, 82->80 should be presented as : *:80-81->80-81, *:82->80
//
// TODO improve:
// - combine non-consecutive ports mapped to a single port (80->80, 81->80, 84->80, 86->80, 87->80); to be printed as *:80-81,84,86-87->80
// - combine tcp and udp mappings if their port-mapping is exactly the same (*:80-81->80-81/tcp+udp instead of *:80-81->80-81/tcp, *:80-81->80-81/udp)
func (c *serviceContext) Ports() string {
if c.service.Endpoint.Ports == nil {
return ""
}
pr := portRange{}
ports := []string{}
for _, pConfig := range c.service.Endpoint.Ports {
if pConfig.PublishMode == swarm.PortConfigPublishModeIngress {
ports = append(ports, fmt.Sprintf("*:%d->%d/%s",
pConfig.PublishedPort,
pConfig.TargetPort,
pConfig.Protocol,
))
sort.Sort(byProtocolAndPublishedPort(c.service.Endpoint.Ports))
for _, p := range c.service.Endpoint.Ports {
if p.PublishMode == swarm.PortConfigPublishModeIngress {
prIsRange := pr.tEnd != pr.tStart
tOverlaps := p.TargetPort <= pr.tEnd
// Start a new port-range if:
// - the protocol is different from the current port-range
// - published or target port are not consecutive to the current port-range
// - the current port-range is a _range_, and the target port overlaps with the current range's target-ports
if p.Protocol != pr.protocol || p.PublishedPort-pr.pEnd > 1 || p.TargetPort-pr.tEnd > 1 || prIsRange && tOverlaps {
// start a new port-range, and print the previous port-range (if any)
if pr.pStart > 0 {
ports = append(ports, pr.String())
}
pr = portRange{
pStart: p.PublishedPort,
pEnd: p.PublishedPort,
tStart: p.TargetPort,
tEnd: p.TargetPort,
protocol: p.Protocol,
}
continue
}
pr.pEnd = p.PublishedPort
pr.tEnd = p.TargetPort
}
}
return strings.Join(ports, ",")
if pr.pStart > 0 {
ports = append(ports, pr.String())
}
return strings.Join(ports, ", ")
}
type byProtocolAndPublishedPort []swarm.PortConfig
func (a byProtocolAndPublishedPort) Len() int { return len(a) }
func (a byProtocolAndPublishedPort) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a byProtocolAndPublishedPort) Less(i, j int) bool {
if a[i].Protocol == a[j].Protocol {
return a[i].PublishedPort < a[j].PublishedPort
}
return a[i].Protocol < a[j].Protocol
}

View File

@ -8,6 +8,7 @@ import (
"testing"
"github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@ -59,21 +60,7 @@ bar
// Raw Format
{
Context{Format: NewServiceListFormat("raw", false)},
`id: id_baz
name: baz
mode: global
replicas: 2/4
image:
ports: *:80->8080/tcp
id: id_bar
name: bar
mode: replicated
replicas: 2/4
image:
ports: *:80->8080/tcp
`,
string(golden.Get(t, "service-context-write-raw.golden")),
},
{
Context{Format: NewServiceListFormat("raw", true)},
@ -237,3 +224,136 @@ func TestServiceContextWriteJSONField(t *testing.T) {
assert.Equal(t, services[i].Spec.Name, s, msg)
}
}
func TestServiceContext_Ports(t *testing.T) {
c := serviceContext{
service: swarm.Service{
Endpoint: swarm.Endpoint{
Ports: []swarm.PortConfig{
{
Protocol: "tcp",
TargetPort: 80,
PublishedPort: 81,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 80,
PublishedPort: 80,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 95,
PublishedPort: 95,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 90,
PublishedPort: 90,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 91,
PublishedPort: 91,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 92,
PublishedPort: 92,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 93,
PublishedPort: 93,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 94,
PublishedPort: 94,
PublishMode: "ingress",
},
{
Protocol: "udp",
TargetPort: 95,
PublishedPort: 95,
PublishMode: "ingress",
},
{
Protocol: "udp",
TargetPort: 90,
PublishedPort: 90,
PublishMode: "ingress",
},
{
Protocol: "udp",
TargetPort: 96,
PublishedPort: 96,
PublishMode: "ingress",
},
{
Protocol: "udp",
TargetPort: 91,
PublishedPort: 91,
PublishMode: "ingress",
},
{
Protocol: "udp",
TargetPort: 92,
PublishedPort: 92,
PublishMode: "ingress",
},
{
Protocol: "udp",
TargetPort: 93,
PublishedPort: 93,
PublishMode: "ingress",
},
{
Protocol: "udp",
TargetPort: 94,
PublishedPort: 94,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 60,
PublishedPort: 60,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 61,
PublishedPort: 61,
PublishMode: "ingress",
},
{
Protocol: "tcp",
TargetPort: 61,
PublishedPort: 62,
PublishMode: "ingress",
},
{
Protocol: "sctp",
TargetPort: 97,
PublishedPort: 97,
PublishMode: "ingress",
},
{
Protocol: "sctp",
TargetPort: 98,
PublishedPort: 98,
PublishMode: "ingress",
},
},
},
},
}
assert.Equal(t, "*:97-98->97-98/sctp, *:60-61->60-61/tcp, *:62->61/tcp, *:80-81->80/tcp, *:90-95->90-95/tcp, *:90-96->90-96/udp", c.Ports())
}

View File

@ -4,13 +4,14 @@ import (
"fmt"
"sync"
"github.com/docker/docker/pkg/stringid"
units "github.com/docker/go-units"
)
const (
winOSType = "windows"
defaultStatsTableFormat = "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}"
winDefaultStatsTableFormat = "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"
defaultStatsTableFormat = "table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}"
winDefaultStatsTableFormat = "table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"
containerHeader = "CONTAINER"
cpuPercHeader = "CPU %"
@ -114,12 +115,13 @@ func NewContainerStats(container string) *ContainerStats {
}
// ContainerStatsWrite renders the context for a list of containers statistics
func ContainerStatsWrite(ctx Context, containerStats []StatsEntry, osType string) error {
func ContainerStatsWrite(ctx Context, containerStats []StatsEntry, osType string, trunc bool) error {
render := func(format func(subContext subContext) error) error {
for _, cstats := range containerStats {
containerStatsCtx := &containerStatsContext{
s: cstats,
os: osType,
s: cstats,
os: osType,
trunc: trunc,
}
if err := format(containerStatsCtx); err != nil {
return err
@ -149,8 +151,9 @@ func ContainerStatsWrite(ctx Context, containerStats []StatsEntry, osType string
type containerStatsContext struct {
HeaderContext
s StatsEntry
os string
s StatsEntry
os string
trunc bool
}
func (c *containerStatsContext) MarshalJSON() ([]byte, error) {
@ -169,6 +172,9 @@ func (c *containerStatsContext) Name() string {
}
func (c *containerStatsContext) ID() string {
if c.trunc {
return stringid.TruncateID(c.s.ID)
}
return c.s.ID
}

View File

@ -114,7 +114,7 @@ container2 --
}
var out bytes.Buffer
te.context.Output = &out
err := ContainerStatsWrite(te.context, stats, "linux")
err := ContainerStatsWrite(te.context, stats, "linux", false)
if err != nil {
assert.EqualError(t, err, te.expected)
} else {
@ -180,7 +180,7 @@ container2 -- --
}
var out bytes.Buffer
te.context.Output = &out
err := ContainerStatsWrite(te.context, stats, "windows")
err := ContainerStatsWrite(te.context, stats, "windows", false)
if err != nil {
assert.EqualError(t, err, te.expected)
} else {
@ -220,7 +220,7 @@ func TestContainerStatsContextWriteWithNoStats(t *testing.T) {
}
for _, context := range contexts {
ContainerStatsWrite(context.context, []StatsEntry{}, "linux")
ContainerStatsWrite(context.context, []StatsEntry{}, "linux", false)
assert.Equal(t, context.expected, out.String())
// Clean buffer
out.Reset()
@ -258,7 +258,41 @@ func TestContainerStatsContextWriteWithNoStatsWindows(t *testing.T) {
}
for _, context := range contexts {
ContainerStatsWrite(context.context, []StatsEntry{}, "windows")
ContainerStatsWrite(context.context, []StatsEntry{}, "windows", false)
assert.Equal(t, context.expected, out.String())
// Clean buffer
out.Reset()
}
}
func TestContainerStatsContextWriteTrunc(t *testing.T) {
var out bytes.Buffer
contexts := []struct {
context Context
trunc bool
expected string
}{
{
Context{
Format: "{{.ID}}",
Output: &out,
},
false,
"b95a83497c9161c9b444e3d70e1a9dfba0c1840d41720e146a95a08ebf938afc\n",
},
{
Context{
Format: "{{.ID}}",
Output: &out,
},
true,
"b95a83497c91\n",
},
}
for _, context := range contexts {
ContainerStatsWrite(context.context, []StatsEntry{{ID: "b95a83497c9161c9b444e3d70e1a9dfba0c1840d41720e146a95a08ebf938afc"}}, "linux", context.trunc)
assert.Equal(t, context.expected, out.String())
// Clean buffer
out.Reset()

View File

@ -7,6 +7,7 @@ import (
"testing"
"github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
)
@ -33,10 +34,7 @@ taskID2
},
{
Context{Format: NewTaskFormat("table {{.Name}}\t{{.Node}}\t{{.Ports}}", false)},
`NAME NODE PORTS
foobar_baz foo1
foobar_bar foo2
`,
string(golden.Get(t, "task-context-write-table-custom.golden")),
},
{
Context{Format: NewTaskFormat("table {{.Name}}", true)},

View File

@ -0,0 +1,3 @@
CONTAINER ID IMAGE CREATED/STATUS/ PORTS .NAMES STATUS
conta "ubuntu" 24 hours ago//.FOOBAR_BAZ
conta "ubuntu" 24 hours ago//.FOOBAR_BAR

View File

@ -0,0 +1,5 @@
TYPE ACTIVE
Images 0
Containers 0
Local Volumes 0
Build Cache

View File

@ -0,0 +1,24 @@
type: Images
total: 0
active: 0
size: 0B
reclaimable: 0B
type: Containers
total: 0
active: 0
size: 0B
reclaimable: 0B
type: Local Volumes
total: 0
active: 0
size: 0B
reclaimable: 0B
type: Build Cache
total:
active:
size: 0B
reclaimable: 0B

Some files were not shown because too many files have changed in this diff Show More