Compare commits

...

875 commits

Author SHA1 Message Date
Aaron Lehmann
ceb9e244d9 Merge pull request #33810 from thaJeztah/17.03-update-frozen-image-script
[17.03.x] update frozen image script
2017-07-11 17:50:57 -07:00
Sebastiaan van Stijn
56bd13b372 Merge pull request #33388 from cpuguy83/go1.7.6
[17.03.3] Bump go version to 1.7.6
2017-07-10 12:21:47 -07:00
Sebastiaan van Stijn
c1edccdf5d Merge pull request #34020 from cpuguy83/17.03_fix_log_reader
[17.03] Fix log readers can block writes indefinitely
2017-07-10 12:01:11 -07:00
Brian Goff
85319318ec Fix log readers can block writes indefinitely
Before this patch, a log reader is able to block all log writes
indefinitely (and other operations) by simply opening the log stream and
not consuming all the messages.

The reason for this is we protect the read stream from corruption by
ensuring there are no new writes while the log stream is consumed (and
caught up with the live entries).

We can get around this issue because log files are append only, so we
can limit reads to only the section of the file that was written to when
the log stream was first requested.

Now logs are only blocked until all files are opened, rather than
streamed to the client.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e2209185ed)

Conflicts:
daemon/logger/jsonfilelog/jsonfilelog.go
daemon/logger/jsonfilelog/read.go
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-07-08 11:32:01 -04:00
Alexander Morozov
5f31690cd1 Merge pull request #33971 from andrewhsu/update-containerd
[17.03] finish updating binaries-commits containerd to commit 6c46389
2017-07-06 09:35:54 -07:00
Andrew Hsu
9edfef034e finish updating binaries-commits containerd to commit 6c46389
The vendor.conf file was already updated.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-06 00:53:09 +00:00
Tibor Vass
7388483ef7
Merge pull request #33707 from Syntaxide/s3fix
Fix authorization header handling in downloader script.
(cherry picked from commit d75eb735ee)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-23 20:38:40 -07:00
Sebastiaan van Stijn
ef4466eb12
Merge pull request #33443 from DeliangFan/fix_download_image_fails
Fix downloading image fails when build docker
(cherry picked from commit 555bd548ca)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-23 20:38:32 -07:00
Vincent Demeester
ec25773e31
Merge pull request #29864 from tianon/schemaVersion-2
Update "download-frozen-image-v2.sh" for schemaVersion 2
(cherry picked from commit 5870675ebc)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-23 20:38:22 -07:00
Justin Cormack
cbfdb45ad6
Merge pull request #29027 from runcom/fix-jq
contrib: download-frozen-image-v2.sh requires jq
(cherry picked from commit a227ea62e6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-23 20:38:12 -07:00
Akihiro Suda
84d3b987ab Merge pull request #33528 from mlaventure/update-containerd-17.03
[17.03] Update containerd to version 6c463891b1ad274d505ae3bb738e530d1df2b3c7
2017-06-23 07:31:42 +03:00
Sebastiaan van Stijn
220831d541 Merge pull request #33572 from hsluoyz/patch-1
Add Casbin plugin to the list of Authorization plugins in docs.
2017-06-08 01:09:45 +02:00
Yang Luo
c670cd31f1 Add Casbin plugin to the list of Authorization plugins in docs.
Signed-off-by: Yang Luo <hsluoyz@qq.com>
2017-06-08 01:35:03 +08:00
Kenfe-Mickael Laventure
5567c5e2f6 Update containerd to version 6c463891b1ad274d505ae3bb738e530d1df2b3c7
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-05 13:22:32 -07:00
Brian Goff
f5ec1e2936 Merge pull request #33401 from mlaventure/bump-version-17.03.2
Bump version to 17.03.2-ce
2017-06-01 17:14:48 -04:00
Kenfe-Mickael Laventure
acdc9e9cd4 Bump version to 17.03.2-ce
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-05-25 13:36:23 -07:00
Brian Goff
52d71e9072 Bump go version to 1.7.6
This addresses a security issue in go (CVE-2017-8932).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-25 10:52:28 -04:00
Sebastiaan van Stijn
eef6495edd Merge pull request #33339 from cpuguy83/bump_17.03.2
[17.03] Bump 17.03.2
2017-05-24 09:51:20 +01:00
Kenfe-Mickael Laventure
4a4e7d9229 Add 17.03.2 CHANGELOG
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-05-23 10:53:57 -07:00
Brian Goff
9e7ebd3abd Bump version to 17.03.2-ce-rc1
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-05-22 15:13:23 -07:00
Brian Goff
0ece5c788f Merge pull request #33284 from mlaventure/17.03.2-cherry-picks
17.03.2 cherry picks
2017-05-19 10:16:24 -04:00
Antonio Murdaca
adbb5b4d39 profiles: seccomp: allow clock_settime when CAP_SYS_TIME is added
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 3ab4961032)
2017-05-18 22:39:26 -07:00
Kenfe-Mickaël Laventure
69e798217c Merge pull request #33273 from cpuguy83/update_libnet_vendor_17.03
[17.03] Update libnetwork vendor
2017-05-18 13:01:19 -07:00
Brian Goff
9ef54c654b Update libnetwork vendor
Pulls in docker/libnetwork#1750

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-18 13:08:10 -04:00
Sebastiaan van Stijn
8b9c66e80d Merge pull request #33236 from cpuguy83/17.03.2_cherry_picks
17.03.2 cherry picks
2017-05-17 11:56:44 +02:00
Brian Goff
85847adadc Merge pull request #33232 from aaronlehmann/vendor-swarmkit-2591ac3
[17.03] Vendor swarmkit 2591ac3
2017-05-16 19:39:34 -04:00
Sebastiaan van Stijn
8f0684b0f6 add d_type warning to docker info, and optimize output
The overlay(2) drivers were moved up in the list of storage drivers,
and are known to have problems if the backing filesystem does not
support d_type.

Commit 2e20e63da2 added a warning,
which is logged in the daemon logs, however, many users do not
check those logs, and may overlook this warning.

This patch adds the same warning to the output of `docker info`
so that the warning is more easily found.

In addition, the output of warnings printed by `docker info` is
optimized, by;

- moving all warnings to the _end_ of the output, instead of
  mixing them with the regular output
- wrapping the storage-driver warnings, so that they are more
  easily readable

Example output with this patch applied
============================================

devicemapper using loopback devices:

    ...
    Insecure Registries:
     127.0.0.0/8
    Live Restore Enabled: false

    WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
             Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
    WARNING: bridge-nf-call-iptables is disabled
    WARNING: bridge-nf-call-ip6tables is disabled

overlay2 on xfs without d_type support;

    ...
    Insecure Registries:
     127.0.0.0/8
    Live Restore Enabled: false

    WARNING: overlay2: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior.
             Reformat the filesystem with ftype=1 to enable d_type support.
             Running without d_type support will not be supported in future releases.
    WARNING: bridge-nf-call-iptables is disabled

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1921559798)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:19:49 -04:00
Anusha Ragunathan
3c78938494 Add non-nil check before logging volume errors.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
(cherry picked from commit b1570baadd)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:16:32 -04:00
Brian Goff
54f75814d9 Fix panic on error looking up volume driver
(-‸ლ)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 5baf8a4118)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:14:48 -04:00
Vivek Goyal
ac7820f779 Volumes should have default propagation property "rprivate"
Until and unless user has specified a propagation property for volume, they
should default to "rprivate" and it should be passed to runc.

We can't make it conditional on HasPropagation(). GetPropagation() returns
default of rprivate if noting was passed in by user.

If we don't pass "rprivate" to runc, then bind mount could be shared even
if user did not ask for it. For example, mount two volumes in a container.
One is "shared" while other's propagation is not specified by caller. If
both volume has same source mount point of "shared", then second volume
will also be shared inside container (instead of being private).

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
(cherry picked from commit af8a1430f1)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:13:41 -04:00
Brian Goff
3600abb7aa Make sure plugin rootfs is unmounted on upgraded
In some cases, if a user specifies `-f` when disabling a plugin mounts
can still exist on the plugin rootfs.
This can cause problems during upgrade where the rootfs is removed and
may cause data loss.

To resolve this, ensure the rootfs is unmounted
before performing an upgrade.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 83f44d232d)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:11:55 -04:00
Brian Goff
9e241de40b Remove undeeded and broken selinux relabel call
The call is not needed here and wouldn't really work since `Source` in
this case is a volume name.
Further we don't neccessarily even have a volume path at this time since
the volume hasn't been mounted yet.

The volume will be relabled either:

1. When data gets copied to it from the image (if applicable) -- https://github.com/docker/docker/blob/master/container/container_unix.go#L196
2. When the container is started -- https://github.com/docker/docker/blob/master/daemon/oci_linux.go#L737

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 898e84d5fd)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:10:40 -04:00
Dan Walsh
928420b95e We need to fix labels if the user requests on volumes
Currently local volumes and other volumes that support SELinux do
not get labeled correctly.  This patch will allow a user to specify
:Z or :z when  mounting a volume and have it fix the label of the newly
created volume.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
(cherry picked from commit 0c791c8e9f)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:09:45 -04:00
Antonio Murdaca
39372e619c daemon: relabel secrets path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit b11af7b2f6)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-16 16:08:35 -04:00
Aaron Lehmann
472485ea93 Vendor swarmkit 2591ac3
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-16 12:06:06 -07:00
Sebastiaan van Stijn
d33342725b Merge pull request #33207 from cpuguy83/cherry_pick_mpsec_backport
[17.03] Fix issue backporting mount spec to pre-1.13 obj
2017-05-16 01:03:32 +02:00
Brian Goff
d772750271 Fix issue backporting mount spec to pre-1.13 obj
In some cases a mount spec would not be properly backported which could
lead to accidental removal of the underlying volume on container remove
(which should never happen with named volumes).

Adds unit tests for this as well. Unfortunately I had to add a daemon
depdency for the backport function due to looking up `VolumesFrom`
specs.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 3cf18596e9)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-15 15:53:19 -04:00
Victor Vieux
696df0376f Merge pull request #33118 from aaronlehmann/vendor-swarmkit-e680722
[17.03] Vendor swarmkit e680722
2017-05-10 10:37:43 -07:00
Victor Vieux
4843bdced5 Merge pull request #33120 from cpuguy83/backport_lazy-unmount-volume
[17.03.x] Backport lazy unmount volume
2017-05-10 10:37:24 -07:00
Sebastiaan van Stijn
7f394b8b35 Merge pull request #33117 from aaronlehmann/digest-pin-context-17.03
[17.03.2] cluster: Renew the context after communicating with the registry
2017-05-10 15:45:27 +02:00
Brian Goff
2dfb31c228 Use lazy unmount for local volume unmount
This is a spiritual backport of acbfe6bc56
The afformentioned commit was not cherry-picked because it is a broader
change to the codebase, whereas this is the same basic fix but localized
to the local volume driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-09 14:17:10 -04:00
Brian Goff
6aac9ab3c7 Ensure unmount before removing local volume.
When there is an error unmounting a local volume, it is still possible
to call `Remove()` on the volume causing removal of the mounted
resources which is generally not desirable.

This ensures that resources are unmounted before attempting removal.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit db3576f8a0)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-09 13:48:45 -04:00
Aaron Lehmann
387707f03e Vendor swarmkit e68072200ebbba6ce9745b3a3e49fdba3eb71ff8
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-09 10:25:27 -07:00
Brian Goff
1bf3b68a4b Merge pull request #33028 from thaJeztah/17.03-remove-unused-filter-param
[17.03.x] Remove unused filter params from Swagger
2017-05-05 09:25:12 -04:00
Sebastiaan van Stijn
2bdaab759f
Remove unused filter params from Swagger
Commit 745795ef2e added
a `filter` query-parameter to all "prune" endpoints,
however the parameter was only used when pruning
images.

This patch removes the filter parameter from the other
endpoints, given that it is not used for those, so
there is no reason documenting it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-04 14:29:36 -07:00
Doug Davis
9db03bd8cd Merge pull request #32804 from bbodenmiller/patch-1
remove extra word
2017-04-28 18:39:52 -04:00
Ben Bodenmiller
9ed258872a remove extra word
Signed-off-by: Ben Bodenmiller <bbodenmiller@hotmail.com>
2017-04-28 15:37:48 -07:00
Vincent Demeester
c3fbca1065 Merge pull request #32724 from PatrickLang/patricklang-win-memory
Adding more on -m and --memory
2017-04-26 15:30:09 +02:00
Patrick Lang
f93270a4bb Adding description for -m, --memory
Signed-off-by: Patrick Lang <patrick.lang@hotmail.com>
2017-04-25 14:32:02 -07:00
Sebastiaan van Stijn
f2fff9d913 Merge pull request #32735 from bhavin192/patch-1
Add note about host-dir in VOLUME
2017-04-25 10:18:16 -07:00
Brian Goff
32a52716b9 Merge pull request #32791 from djalal/patch-1
fix typo
2017-04-24 08:53:30 -04:00
djalal
388ec67426 fix typo
Signed-off-by: djalal <contact@enlamp.com>
2017-04-24 14:33:49 +02:00
Tõnis Tiigi
8310663377 Merge pull request #32684 from scjane/patch-3
Update builder.md
2017-04-20 20:11:26 -07:00
Wang Jie
9b78660ef4 Update builder.md
Fix a invalid link.

Signed-off-by: Wang Jie <wangjie5@chinaskycloud.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-20 21:45:35 -05:00
Misty Stanley-Jones
4f769c6bc1 Edits and fixing note stacking
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-04-20 09:28:01 -07:00
Bhavin Gandhi
b9fe386870 Add note about host-dir in VOLUME
Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
2017-04-20 06:58:23 +00:00
Brian Goff
345fc1bed7 Merge pull request #32432 from thaJeztah/17.03.x-update-install-script
[17.03.x] update get.docker.com install script
2017-04-08 15:14:59 -04:00
Alexander Morozov
e2d541585f
Merge pull request #30067 from tophj-ibm/add-more-detailed-install-script-message
add suggestions in failure message in install script
(cherry picked from commit 002312d6c1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-07 11:20:35 +02:00
Vincent Demeester
8de0ced471
Merge pull request #32425 from tabakhase/patch-1
Fix install.sh of get.docker.com for debian-sudo
(cherry picked from commit daaf9ddfa9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-07 11:15:49 +02:00
Michael Crosby
af72a358fc
Merge pull request #29967 from justincormack/gpg-include-keys
Do not use keyservers to fetch GPG keys for apt
(cherry picked from commit 518945b6bd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-07 11:15:41 +02:00
Vincent Demeester
99d1e7f5b6
Merge pull request #29485 from ericcurtin/remove-prompt-add-docker-group
Don't encourage adding user to docker group
(cherry picked from commit 06e3812b6e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-07 11:11:17 +02:00
Sebastiaan van Stijn
ebcd590a03 Merge pull request #32390 from thaJeztah/fixup-docs-cherry-pick
[17.03.x] cli reference fixes
2017-04-06 01:37:45 +02:00
Sebastiaan van Stijn
7b29c9a4ce
Fix docs cherry-pick
commit d7bc6e4e7c
brought in markup fixes in the documentation, but
due to it being cherry-picked from "master", brought
in more changes that are not yet part of the
17.03 release.

This removes the features that are not in
the 17.03 release from the reference docs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-06 01:07:46 +02:00
Victor Vieux
c79660699b Merge pull request #32322 from thaJeztah/17.03.1-cherry-picks
[17.03.x] docs cherry picks
2017-04-03 11:47:53 -07:00
Victor Vieux
bcb63f3677 Merge pull request #32298 from thaJeztah/fix-changelog
[17.03.x] fix version of containerd in changelog
2017-04-03 11:45:50 -07:00
Sebastiaan van Stijn
9c3b01cbb3
Merge pull request #32183 from JimGalasyn/delete-h1
Delete extraneous H1 title
(cherry picked from commit 0c59283fc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:55 +02:00
Vincent Demeester
a024e2ad6a
Merge pull request #32086 from tripdubroot/32000-Update-push.md-doc
Updated push.md with progress bar info
(cherry picked from commit a048e131be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:50 +02:00
Sebastiaan van Stijn
6421a8d8c8
Merge pull request #32034 from gpflaum/30841-fix-toc-deprecated
Fix indenting in deprecated engine features toc
(cherry picked from commit 0f8a3dafa4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:45 +02:00
John Howard
861311f17d
Merge pull request #31980 from JohnMaguire/doc-update
Add note regarding Windows VOLUME limitations
(cherry picked from commit c33c457852)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:39 +02:00
Vincent Demeester
70faa0801c
Merge pull request #31973 from wsong/update_df_docs
Update system df docs to call out performance implications
(cherry picked from commit f453412bd8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:34 +02:00
Sebastiaan van Stijn
44a975201b
Merge pull request #31969 from vdemeester/fix-images-reference-docs-filter-list
Add `reference` filter to the list of available filters
(cherry picked from commit 4c7941d391)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:29 +02:00
Sebastiaan van Stijn
da722663b7
Merge pull request #31911 from allencloud/specify-max-size-for-secret-in-doc
specify max size for secret in doc
(cherry picked from commit 7c7cc0bbdc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:22 +02:00
Sebastiaan van Stijn
311c465578
Merge pull request #31901 from davidxia/fix-docs
[docs] Fix incorrect `docker inspect` example
(cherry picked from commit b385a9156e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:17 +02:00
Sebastiaan van Stijn
3006a837d5
Merge pull request #31846 from thaJeztah/remove-outdated-etc-hosts-reference
docs: remove outdated reference to updating /etc/hosts(cherry picked from commit 5126862d43)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:11 +02:00
Sebastiaan van Stijn
f4f8e9481f
Merge pull request #31619 from rcjsuen/patch-1
Fix typo in sample output
(cherry picked from commit aa534d3bb2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:11:06 +02:00
Sebastiaan van Stijn
4e5b668b1c
Merge pull request #31596 from rootsongjc/dry-run-test
Wrong entrypoint in docker plugin example
(cherry picked from commit 0bc84fc06c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:10:59 +02:00
Vincent Demeester
4fdfe3af0b
Merge pull request #31021 from mstanleyjones/31009_dockerd_experimental
Update docs for experimental features
(cherry picked from commit bd811aa4fd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:09:36 +02:00
Sebastiaan van Stijn
039fb56e63
Merge pull request #32126 from vdemeester/docs-ref-cli-root-commands
Add cli reference docs for root-level commands
(cherry picked from commit cf113faca6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:05:03 +02:00
Sebastiaan van Stijn
c812008e82
Merge pull request #32107 from mkumatag/fix_api_doc
Fix Healthcheck API doc
(cherry picked from commit abecc530ee)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:04:56 +02:00
Sebastiaan van Stijn
d9d2691146
Merge pull request #31641 from amatsus/master
Fix typo in CHANGELOG.md
(cherry picked from commit 58e787602d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:04:50 +02:00
Tibor Vass
1be1fd6a8c
Merge pull request #31496 from vieux/update_deprecation
update deprecation dates
(cherry picked from commit 0ab40a7552)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:04:44 +02:00
Vincent Demeester
8e45d27673 Merge pull request #32191 from tiborvass/yaml-docs-gen-17_03
[17.03] docs: added support for CLI yaml file generation
2017-04-03 17:04:38 +02:00
Vincent Demeester
7d81f815b7
Merge pull request #31480 from thaJeztah/carry-31213-update-experimental-index
[carry 31213] Update index.md
(cherry picked from commit 6361117b59)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:04:37 +02:00
Sebastiaan van Stijn
80c609504f
Merge pull request #31396 from kevinfeyrer/patch-2
Update vlan-networks.md
(cherry picked from commit 705e031b98)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:04:24 +02:00
Brian Goff
e4f216c4fe
Merge pull request #30568 from khudgins/nimbleplugin
added listing for Nimble Storage's volume plugin
(cherry picked from commit ba5c0f88d5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 17:02:31 +02:00
Sebastiaan van Stijn
177fc19358
fix version of containerd in changelog
containerd was updated twice between docker 17.03.0
and 17.03.1; once in
74c52a7bab, and
again in 00132cc442,
but only the first change was included in the
changelog.

This updates the changelog to match what actually
shipped with 17.03.1.

Thanks to Stanislav Zubov for reporting.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-01 15:10:47 +02:00
Sebastiaan van Stijn
d0057bd12d Merge pull request #32265 from breuner/patch-1
Updated legacy_plugins.md to include BeeGFS plugin
2017-03-31 17:59:33 +02:00
Sven Breuner
35c5eaf80e Updated legacy_plugins.md to include BeeGFS plugin
Signed-off-by: Sven Breuner <sven.breuner@thinkparq.com>
2017-03-31 17:14:26 +02:00
Tibor Vass
4d6f64da09 docs: fix Makefile for yaml docs generation
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 36bd288162)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-03-29 15:19:20 -07:00
Victor Vieux
f89896dd09 install: map debian_version 9.X to debian stretch without lsb_release
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit f8360d002d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-29 13:46:37 -07:00
French Ben
43e3b8d2cc docs: added support for CLI yaml file generation
Signed-off-by: French Ben <frenchben@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 5443f0152f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-03-28 17:41:46 -07:00
Victor Vieux
c6d412e329 bump version to 17.03.1
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-23 16:07:51 -07:00
Misty Stanley-Jones
0f1ee84014 Merge pull request #31875 from toolchainX/patch-2
update service-create.md
2017-03-16 14:17:38 -07:00
Linhua Tan
72ed80a82a update service-create.md
typo

Signed-off-by: 谭林华 <linhua.tlh@alibaba-inc.com>
2017-03-16 17:25:58 +08:00
Aaron Lehmann
161b2a50c3 cluster: Renew the context after communicating with the registry
When pinning by digest, the registry might be slow or unresponsive. This
could cause the context to already be expired by the time UpdateService
or CreateService is called. We want digest pinning to be a best-effort
operation, so it's problematic if a slow or misbehaving registry
prevents the service operation from completing. Replace the context
after communicating with the registry, so we have a fresh timeout for
the gRPC call.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit f8273a216e)
2017-03-15 11:01:02 -07:00
Victor Vieux
3476dbfb36 Merge pull request #31852 from mlaventure/update-containerd-17.03
[17.03.1] Update containerd to version 4ab9917febca54791c5f071a9d1f404867857fcc
2017-03-15 10:49:52 -07:00
Kenfe-Mickael Laventure
00132cc442 Update containerd to version 4ab9917febca54791c5f071a9d1f404867857fcc
This fixes an issue preventing containerd from starting if the state
directory didn't exist already.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-03-15 08:16:07 -07:00
Victor Vieux
59c6eb8c2f Merge pull request #31754 from vieux/bump_17.03.1
bump to 17.03.1-rc1
2017-03-13 23:25:41 -07:00
Victor Vieux
fe47f34b54 bump tp 17.03.1
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:20 -07:00
Misty Stanley-Jones
1313d424eb Fix markdown in references for Kramdown
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 0ce13eb0d3)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:20 -07:00
Yong Tang
c73e4dedbd Fix issue where service healthcheck is {} in remote API
This fix tries to address the issue raised in 30178 where
service healthcheck is `{}` in remote API will result in
dns resolve failue.

The reason was that when service healthcheck is `{}`,
service binding was not done.

This fix fixes the issue.

An integration test has been added.

This fix fixes 30178.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 8feb5c5a48)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Harald Albers
17c6fa06f6 Improve POSIX compatibility of bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 76f4681b56)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Harald Albers
a3fa6aa153 Improve bash completion for docker run --cap-{add,drop}
Docker has several capabilities enabled by default and some not.
It seems natural to follow this distinction in --cap-add and
--cap-drop.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 36d8b66cb9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Tonis Tiigi
8953fda3ef overlay2: fix unmounting layer without merge dir
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e1af6c8a57)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Daniel Nephin
bc8f9c8249 Support customizing the default network for a stack.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit b7577dd2ad)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
yuexiao-wang
a3c0c6d03b 'docker daemon' deprecation message doesn't use the new versioning scheme
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 5a9cee7bb5)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Sebastiaan van Stijn
9ae5dd5413 do not ignore "volume in use" errors when force-delete
When using `docker volume rm -f`, all errors were ignored,
and volumes where Purged, even if they were still in
use by a container.

As a result, repeated calls to `docker volume rm -f`
actually removed the volume.

The `-f` option was implemented to ignore errors
in case a volume was already removed out-of-band
by a volume driver plugin.

This patch changes the remove function to not
ignore "volume in use" errors if `-f` is used.
Other errors are still ignored as before.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9d521a4d2f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
John Howard
0017cf150a Windows: Cleanup HCS on restore
Signed-off-by: John Howard <jhoward@microsoft.com>

This ensures that any compute processes in HCS are cleanedup
during daemon restore. Note Windows cannot (currently) reconnect
to containers on restore.

(cherry picked from commit f59593cbd1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
allencloud
f99de4e30f move secret into swarm thing in swagger
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 6918624985)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
Aleksa Sarai
930606f844 daemon: also ensureDefaultApparmorProfile in exec path
When 567ef8e785 ("daemon: switch to 'ensure' workflow for AppArmor
profiles") was merged, it didn't correctly handle the exec path if
AppArmor profiles were deleted. Fix this by duplicating the
ensureDefaultApparmorProfile code in the exec code.

Fixes: 567ef8e785 ("daemon: switch to 'ensure' workflow for AppArmor profiles")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 790a81ea9a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
Victor Vieux
9c5e221e36 update changelog
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:14 -07:00
Victor Vieux
883a34e867 Merge pull request #31807 from aaronlehmann/vendor-swarmkit-1775645
[17.03.x] Vendor swarmkit 1775645
2017-03-13 21:18:39 -07:00
Victor Vieux
9a6c8c999d Merge pull request #31802 from vieux/fix_stats
[17.03.x] Correct CPU usage calculation in presence of offline CPUs and newer Linux #31579
2017-03-13 18:09:29 -07:00
Aaron Lehmann
6a9acf0b94 Vendor swarmkit 1775645
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-13 17:42:56 -07:00
Ian Campbell
9b001c4f5f Correct CPU usage calculation in presence of offline CPUs and newer Linux
In https://github.com/torvalds/linux/commit/5ca3726 (released in v4.7-rc1) the
content of the `cpuacct.usage_percpu` file in sysfs was changed to include both
online and offline cpus. This broke the arithmetic in the stats helpers used by
`docker stats`, since it was using the length of the PerCPUUsage array as a
proxy for the number of online CPUs.

Add current number of online CPUs to types.StatsJSON and use it in the
calculation.

Keep a fallback to `len(v.CPUStats.CPUUsage.PercpuUsage)` so this code
continues to work when talking to an older daemon. An old client talking to a
new daemon will ignore the new field and behave as before.

Fixes #28941.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
(cherry picked from commit 115f91d757)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 16:16:05 -07:00
Victor Vieux
3c3f3204bf Merge pull request #31742 from aaronlehmann/vendor-swarmkit-f93948c
[17.03.x] Vendor swarmkit f93948c
2017-03-10 14:10:41 -08:00
Aaron Lehmann
a8b51a3296 Vendor swarmkit f93948c
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-10 11:08:44 -08:00
Justin Cormack
4bd1b7174c Merge pull request #31662 from mlaventure/17.03-update-containerd
Update containerd to 595e75c212d19a81d2b808a518fe1afc1391dad5
2017-03-10 16:42:37 +00:00
Kenfe-Mickael Laventure
74c52a7bab Update containerd to 595e75c212d19a81d2b808a518fe1afc1391dad5
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-03-09 13:50:28 -08:00
Victor Vieux
e0cff8e193 Merge pull request #31653 from dnephin/fix-compose-bindata
[17.03.x] Fix the generated bindata in the release branch
2017-03-09 13:23:59 -08:00
Victor Vieux
502b068b3c Merge pull request #31692 from thaJeztah/17.03.x-fix-autoremove-on-older-api
[17.03.x] fix autoremove on older api
2017-03-09 12:18:05 -08:00
Victor Vieux
15805a0afb Merge pull request #31666 from mlaventure/17.03-update-runc
[17.03.x] Update runc to 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
2017-03-09 12:17:30 -08:00
Sebastiaan van Stijn
32dbb5c465
Add integration tests for client- and daemon-side auto-remove
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-09 12:29:20 +01:00
Sebastiaan van Stijn
19bbb4e9f0
[17.03.x] fix autoremove on pre 1.25 API
Commit 87a53468b2 cherry-picked
changes into the 17.03 branch to make the client
skip auto-removing containers on API 1.25 and up.

Some changes got lost during that cherry-pick,
resulting in 17.03 clients to not fall back to
the old behavior when connecting to API version
1.24 or below.

This patch addresses this issue for the 17.03
branch by copying the `HostConfig.AutoRemove` property
to a local variable before it is overridden
in `ContainerCreate()`.

This change is not needed on "master" (17.04-dev),
which does not have this problem.

Thanks to Josh Hawn for finding this bug.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-09 11:59:11 +01:00
Kenfe-Mickael Laventure
030f7b370f Update runc to 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-03-08 14:49:32 -08:00
Daniel Nephin
2a60fc01ab Fix the generatd bindata in the release branch.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-08 10:20:23 -05:00
Sebastiaan van Stijn
b2cba289fc Merge pull request #31474 from thaJeztah/docs-cherry-picks
[17.03.x] Docs cherry picks
2017-03-02 13:11:45 +01:00
Sebastiaan van Stijn
de692b1065
Merge pull request #31467 from thaJeztah/remove-jekyll-markers
remove Jekyll tags from CLI reference
(cherry picked from commit 9321a12115)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:57 +01:00
Sebastiaan van Stijn
9f55f97a5a
Merge pull request #31398 from pjaffe/patch-1
Remove incorrect duplicate phrase from build.md
(cherry picked from commit fb5ccc6605)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:51 +01:00
Brian Goff
ef658fa65e
Merge pull request #31291 from albers/docs-daemon-hosts
Clarify why `hosts` in `daemon.json` does not work
(cherry picked from commit 27c9a6e9c2)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:46 +01:00
Vincent Demeester
05b81bc152
Merge pull request #30832 from allencloud/update-swaggeryml-on-cluster-status-code
remove 400 and 404 for get nodes endpoint and add 503 for secret update
(cherry picked from commit e8b92f154d)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:39 +01:00
Sebastiaan van Stijn
4b025d0605
Merge pull request #30731 from shin-/plugin_privileges_param_fix
Parameter name in GetPluginPrivileges is "remote"
(cherry picked from commit 8d28fc8fc4)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:32 +01:00
Brian Goff
3a232c89e4 Merge pull request #31311 from aaronlehmann/vendor-swarmkit-1f3e4e6
[17.03.x] Vendor swarmkit 1f3e4e6
2017-02-24 09:11:59 -05:00
Aaron Lehmann
bef21471d7 Vendor swarmkit 1f3e4e6
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-02-23 11:07:29 -08:00
Victor Vieux
60ccb2265b bump to version 17.03.0-ce
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-23 02:03:50 -08:00
Victor Vieux
faa90e9378 Merge pull request #31266 from vieux/17.03-cherry
17.03 cherry-picks
2017-02-23 02:02:52 -08:00
Victor Vieux
d9bc94cad2 Merge pull request #31260 from mlaventure/bump-runc-17.03
[17.03] Bump runc to a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
2017-02-23 01:07:05 -08:00
Kenfe-Mickael Laventure
e285c70dec Bump runc to a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-02-23 01:05:38 -08:00
Aaron Lehmann
ff70cbf5ea Shutdown leaks an error when the container was never started
I found that sometimes tasks would end up in a rejected state when
trying to update them quickly. The problem was that Shutdown could fail
if called before the container was started. Instead of returning an
error in this case, Shutdown should succeed. This allows tasks to
progress to the "shutdown" state as expected.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 37b492ae1b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-23 00:00:01 -08:00
Victor Vieux
4fa77953f8 update CHANGELOG
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 23:59:15 -08:00
Yong Tang
3599289e2c Fix duplicate mount point for --volumes-from in docker run
This fix tries to fix the issue raised in 21845. The issue with 21845
is that if multiple `--volumes-from` with the same destination has been
specified, then one volume will be overridden by the other. This will mess
up with volumes reference and prevent the overridden volume from
being removed at the end.

Issue 21845 was observed with `docker-compose` though it is possible to
emulate the same behavior with `docker` alone:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Second case:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -v /tmp/data:/tmp/data -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Third case: Combination of --volumes-from and `HostConfig.Mounts` (API only)

This fix tries to address the issue by return an error if duplicate
mount points was used with `--volumes-from`.

An integration test has been added.

This fix fixes 21845.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 9526e5c6ae)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 23:37:49 -08:00
Victor Vieux
49849eda4a Merge pull request #31270 from thaJeztah/17.03-cherry-pick-29076
[17.03] Block obsolete and unusual socket families in the default seccomp profile
2017-02-22 22:56:55 -08:00
Victor Vieux
d06b03a99d Merge pull request #31274 from tonistiigi/update-containerd
[17.03.x] vendor: update containerd to 977c511ed
2017-02-22 19:38:23 -08:00
Victor Vieux
455ebb8892 Merge pull request #31271 from thaJeztah/cherry-pick-changelog-validation
[17.03] Cherry pick changelog validation
2017-02-22 19:38:05 -08:00
Victor Vieux
d77ec85abc Merge pull request #31275 from thaJeztah/17.03-swagger-cherry-picks
17.03 swagger cherry picks
2017-02-22 18:26:57 -08:00
Nalin Dahyabhai
4730409857 Synchronize the cursor returned by followJournal
Make sure that the cursor value returned by followJournal() is the last
of the values returned by its goroutine's calls to drainJournal() by
waiting for it, rather than returning a value that may be superceded by
another if we're singalling the goroutine that it should exit by closing
a pipe.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
(cherry picked from commit d57c330617)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 17:51:27 -08:00
Victor Vieux
44aec1b692 add -ce support
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 17:38:37 -08:00
Victor Vieux
f2738cd135 Merge pull request #31277 from thaJeztah/17.03-update-authors
[17.03.x] update authors
2017-02-22 17:32:06 -08:00
Victor Vieux
716c92c6ae
Merge pull request #31276 from thaJeztah/update-authors
Update authors
(cherry picked from commit 1948cc5fac)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 02:26:36 +01:00
Victor Vieux
c984bbf871
Merge pull request #31203 from yongtang/02202017-Swagger-ContainerSpec
Add missing fields in Swagger docs
(cherry picked from commit 19cd2aa389)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 01:05:54 +01:00
Tonis Tiigi
c7f67ed835 vendor: update containerd to 977c511ed
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-02-22 16:04:23 -08:00
Sebastiaan van Stijn
cecae2c5ad
Merge pull request #31204 from yongtang/31179-Swagger-Secrets
Add missing Secrets in Swagger docs
(cherry picked from commit cf8408106d)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 00:57:24 +01:00
Vincent Demeester
350ecb34e9
Merge pull request #30954 from yongtang/29448-swagger-version
Improve documentation of `Version` usage for Swarm API
(cherry picked from commit 89fe0e1b14)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 00:56:22 +01:00
Kenfe-Mickaël Laventure
3804b6d408
Merge pull request #30391 from andrewhsu/check-changelog-date
validate CHANGELOG.md dates are in descending order
(cherry picked from commit 5e74dc11e3)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 00:38:39 +01:00
Vincent Demeester
39781f92b3
Merge pull request #29208 from andrewhsu/validate-changelog
validate CHANGELOG.md is well-formed
(cherry picked from commit 59ba895a0f)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 00:37:43 +01:00
Kenfe-Mickael Laventure
52a7b8350a Prevent freeing a possible invalid pointer from journald
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 81630df854)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 15:37:04 -08:00
Sebastiaan van Stijn
1235b56fbc Merge pull request #29076 from justincormack/seccomp-socket-to-them
Block obsolete and unusual socket families in the default seccomp profile
(cherry picked from commit 48184351c9)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 00:27:29 +01:00
Victor Vieux
9fb5c83df0 Merge pull request #31205 from vieux/update_changelog_17.03
update CHANGELOG for 17.03.0-ce
2017-02-22 15:05:27 -08:00
Antonio Murdaca
91d33f250b image/cache: fix isValidParent logic
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 1cf4b2b8bd)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 14:47:09 -08:00
Victor Vieux
fa43a64f9c update CHANGELOG for 17.03.0-ce
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 12:03:09 -08:00
Vincent Demeester
d7bc6e4e7c Merge pull request #31242 from thaJeztah/17.03-docs-cherry-picks
17.03 docs cherry picks
2017-02-22 11:13:07 +01:00
Vincent Demeester
f6b33c65d5
Merge pull request #31034 from erxian/refine-service-update-document
add rollback explanation to docker service update command document
(cherry picked from commit 75843d36aa)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:49:16 +01:00
Sebastiaan van Stijn
23de3ee83b
Merge pull request #31023 from mstanleyjones/fix_liquid_errors
Fix some Liquid errors
(cherry picked from commit 88de5c36c7)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:49:10 +01:00
Sebastiaan van Stijn
93daa00ee6
Merge pull request #30965 from YuPengZTE/devDes
fix typo
(cherry picked from commit a8f4d82176)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:49:03 +01:00
Sebastiaan van Stijn
1f1b15ae4c
Merge pull request #30956 from yongtang/02122017-deprecated-login-email-removal
Add missing link in deprecated.md
(cherry picked from commit b5b6752230)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:48:56 +01:00
Sebastiaan van Stijn
411ff56edf
Merge pull request #30921 from anusha-ragunathan/debug_docs
Add plugin socket related debug docs.
(cherry picked from commit fddab1444f)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:48:50 +01:00
Sebastiaan van Stijn
fdd29d9085
Merge pull request #30898 from allencloud/add-link-query-in-container-rm-api-doc
add link query in container rm api doc
(cherry picked from commit b89aff1afa)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:48:39 +01:00
Sebastiaan van Stijn
c611906062
Merge pull request #30804 from mstanleyjones/cli_fixups
Cli fixups
(cherry picked from commit 40dbbd3f9b)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:48:21 +01:00
Sebastiaan van Stijn
8893cd6095
Merge pull request #30802 from anusha-ragunathan/debug_docs
Add plugin debug docs.
(cherry picked from commit d4be5a2f67)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:48:15 +01:00
Sebastiaan van Stijn
f64a1832bd
Merge pull request #30789 from vdemeester/carry-update-docker-stack-experimental
Update docker stack experimental notes
(cherry picked from commit c5a592a0a4)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:48:10 +01:00
Sebastiaan van Stijn
0a506d9429
Merge pull request #30774 from aaronlehmann/swarm-leave-docs-fix
Fix grammatical error in swarm_leave.md
(cherry picked from commit 9e80a2a457)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:48:04 +01:00
Sebastiaan van Stijn
f28a1d3c23
Merge pull request #30663 from Mashimiao/reference-cmdline-service-tfix
reference/commandline: small tfix
(cherry picked from commit 32697b57c8)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:59 +01:00
Vincent Demeester
e795408586
Merge pull request #30620 from thaJeztah/carry-29590
some grammatical errors
(cherry picked from commit deb0885419)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:53 +01:00
Vincent Demeester
56da5fa29b
Merge pull request #30619 from johndmulhausen/patch-3
Fix for 404 in docs
(cherry picked from commit 1de72681b5)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:45 +01:00
Sebastiaan van Stijn
84f026ba7e
Merge pull request #30553 from lewisdaly/21050-improve-user-namespace-docs
Updated dockerd docs with note about user namespaces
(cherry picked from commit d6b1b532a1)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:39 +01:00
Sebastiaan van Stijn
492f2ab8fe
Merge pull request #30524 from mstanleyjones/30149_update_plugin_apidocs
Update plugin_volume apidocs for v2
(cherry picked from commit 3dc87714d1)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:33 +01:00
Misty Stanley-Jones
137b05e9f5
Merge pull request #30523 from nathanleclaire/document_init
Document --init flag for docker run
(cherry picked from commit e0cc664cc3)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:27 +01:00
Sebastiaan van Stijn
48ea08613f
Merge pull request #30387 from coolljt0725/fix_typo
typo: fix typo in api documents
(cherry picked from commit de1a403810)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:21 +01:00
Vincent Demeester
8b34bd1980
Merge pull request #30130 from ijc25/clarify-cp-docs
Clarify `cp` documentation behaviour with trailing "/."
(cherry picked from commit 8b7ba17d33)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:16 +01:00
Sebastiaan van Stijn
6e9f3fda73
Merge pull request #30094 from miaoyq/complete-opt-for-plugin-install
Complete the options for 'docker plugin install'
(cherry picked from commit 8c7651998f)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:10 +01:00
Sebastiaan van Stijn
e688aacaa5
Merge pull request #30011 from davidwilliamson/patch-1
Provide password to volume create command
(cherry picked from commit 36db5f6f68)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:47:04 +01:00
Vincent Demeester
03ed0afa29
Merge pull request #30000 from ralphtheninja/master
Attempts -> MaxAttempts in /services/create
(cherry picked from commit 4166801f60)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:58 +01:00
Sebastiaan van Stijn
27fb9af0e6
Merge pull request #29989 from yuexiao-wang/fix-url-alias
Fix incorrect alias and URL
(cherry picked from commit 03d28f75b8)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:53 +01:00
Alexander Morozov
d9e0ef7cc8
Merge pull request #29830 from timthelion/issue29821
Docs: Be more clear when specifying valid formats for strings
(cherry picked from commit effc91e7a5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:48 +01:00
Vincent Demeester
ff8f643ce1
Merge pull request #29774 from miaoyq/complete-plugin-create-docs-content
Complete the document content
(cherry picked from commit 5374d53322)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:42 +01:00
Sebastiaan van Stijn
d38979b8bb
Merge pull request #29763 from omallo/29729-dostorage-plugin-docs
Reference new DigitalOcean plugin (Closes #29729)
(cherry picked from commit 841968d55c)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:36 +01:00
Sebastiaan van Stijn
6458b4e951
Merge pull request #29744 from yuexiao-wang/update-docker-ps
Update the field 'CONTAINER ID' for docker ps
(cherry picked from commit 01c62d6e54)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:31 +01:00
Vincent Demeester
a405b95bcf
Merge pull request #29699 from yuexiao-wang/update-index
Update the index of docker command line
(cherry picked from commit af843c53f8)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:24 +01:00
Sebastiaan van Stijn
676b256bf2
Merge pull request #29696 from zhenghenghuo/branch-two
fix some typos
(cherry picked from commit 38178cda41)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:18 +01:00
Akihiro Suda
db2e6cbc86
Merge pull request #29693 from davidxia/fix-typo
Fix typo in docs
(cherry picked from commit fb03b56b9b)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:12 +01:00
Sebastiaan van Stijn
25e8ff2b02
Merge pull request #29615 from londoncalling/docs-glossary-followup-PR#29561
followup to incorporate review comments per previous reviews on PR#29561
(cherry picked from commit b39b0c4596)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:07 +01:00
Vincent Demeester
ba82978208
Merge pull request #29603 from mstanleyjones/docker_diff_improvements
Clarify what docker diff shows
(cherry picked from commit 0ca3e84227)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:46:02 +01:00
Vincent Demeester
0e3248ebeb
Merge pull request #29600 from allencloud/update-docs-about-service-update
update service update in docs
(cherry picked from commit 524704143b)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:45:56 +01:00
Brian Goff
d383ff9e4d
Merge pull request #29589 from lixiaobing10051267/masterDockerPs
field NAMES ommitted after docker ps in commit.md
(cherry picked from commit 9eb9abea6d)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:45:49 +01:00
Sebastiaan van Stijn
23c03e1146
Merge pull request #29569 from allencloud/update-docs-about-oom-score-adj
update docs about  --oom-score-adj
(cherry picked from commit 0d93970c52)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:45:43 +01:00
Sebastiaan van Stijn
199cd1e36e
Merge pull request #29561 from londoncalling/docs-glossary-d4mac-d4win
updates to glossary re: d4mac, d4win, toolbox per user request
(cherry picked from commit fb41283e49)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:45:37 +01:00
Misty Stanley-Jones
114aa22e97
Merge pull request #29559 from mstanleyjones/define_bridge
Define bridge networks
(cherry picked from commit c621fbce04)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:45:30 +01:00
Vincent Demeester
8051adc7f3
Merge pull request #29541 from tim-zju/spellError
spell error: in other parts, they are lower-case
(cherry picked from commit 8a41c1d548)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:45:20 +01:00
Vincent Demeester
a2ca630175
Merge pull request #29468 from hongbin/volume-plugin-fuxi
Add Fuxi Volume Plugin to the docs
(cherry picked from commit 13f45768f0)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-22 00:45:09 +01:00
Victor Vieux
ce07fb6b0f fix CHANGELOG date
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-19 21:03:35 -08:00
Victor Vieux
1c44f35eb1 bump 17.03.1-ce-rc1
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-19 21:02:06 -08:00
Victor Vieux
d1c1b391bc Merge pull request #31170 from aboch/c1.13.x
[1.13.x/17.03.x] Vendoring libnetwork @ce28404
2017-02-19 15:42:59 -08:00
Sebastiaan van Stijn
8b1112be3b Merge pull request #31165 from vieux/update_version_client
[1.13] update client/client.go DefaultVersion
2017-02-19 13:57:04 -08:00
Alessandro Boch
855eb121aa Vendoring libnetwork @ce28404
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-19 13:35:31 -08:00
Victor Vieux
eb04072245 update client/client.gg DefaultVersion
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-19 01:26:16 -08:00
Victor Vieux
c9e1a9e16d Merge pull request #31150 from thaJeztah/1.13.2-completion-scripts
17.03 bash/zsh completion script cherry-picks
2017-02-19 00:46:42 -08:00
Victor Vieux
c9ae02ec59 Merge pull request #31143 from aaronlehmann/vendor-swarmkit-caa9c95
[1.13] Vendor swarmkit 30a4278
2017-02-19 00:46:21 -08:00
Victor Vieux
19460e43f4 Merge pull request #31155 from justincormack/1.13-sync-file-range
[1.13] Allow sync_file_range2 on supported architectures.
2017-02-19 00:39:20 -08:00
Victor Vieux
2a46799a87 Merge pull request #31140 from thaJeztah/1.13.2-cherry-picks
17.03 cherry picks
2017-02-19 00:36:22 -08:00
Gabriel Linder
aedc0ca2fd Allow sync_file_range2 on supported architectures.
Signed-off-by: Gabriel Linder <linder.gabriel@gmail.com>
2017-02-18 15:53:09 +00:00
Brian Goff
05516452d6
Merge pull request #30945 from sdurrheimer/zsh-completion-plugin
Add zsh completion for missing 'docker plugin' commands and options
(cherry picked from commit da9a162301)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-18 00:14:30 -08:00
Brian Goff
b53cef8425
Merge pull request #30944 from sdurrheimer/zsh-completion-build-squash
Add zsh completion for 'docker build --squash'
(cherry picked from commit 0d9bb4ee12)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-18 00:14:22 -08:00
Brian Goff
b975e02386
Merge pull request #30943 from sdurrheimer/zsh-completion-checkpoint
Add zsh completion for 'docker checkpoint' commands
(cherry picked from commit 4f6e4bfd02)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-18 00:14:15 -08:00
Brian Goff
aaff3d513e
Merge pull request #30941 from sdurrheimer/zsh-completion-service-logs
Add zsh completion for 'docker service logs' command
(cherry picked from commit 03db46362e)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-18 00:14:06 -08:00
Sebastiaan van Stijn
d4897c746f
Merge pull request #30940 from sdurrheimer/zsh-completion-swarm-unlock-cmds
Add zsh completion for 'docker swarm unlock|unlock-key' commands
(cherry picked from commit 27ab008626)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-18 00:13:59 -08:00
Vincent Demeester
9287b8f99e
Merge pull request #30939 from sdurrheimer/zsh-completion-swarm-init-update
Add zsh completion for missing 'docker swarm init|update' options
(cherry picked from commit 5d47cb901b)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-18 00:13:50 -08:00
Kenfe-Mickaël Laventure
7a02f05068
Merge pull request #30823 from albers/completion-plugin-upgrade
Add bash completion for `docker plugin upgrade`
(cherry picked from commit c9fa3eed1b)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-18 00:13:31 -08:00
Sebastiaan van Stijn
d4e2280b0f Merge pull request #31134 from thaJeztah/update-swagger
[1.13.x] swagger cherry-picks
2017-02-17 22:26:43 -08:00
Alexander Morozov
ecfddcf227
Merge pull request #29702 from WeiZhang555/stats-all-format-name-panic
Send "Name" and "ID" when stating stopped containers
(cherry picked from commit 22472c8be5)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:15:04 -08:00
Sebastiaan van Stijn
b0e4cf1ad2
Merge pull request #31141 from thaJeztah/swarm-node-error-return-503
fix status-code for "locked" swarm and "certificate expired"
(cherry picked from commit 6486924f0b)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:05:10 -08:00
Vincent Demeester
dffbf0bc73
Merge pull request #31103 from tonistiigi/update-docs-link
Update storage driver options link
(cherry picked from commit e1839ab953)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:05:03 -08:00
Brian Goff
671a4aa4a4
Merge pull request #31070 from cpuguy83/31060_fix_log_read_spin
Fix cpu spin waiting for log write events
(cherry picked from commit 39851eac0c)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:04:56 -08:00
Brian Goff
46af6a6a41
Merge pull request #31006 from vdemeester/30991-secret-mode-in-stack-deploy
Set 0444 as default secret mode in stack deploy
(cherry picked from commit a12454d7a9)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:04:50 -08:00
Brian Goff
87a53468b2
Merge pull request #30113 from thaJeztah/fix-autoremove-on-older-api
Don't use AutoRemove on older daemons
(cherry picked from commit e74623d283)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:04:44 -08:00
Victor Vieux
fe375a64db
Merge pull request #31055 from Microsoft/jjh/fix30278
Windows: Retry workaround for RS1/RS2 compute system enumeration
(cherry picked from commit 7761c69e23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:04:37 -08:00
Tõnis Tiigi
2e440580bc
Merge pull request #30223 from mlaventure/fix-logwatcher-deadlock
Close logwatcher on context cancellation
(cherry picked from commit 0566f3ffc4)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:04:30 -08:00
Justin Cormack
4122443aa7
Merge pull request #30893 from Microsoft/jjh/disabletesttemporarily
Windows: Temporarily disable TestBuildLastModified
(cherry picked from commit eaffb3099a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:04:23 -08:00
Alexander Morozov
e301d956b7
Merge pull request #30776 from WeiZhang555/stats-all-format-name-panic-cli
Fix panic of "docker stats --format {{.Name}} --all"
(cherry picked from commit f5116c6802)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:04:16 -08:00
Sebastiaan van Stijn
1c47c89d76
Merge pull request #29497 from yongtang/29486-docker-build-tmp-file
Clean up tmp files for interrupted `docker build`
(cherry picked from commit 6138a02c87)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 22:03:36 -08:00
Victor Vieux
7e11df6273 Merge pull request #31138 from aboch/c1.13.x
[1.13.x] Release the network attachment on allocation failure
2017-02-17 18:18:46 -08:00
Aaron Lehmann
b326920b3e Vendor swarmkit 30a4278
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-02-17 17:46:12 -08:00
Sebastiaan van Stijn
56e99a8791
fix changes for 1.13.x branch
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 17:21:58 -08:00
Alessandro Boch
9e74ea8594 Release the network attachment on allocation failure
- otherwise the attachment task will stay in store and
  consume IP addresses and there is no way to remove it.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-17 16:05:49 -08:00
Brian Goff
740fbef836 Merge pull request #30952 from yongtang/02122017-swagger-attachable
Add `attachable` for network object in swagger api docs
(cherry picked from commit 0464441fb1)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 13:24:41 -08:00
Vincent Demeester
9dcb36dfa2 Merge pull request #30734 from allencloud/add-400-status-code-for-events-endpoint
add status code 400 for api endpoint /events
(cherry picked from commit f3da980a45)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 13:24:41 -08:00
allencloud
9f46122c94 add missing filter type and sort filter type in alphabets
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit da1f05d66d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 13:24:41 -08:00
Anusha Ragunathan
951ffc056b Merge pull request #30701 from allencloud/add-status-code-404-for-plugin-in-api-doc
add status code 404 for plugin api endpoint enable and disable
(cherry picked from commit 0113128b2a)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 13:24:40 -08:00
Sebastiaan van Stijn
ed6e849a1c Merge pull request #29906 from allencloud/update-events-related-things
update events related doc and swagger.yml
(cherry picked from commit dea528e8cd)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 13:24:40 -08:00
Sebastiaan van Stijn
e7e23df3f6 Merge pull request #29808 from jmzwcn/issue29796
API: Delete container can return 409, but that isn't documented.
(cherry picked from commit 86f962a4a8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 13:24:40 -08:00
Sebastiaan van Stijn
890f4c7aa5
Merge pull request #26576 from allencloud/change-cluster-response-status-code
update response status code for cluster request
(cherry picked from commit a58b5830b1)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-17 13:24:24 -08:00
Brian Goff
30a5e20cc0 Merge pull request #31011 from aboch/c1.13.x
[1.13.x] Vendoring libnetwork @bba65e5
2017-02-15 16:26:27 -05:00
Alexander Morozov
b3b30b0dcd Merge pull request #31030 from aboch/c1.13.x-2
[1.13.x] Vendoring swarmkit @c7df892
2017-02-15 09:32:45 -08:00
Alessandro Boch
2b0d7d2d86 [1.13.x] Vendoring swarmkit @c7df892
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-14 21:08:59 -08:00
Alessandro Boch
2e544b1513 [1.13.x] Vendoring libnetwork @bba65e5
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-14 09:42:44 -08:00
Vincent Demeester
e5a90d46e3 Merge pull request #30875 from albers/fix-30858
Fix bash completion for `docker service`
2017-02-12 22:00:28 +01:00
Harald Albers
018981111c Fix bash completion for docker service
Signed-off-by: Harald Albers <github@albersweb.de>
2017-02-09 15:35:46 +01:00
Victor Vieux
092cba3727 bump version to 1.13.1
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-07 21:58:41 -08:00
Victor Vieux
f26487b568 Merge pull request #30806 from vieux/bump_api_version
[1.13.x] Bump api version to 1.26
2017-02-07 21:46:17 -08:00
Victor Vieux
fc0b5dbedb bump api version to 1.26
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-07 16:42:41 -08:00
Brian Goff
19d67e6e4a Update swagger spec for plugin upgrade
This was added in 03c6949739 but spec was
not updated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ae48cd04da)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-07 12:04:03 -08:00
Christopher Jones
e29c142293 added ppc64le and s390x fixes for manpages
Fixes manpages for p and z by downloading a specific version
of go instead of relying on the distro version.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit 5bec1b6864)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-07 11:59:54 -08:00
Victor Vieux
54f71fd84a bump version to 1.13.1-rc2
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-06 15:04:17 -08:00
Stephen J Day
516792001a cluster/executor: check mounts at start
While it is important to not create controllers for an invalid task,
certain properties should only be checked immediately before use. Early
host validation of mounts prevents resolution of the task Executor when
the mounts are not relevant to execution flow. In this case, we have a
check for the existence of a bind mount path in a creation function that
prevents a task controller from being resolved. Such early validation
prevents one from interacting directly with a controller and result in
unnecessary error reporting.

In accordance with the above, we move the validation of the existence of
host bind mount paths to the `Controller.Start` phase. We also call
these "checks", as they are valid mounts but reference non-existent
paths.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 92899ffac8)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-06 15:02:23 -08:00
Andrew Hsu
14deb7d32c remove musl-dev in man/Dockerfile.armhf
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 1c7a66eda7)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-06 14:49:22 -08:00
Andrew Hsu
26ec0e71d1 use precompiled go from google, needs debian to work
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit a6886bfc52)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-06 14:49:16 -08:00
Andrew Hsu
5f696e6d48 from golang:1.7.5-alpine for docker-manpage-dev
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 7b52ec5f10)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-06 14:49:09 -08:00
Tibor Vass
0406faf887 Show stacktrace in daemon logs only if 500 internal error
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f7d9bb6248)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-06 13:02:39 -08:00
Victor Vieux
f6bf85f99c Merge pull request #30730 from dmcgowan/update-go-connections-1.13
[1.13] Update go connections 1.13
2017-02-03 20:53:35 -08:00
Victor Vieux
0220459168 Merge pull request #30728 from cpuguy83/plugin_upgrade_1.13
[1.13] Add plugin upgrade
2017-02-03 20:53:23 -08:00
Derek McGowan
b47fa5a5d1
Update go-connections package
fixes #30450

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-02-03 16:51:49 -08:00
Brian Goff
1a17bc6bc4 Make propagated mount persist outside rootfs
This persists the "propagated mount" for plugins outside the main
rootfs. This enables `docker plugin upgrade` to not remove potentially
important data during upgrade rather than forcing plugin authors to hard
code a host path to persist data to.

Also migrates old plugins that have a propagated mount which is in the
rootfs on daemon startup.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e8307b868d)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-02-03 19:15:23 -05:00
Brian Goff
96b0320d5c Add docker plugin upgrade
This allows a plugin to be upgraded without requiring to
uninstall/reinstall a plugin.
Since plugin resources (e.g. volumes) are tied to a plugin ID, this is
important to ensure resources aren't lost.

The plugin must be disabled while upgrading (errors out if enabled).
This does not add any convenience flags for automatically
disabling/re-enabling the plugin during before/after upgrade.

Since an upgrade may change requested permissions, the user is required
to accept permissions just like `docker plugin install`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 03c6949739)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-02-03 19:14:56 -05:00
Yong Tang
905cf26b43 Fix misleading default for --replicas
This fix tries to address the issue raised in 29291 where
the output of `--replicas` in `service create/update`:
```
      --replicas uint                    Number of tasks (default none)
```
is misleading. User might incorrectly assume the number of replicas
would be `0` (`none`) by default, while the actual default is `1`.

The issue comes from the fact that some of the default values are
from daemon and it is not possible for client to find out the default
value.

In this case, it might be better to just simply not displaying `(default none)`.

This fix returns "" for `Uint64Opt` so that `(default none)` is hidden.

In addition to `--replicas`, this fix also changes
`--restart-delay`, `--restart-max-attempts`, `--stop-grace-period`,
`--health-interval`, `--health-timeout`, and `--restart-window`
in a similiar fashion.

New Output:
```
      --health-interval duration         Time between running the check (ns|us|ms|s|m|h)
      --health-timeout duration          Maximum time to allow one check to run (ns|us|ms|s|m|h)
...
      --replicas uint                    Number of tasks
...
      --restart-delay duration           Delay between restart attempts (ns|us|ms|s|m|h)
      --restart-max-attempts uint        Maximum number of restarts before giving up
      --restart-window duration          Window used to evaluate the restart policy (ns|us|ms|s|m|h)
...
      --stop-grace-period duration       Time to wait before force killing a container (ns|us|ms|s|m|h)
```

The docs has been updated. Note the docs for help output of `service create/update`
is out of sync with the current master. This fix replace with the update-to-date
help output.

This fix fixes 29291.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit acc93db32b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-03 00:48:59 -08:00
John Howard
202df64a3b Windows: Unify workdir handling
Signed-off-by: John Howard <jhoward@microsoft.com>

Working directory processing was handled differently for Hyper-V and Windows-Server containers, as annotated in the builder documentation (updated in this PR). For Hyper-V containers, the working directory set by WORKDIR was not created. This PR makes Hyper-V containers work the same as Windows Server containers (and the same as Linux).

Example (only applies to Hyper-V containers, so not reproducible under CI environment)
Dockerfile:
FROM microsoft/nanoserver
WORKDIR c:\installer
ENV GOROOT=c:\installer
ADD go.exe .
RUN go --help
Running on Windows Server 2016, using docker master without this change, but with daemon set to --exec-opt isolation=hyperv as it would be for Client operating systems.
PS E:\go\src\github.com\docker\docker> dockerd -g c:\control --exec-opt isolation=hyperv
time="2017-02-01T15:48:09.657286100-08:00" level=info msg="Windows default isolation mode: hyperv"
time="2017-02-01T15:48:09.662720900-08:00" level=info msg="[graphdriver] using prior storage driver: windowsfilter"
time="2017-02-01T15:48:10.011588000-08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-02-01T15:48:10.016655800-08:00" level=info msg="Loading containers: start."
time="2017-02-01T15:48:10.460820000-08:00" level=info msg="Loading containers: done."
time="2017-02-01T15:48:10.509859600-08:00" level=info msg="Daemon has completed initialization"
time="2017-02-01T15:48:10.509859600-08:00" level=info msg="Docker daemon" commit=3c64061 graphdriver=windowsfilter version=1.14.0-dev
First with no explicit isolation:
PS E:\docker\build\unifyworkdir> docker build --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 7e0f41d08204
Removing intermediate container 236c7802042a
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in 8ea5237183c1
 ---> 394b70435261
Removing intermediate container 8ea5237183c1
Step 4/5 : ADD go.exe .
 ---> e47401a1745c
Removing intermediate container 88dcc28e74b1
Step 5/5 : RUN go --help
 ---> Running in efe90e1b6b8b
container efe90e1b6b8b76586abc5c1dc0e2797b75adc26517c48733d90651e767c8463b encountered an error during CreateProcess: failure in a Windows system call: The directory name is invalid. (0x10b) extra info: {"ApplicationName":"","CommandLine":"cmd /S /C go --help","User":"","WorkingDirectory":"C:\\installer","Environment":{"GOROOT":"c:\\installer"},"EmulateConsole":false,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}
PS E:\docker\build\unifyworkdir>
Then forcing process isolation:
PS E:\docker\build\unifyworkdir> docker build --isolation=process --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 350c955980c8
Removing intermediate container 8339c1e9250c
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in bde511c5e3e0
 ---> b8820063b5b6
Removing intermediate container bde511c5e3e0
Step 4/5 : ADD go.exe .
 ---> e4ac32f8902b
Removing intermediate container d586e8492eda
Step 5/5 : RUN go --help
 ---> Running in 9e1aa235af5f
Cannot mkdir: C:\installer is not a directory
PS E:\docker\build\unifyworkdir>
Now compare the same results after this PR. Again, first with no explicit isolation (defaulting to Hyper-V containers as that's what the daemon it set to) - note it now succeeds 😄
PS E:\docker\build\unifyworkdir> docker build --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 4f319f301c69
Removing intermediate container 61b9c0b1ff6f
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in c464a1d612d8
 ---> 96a26ab9a7b5
Removing intermediate container c464a1d612d8
Step 4/5 : ADD go.exe .
 ---> 0290d61faf57
Removing intermediate container dc5a085fffe3
Step 5/5 : RUN go --help
 ---> Running in 60bd56042ff8
Go is a tool for managing Go source code.

Usage:

        go command [arguments]

The commands are:

        build       compile packages and dependencies
        clean       remove object files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         run go tool fix on packages
        fmt         run gofmt on package sources
        generate    generate Go files by processing source
        get         download and install packages and dependencies
        install     compile and install packages and dependencies
        list        list packages
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

        c           calling between Go and C
        buildmode   description of build modes
        filetype    file types
        gopath      GOPATH environment variable
        environment environment variables
        importpath  import path syntax
        packages    description of package lists
        testflag    description of testing flags
        testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

The command 'cmd /S /C go --help' returned a non-zero code: 2
And the same with forcing process isolation. Also works 😄
PS E:\docker\build\unifyworkdir> docker build --isolation=process --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> f423b9cc3e78
Removing intermediate container 41330c88893d
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in 0b99a2d7bf19
 ---> e051144bf8ec
Removing intermediate container 0b99a2d7bf19
Step 4/5 : ADD go.exe .
 ---> 7072e32b7c37
Removing intermediate container a7a97aa37fd1
Step 5/5 : RUN go --help
 ---> Running in 7097438a54e5
Go is a tool for managing Go source code.

Usage:

        go command [arguments]

The commands are:

        build       compile packages and dependencies
        clean       remove object files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         run go tool fix on packages
        fmt         run gofmt on package sources
        generate    generate Go files by processing source
        get         download and install packages and dependencies
        install     compile and install packages and dependencies
        list        list packages
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

        c           calling between Go and C
        buildmode   description of build modes
        filetype    file types
        gopath      GOPATH environment variable
        environment environment variables
        importpath  import path syntax
        packages    description of package lists
        testflag    description of testing flags
        testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

The command 'cmd /S /C go --help' returned a non-zero code: 2
PS E:\docker\build\unifyworkdir>

(cherry picked from commit f42033ba94)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-03 00:40:46 -08:00
Madhu Venugopal
f709fd4e5b Merge pull request #30692 from aboch/c1.13.x
[1.13.x] Vendoring libnetwork @45b4086 for 1.13.x
2017-02-02 18:32:09 -08:00
Alessandro Boch
17e6f81948 Revert "Fix IT case for network name validation"
This reverts commit 9cebccfb95.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-02 15:32:59 -08:00
Alessandro Boch
778f9a86c4 Vendoring libnetwork @45b4086 for 1.13.x
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-02 12:58:16 -08:00
Vincent Demeester
fbc84e24aa Merge pull request #30646 from vieux/1.13.1-rc2-cherrypicks-2
1.13.1 rc2 cherrypicks 2
2017-02-02 11:31:19 +01:00
Sebastiaan van Stijn
553d56d456 install dirmngr if needed
as of Ubuntu Yakkety, dirmngr is now in a separate
package (see https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1634464)

this patch updates the install script to install
the dirmngr package if it's not installed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f5263c8074)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-01 17:26:26 -08:00
Victor Vieux
6e2e808146 Merge pull request #30650 from aluzzardi/1.13.x-swarmkit-bump
[1.13.x] Re-vendor swarmkit to 1c7f003d75f091d5f7051ed982594420e4515f77
2017-02-01 15:54:56 -08:00
Victor Vieux
2556b7a70a Merge pull request #30649 from thaJeztah/1.13-bump-runc
[1.13.x] bump RunC / libcontainer to fix SELinux regression
2017-02-01 15:13:49 -08:00
Andrea Luzzardi
14153795ba Re-vendor swarmkit to 1c7f003d75f091d5f7051ed982594420e4515f77
Includes docker/swarmkit#1914

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2017-02-01 13:23:39 -08:00
Harald Albers
ec0e3fe4e2 Add bash completion for docker checkpoint
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 926fa56c0d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-01 12:35:00 -08:00
Sebastiaan van Stijn
d00e249c26
[1.13.x] bump RunC / libcontainer to fix SELinux regression
This bumps RunC and libcontainer to fix a regression
in 1.13 that caused SELinux labels to not be
applied correctly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-01 12:27:00 -08:00
Tibor Vass
68f9fb9fd7 plugin: use pkg/errors in more places
Also provide stack trace output in daemon logs.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 26d0bac895)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-01 12:00:30 -08:00
John Howard
7b15b4a9b2 Revendor Microsoft/go-winio v0.3.8
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit da6739c99f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-01 12:00:11 -08:00
Christopher Jones
5e859cf3c1 Update systemd drop-in link
Right now it redirects, so change it to the correct one.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit 7c763b360a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-01 11:59:06 -08:00
Victor Vieux
96b87362e6 Merge pull request #30610 from mlaventure/update-containerd-1.13.x
[1.13.x] Update containerd to version aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
2017-01-31 17:56:51 -08:00
Victor Vieux
baf9288b78 Merge pull request #30574 from vieux/1.13.1-rc2-cherry
1.13.1-rc2 cherry-picks
2017-01-31 17:32:19 -08:00
Kenfe-Mickael Laventure
0311ed7b1c Update containerd to version aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-31 15:01:55 -08:00
allencloud
c74f17e91e add 400 status code for build api
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit c81a818b56)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-01-31 12:57:29 -08:00
unclejack
64856b7a24 Dockerfile*: bump Go to 1.7.5
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
(cherry picked from commit b6e2703230)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-01-31 12:57:29 -08:00
Anusha Ragunathan
c7f27f8c07 Add docs for service create based on plugins.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
(cherry picked from commit 62d399e811)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-01-31 12:55:45 -08:00
Joffrey F
171745b261 Fix typo in swagger.yaml for NetworkPrune operation
Signed-off-by: Joffrey F <joffrey@docker.com>
(cherry picked from commit 20c5fa3758)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-01-31 12:55:19 -08:00
Harald Albers
73b9bdc6cb Add bash completion for docker service logs
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 105231556a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-01-31 12:54:57 -08:00
Felix Abecassis
10d999d7ab install: map debian_version 9.X to debian stretch
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
(cherry picked from commit ac3d74b0b4)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-01-31 12:54:34 -08:00
Alexander Morozov
ee1b5c5944 Merge pull request #30579 from yongtang/1.13.x
[1.13.x] Cherry-pick SwarmKit update to 0af40501a9cc98cd3e9425d2e4246dd3eff5526e
2017-01-31 12:31:15 -08:00
Victor Vieux
c4d731c24c Merge pull request #30577 from justincormack/arm-seccomp-1.13
[1.13.x] Add two arm specific syscalls to seccomp profile
2017-01-30 17:15:27 -08:00
Yong Tang
1e0179589d [1.13.x] Cherry-pick SwarmKit update to 0af40501a9cc98cd3e9425d2e4246dd3eff5526e
This fix cherry-pick SwarmKit update to 0af40501a9cc98cd3e9425d2e4246dd3eff5526e
for branch 1.13.x. The following has been added:
- [docker/swarmkit#1909]: raft: Disable address change detection
- [docker/swarmkit#1910]: Fix issue in service update of published ports in host mode

This fix fixes #30199 in docker.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-30 15:22:48 -08:00
Justin Cormack
c1c5d30ee4 [1.13.x] Add two arm specific syscalls to seccomp profile
cherry pick #30545

These are arm variants with different argument ordering because of
register alignment requirements.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-30 23:01:28 +00:00
Victor Vieux
2527cfcc49 Merge pull request #30515 from vieux/1.13.1-rc1-changelog
bump to 1.13.1-rc1
2017-01-27 13:10:39 -08:00
Victor Vieux
de6c83de28 Merge pull request #30494 from vieux/cherry-pick-secrets-compose
[1.13.x] cherry-pick secrets to compose
2017-01-27 13:10:31 -08:00
Victor Vieux
e84317c735 bump to 1.13.1-rc1
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-27 11:46:09 -08:00
allencloud
e25c046488 update incorrect url in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 5ae95d6245)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-27 11:32:10 -08:00
Sebastiaan van Stijn
749f8bfee8 document DOCKER_HIDE_LEGACY_COMMANDS env-var
The `DOCKER_HIDE_LEGACY_COMMANDS` environment
variable was added in a7c8bcac2b
but not documented.

This adds the variable to the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2ef82fd237)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-27 11:31:55 -08:00
Lars-Magnus Skog
bdc5b347f5 update api docs on Placement.Constraints for services
Signed-off-by: Lars-Magnus Skog <ralphtheninja@riseup.net>
(cherry picked from commit 9c98bffc2b)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-27 11:31:34 -08:00
Janonymous
370e8f25d2 Fix json format of plugin
Signed-off-by: Janonymous <janonymous.codevulture@gmail.com>
(cherry picked from commit 2d24dbe896)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-27 11:31:20 -08:00
Harald Albers
e0c79df37d Add [OPTIONS] to usage of plugin disable|push
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit aad095f573)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-27 11:30:37 -08:00
Victor Vieux
e3441eb64c Merge pull request #30513 from mstanleyjones/1.13.x
Cherry-pick #30478 to 1.13.x
2017-01-27 11:10:08 -08:00
Victor Vieux
8d0198c59d fix cherry-pick
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-27 11:09:43 -08:00
Misty Stanley-Jones
ed7aea3533 Merge pull request #30478 from mstanleyjones/fix_broken_links
Fix broken relative links in old API docs
(cherry picked from commit 05d4c1314e)

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-01-27 09:48:48 -08:00
Victor Vieux
1b05e7aee7 Merge pull request #30331 from vieux/1.13.1-rc1-cherrypicks
1.13.1 rc1 cherrypicks
2017-01-26 19:21:38 -08:00
Victor Vieux
c5147e6ab5 Merge pull request #30467 from mavenugo/1.13-lncp
Vendoring libnetwork 2c8b683
2017-01-26 10:56:58 -08:00
Josh Hawn
692c98895f Add SecretUpdate docs to api/swagger.yaml
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

(cherry picked from commit 1cd5af59bf)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:38:32 -08:00
Josh Hawn
4dc1b6221d Add SecretUpdate method to client
closes #28678

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update cli/command/service/update_test.go

Fixes test build error:

  secretAPIClientMock does not implement "github.com/docker/docker/client".SecretAPIClient (missing SecretUpdate method)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

(cherry picked from commit 77b8465d7e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:38:25 -08:00
Daniel Nephin
1afa22733c Set default values for uid and gid to prevent errors when starting a service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 167b3f95b7)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:21:01 -08:00
Daniel Nephin
c19f50acef Rebase Compose v3.1 schema on the latest v3 schema.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit b4f23bbc69)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:20:55 -08:00
Daniel Nephin
6b70c68a7c Remove secrets as part of stack remove.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit f0a5531c46)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:20:49 -08:00
Daniel Nephin
909014d324 Test and fix external secrets in stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit b3427e43ed)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:20:36 -08:00
Daniel Nephin
1fed3349fb Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 6ec84ef76d)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:20:26 -08:00
Daniel Nephin
2f445705f9 Implement secret types for compose file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 9419e7df2b)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:19:49 -08:00
Daniel Nephin
118e55df62 Add v3.1 schema and support validating multiple version.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 65374488f9)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 06:18:26 -08:00
Madhu Venugopal
e6f89d1af5 Vendoring libnetwork 2c8b683
to address #30295

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-26 04:38:21 -08:00
Alessandro Boch
819bcf8182 Remove attachable network on swarm leave
- When the node leaves the cluster, if any user run
  container(s) is connected to the swarm network,
  then daemon needs to detach the container(s) and
  remove the network.

Signed-off-by: Alessandro Boch <aboch@docker.com>
(cherry picked from commit 3cedca5d53)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-26 04:31:34 -08:00
Sebastiaan van Stijn
3fc246ded2 Merge pull request #29732 from vdemeester/29676-deploy-indempotent
[1.13.x] Make docker stack deploy a little bit more idempotent
2017-01-26 12:47:23 +01:00
Victor Vieux
426c4cb747 Merge pull request #30452 from dnephin/cherry-compose-refactor
Compose fixes for 1.13.1
2017-01-26 00:47:42 -08:00
Michael Irwin
017381aea4 Fixed secret creation usage during service create in docs
Using source, the following error is made:
invalid field in secret request: src

Signed-off-by: Michael Irwin <mikesir87@gmail.com>
(cherry picked from commit 9250117d58)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 22:17:04 -08:00
Sebastiaan van Stijn
214f42d541 Add "src" alias for --secret
This patch adds a "src" alias for `--secret`
to be consistent with `--mount`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 950658bbb6)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 22:16:32 -08:00
Yong Tang
a64c9357ca Fix incorrect Scope in network ls/inspect with duplicate network names
This fix tries to address the issue raised in 30242 where the `Scope`
field always changed to `swarm` in the ouput of `docker network ls/inspect`
when duplicate networks name exist.

The reason for the issue was that `buildNetworkResource()` use network name
(which may not be unique) to check for the scope.

This fix fixes the issue by always use network ID in `buildNetworkResource()`.

A test has been added. The test fails before the fix and passes after the fix.

This fix fixes 30242.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 05a831a775)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 22:13:13 -08:00
Darren Stahl
e7077f7d26 Windows: Add service dependency ConDrv
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit b2a7f6abb3)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 21:37:54 -08:00
Victor Vieux
328775ea4f removing trailing backslash in zsh completion
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 20:35:42 -08:00
Vincent Demeester
bf43d2a58d Make docker stack deploy a little bit more indempotent
Sort some slice fields before sending them to the swarm api so that it
won't trigger an update.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-25 20:31:09 -08:00
John Howard
6a9670b044 Windows: Bump to latest version of git
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 8a45eea2dd)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 20:07:49 -08:00
Christopher Jones
53576a5bf9 [ppc64le] use official go 1.7.4 binaries
go 1.7.4 introduced official go ppc64le binaries, so use those
instead of using older versions of go and building from src.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit 62ab6809bd)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 20:07:09 -08:00
Christopher Jones
6b4a835431 [project] bump go to go 1.7.4
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit 20e243780e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 20:06:06 -08:00
Daniel Nephin
92155e37b3 Add missing network.internal.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 16:43:05 -05:00
Daniel Nephin
7f396e8ea3 Update Compose schema to match docker-compose.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 16:43:05 -05:00
Daniel Nephin
d9bda3080a Add validation for compose schema bindata.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 16:43:05 -05:00
Daniel Nephin
007e492eac Add deps to test compose-file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 16:43:05 -05:00
Daniel Nephin
6bc7bc19df Fix some bad merges
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-25 16:43:02 -05:00
Tibor Vass
cbe6781501 plugins: add example docs for a rexray plugin
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 5f713cecc5)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-25 13:31:51 -08:00
Daniel Nephin
5bf7901f5d Replace vendor of aanand/compose-file with a local copy.
Add go-bindata for including the schema.

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

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

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

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

This fix fixes 30279.

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

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

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

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

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

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

Fixes #30148

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

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

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

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

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

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

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

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

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

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

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

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

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

This test is related to 30027.

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

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

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
(cherry picked from commit d14b7212ad)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-11 14:54:09 -08:00
Victor Vieux
2f2d055013 bump version to 1.13.0-rc6
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-11 09:36:57 -08:00
Tõnis Tiigi
fc82c4b391 Merge pull request #30044 from tonistiigi/update-runc-113
[v1.13] vendor: update runc to 2f7393a4
2017-01-11 08:37:36 -08:00
Madhu Venugopal
e0c07ab799 Merge pull request #30042 from aaronlehmann/vendor-swarmkit-296fcfc
[1.13] Update vendored swarmkit to 296fcfc
2017-01-10 20:59:14 -08:00
Tonis Tiigi
acbad31dcd vendor: update runc to 2f7393a4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-10 18:07:20 -08:00
Victor Vieux
7e792d6ca9 Merge pull request #30012 from tiborvass/plugin-devices-redone
[1.13] Plugins: Rename DeviceCreation to AllowAllDevices
2017-01-10 17:28:14 -08:00
Madhu Venugopal
c8083e8735 Modify network plugin test for swarm-mode
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-10 16:38:24 -08:00
Aaron Lehmann
18fd3885c6 Update vendored swarmkit to 296fcfc
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-10 16:07:45 -08:00
Tibor Vass
83b2782ea9 plugins: rename DeviceCreation to AllowAllDevices
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f265727bdf)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-01-10 15:21:46 -08:00
Alexander Morozov
ece7e8ba27 Merge pull request #30034 from aaronlehmann/vendor-swarmkit-70cb786
[1.13] Update vendored swarmkit to 70cb786
2017-01-10 15:19:17 -08:00
Tonis Tiigi
4b2b0eb608 Add workaround for possible SetClusterProvider deadlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-10 15:14:26 -08:00
Aaron Lehmann
3fc1510dff [1.13] Update vendored swarmkit to 70cb786
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-10 12:55:35 -08:00
Vincent Demeester
340f288211 Merge pull request #29962 from vieux/1.13.0-rc6-cherrypicks
1.13.0 rc6 cherrypicks
2017-01-10 10:09:04 +01:00
Victor Vieux
0b2a029e56 Merge pull request #30009 from thaJeztah/revert-27146
[1.13.x] Revert "Require continuation char to be last char in a line"
2017-01-09 17:45:17 -08:00
Brian Goff
b7f412ef44 Merge pull request #29958 from cpuguy83/1.13_fix_selinux_packaging
[1.13] Fix conflicts with newly updated selinux policies
2017-01-09 20:15:51 -05:00
Sebastiaan van Stijn
57c17882a3
Revert "Require continuation char to be last char in a line"
This reverts commit 105bc63295,
which (although correct), resulted in a backward incompatible
change.

We can re-implement this in future, after this changes
goes through a deprecation cycle

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-10 00:36:40 +01:00
Victor Vieux
25879cfa54 Merge pull request #29994 from vdemeester/29974-fix-external-network
[1.13.x] Few stack deploy network fixes
2017-01-09 14:40:54 -08:00
Victor Vieux
6c2fdb64d1 Merge pull request #30004 from dnephin/fix-1.13-stack-deploy-resources
[1.13] Fix parsing resources from compose file for stack deploy
2017-01-09 14:40:30 -08:00
Victor Vieux
3fc150171f Merge pull request #30007 from aaronlehmann/vendor-swarmkit-8ea08a3
[1.13] Update vendored swarmkit to 8ea08a3
2017-01-09 14:39:57 -08:00
Victor Vieux
53ac375422 Merge pull request #29905 from coolljt0725/cherry-pick-29721
1.13.x cherry-pick: Cherry pick 29721
2017-01-09 14:22:23 -08:00
Aaron Lehmann
831eeb38f1 [1.13] Update vendored swarmkit to 8ea08a3
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-09 11:45:04 -08:00
Daniel Nephin
f27a297595 Fix parsing resources from compose file for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-09 14:15:32 -05:00
Sebastiaan van Stijn
46af2edec2 un-fork go-memdb
commit 9322636c89
temporarily switched to a fork of go-memdb, because
a pull request that was needed was not yet merged
upstream.

this pull request was merged, so we can un-fork
this dependency.

this change does not bump the dependency, and
only un-forks. bumping the dependency should
be done in a separate change, if needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5f057f6350)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Aaron Lehmann
f2260228a7 vendor: Unfork logrus dependency
Vendor the latest official logrus release instead of a custom fork
(which now happens to be identical to the fork).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 11df2db538)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Victor Vieux
b2219f1bb5 remove -f on secret create and unify usage with other commands
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit db6652ca71)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Tonis Tiigi
7c8511236c Fix workdir cache invalidation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e160860054)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Harald Albers
b2e12626c7 Add bash completion for plugin names
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e7243a303a)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Yunxiang Huang
57a63f1ed2 Fix "zsh/_docker"
Signed-off-by: Yunxiang Huang <hyxqshk@vip.qq.com>
(cherry picked from commit c6544394b8)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Tonis Tiigi
d3bffd978a Set plugins used in tests back to original names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit f4798b98fc)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Harald Albers
40736b1848 Fix wrong command in changelog
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 1fe0270e72)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Vincent Demeester
462cd90f74
Create only network that are used
- default network is only created if needed
- it's possible to override default network configuration

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-09 12:56:58 +01:00
Vincent Demeester
19cf2b3d5f
Fix external network name not properly handle by stack deploy
Make sure we use the Network external name if it's not empty.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-09 12:26:02 +01:00
Sebastiaan van Stijn
1dded0dee4 Merge pull request #29895 from cpuguy83/cherry_pick_29893
[1.13.x] Fix race accessing plugin storage map
2017-01-07 13:03:34 +01:00
Brian Goff
9f0e745152 Merge pull request #29926 from aaronlehmann/vendor-swarmkit-7f910df
[1.13] Vendor swarmkit 7f910df
2017-01-06 16:19:39 -05:00
Brian Goff
464b205956 Fix conflicts with newly updated selinux policies
The base selinux policies on centos/rhel/oraclelinux have all been
updated in a way that conflicts with the policies we install with
`docker-engine-selinux`. This patch fixes these conflicts.

In addition, removes special cases for old/unsupported versions of
fedora in our selinux package, and change to use a single minimum
version for the selinux base policy package, as this is the minimum
version required to use our selinux policy package.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ec9a05e5e2)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-01-06 16:04:59 -05:00
Brian Goff
3b2982a2bb Fix race accessing plugin storage map
`plugins.GetAll()` was not locking the plugin map when checking if a
plugin exists, this can cause a race and potentially a panic if another
goroutine is trying to load a plugin into the map at the same time.

Also fixes a race during activation where a plugin inserts itself into
the plugin map but does not check if something else is already there.
This is already checked before trying to activate the plugin, however
the map lock is not held for this entire period, so other plugins may be
loaded during this time.
To fix, before inserting the plugin into the map, check if one with the
same name already exists and use that instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 21fcbb39b7)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-01-06 08:28:43 -05:00
Lei Jitang
d2e99882b9 Follow up #29365, fix fail to remove container after restart
Call daemon.Mount will increase the refcount of mounted path,
for those previous running containers, `Mount` call will make
the refcount to 2. see
https://github.com/docker/docker/blob/v1.13.0-rc4/daemon/graphdriver/counter.go#L38
```
	if !m.check {
		m.check = true
		if c.checker.IsMounted(path) {
			m.count++
		}
	}
	m.count++

```
graphdrive could restore on reboot after #22541, call
daemon.Mount to resore the graphdriver is not necessary.

And call `daemon.Mount` on restorting will mount all the containers
mounted layer even if it was stop.

This fix call Mount and then Unmount to get `BaseFs`

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-01-05 20:27:34 -05:00
Yong Tang
25b967e149 Allow containers to continue even if mount failed after live restore
This fix is a follow up to #29365. In #29365 a bug was fixed for
`docker exec -u user` after live restore by remounting.
However, #29365 will prevent containers from restored if mount failed.

In this fix, containers will be restored even if mount in that step failed.
Some functionalities might be missing (like `docker exec -u user`) but
at least it is possible to do certain operations like stop/restart/delete.

This fix is related to #29365.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 3003ae1d8b)
2017-01-05 20:27:19 -05:00
Aaron Lehmann
eb5273edd4 [1.13] Revendor swarmkit to 7f910df
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-05 14:53:47 -08:00
Vincent Demeester
46afc8f148 Change the way IPAM configuration is handled on stack deploy
We use the 'default' driver if none is specified.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 20:25:04 +01:00
Tibor Vass
1afd41e4f7 Merge pull request #29866 from vieux/1.13.0-rc5-cherrpicks
1.13.0 rc5 cherrypicks
2017-01-04 11:04:22 -08:00
Victor Vieux
43cc971d76 bump version to rc5
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 04:27:03 -08:00
Victor Vieux
7f20c11c47 Merge pull request #29878 from mavenugo/npfilter2
Cherry-pick #29877 : Use GetAllByCap to get list of network plugins in docker info
2017-01-04 14:54:32 -08:00
Madhu Venugopal
69240476d4 Swarmkit has enabled the plugin filtering logic based on the drivers
returned in "docker info". Currently info endpoint isnt using the
GetAllByCap, but relies on existing networks to get the plugin names.
This causes a basic issue when it comes to global network plugins which
swarm-mode relies on, wherein swarmkit will not be able to schedule the
network on the worker nodes due to the filtering logic.

In order to break this chicken & egg issue, we must start to use the
GetAllManagedPluginsByCap. We are unable to use GetAllByCap due to
various issues with Plugin-V1's lazy loading approach causing issues
especially during daemon restarts (which uses SystemInfo)

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-04 12:46:56 -08:00
Lei Jitang
a46dbbded9 Fix update clear the restart policy of monitor
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 737b5b1781)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Victor Vieux
4e9dd0e51c replace no-remove by sample-volume-plugin in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit bcead9282e)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Brian Goff
84f25c7cb8 Fix race/deadlock in v1 plugin handlers
When a plugin is activated, and then `plugins.Handle` is called to
register a new handler for a given plugin type, a deadlock occurs when
for anything which calls `waitActive`, including `Get`, and `GetAll`.

This happens because `Handle()` is setting `activated` to `false` to
ensure that plugin handlers are run on next activation.
Maybe these handlers should be called immediately for any plugins which
are already registered... but to preserve the existing behavior while
fixing the deadlock, track if handlers have been run on plugins and
reset when a new handler is registered.

The simplest way to reproduce the deadlock with Docker is to add a `-v
/foo` to the test container created for the external graphdriver tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 2938dce794)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Yong Tang
6841887132 Add --file flag for docker secret create command
This fix tries to address the issue raised in 28581 and 28927
where it is not possible to create a secret from a file (only
through STDIN).

This fix add a flag `--file` to `docker secret create` so that
it is possible to create a secret from a file with:
```
docker secret create --file secret.in secret.name
```

or
```
echo TEST | docker secret create --file - secret.name
```

Related docs has been updated.

An integration test has been added to cover the changes.

This fix fixes 28581.
This fix is related to 28927.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit c6f0b7f448)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Yanqiang Miao
aa5ac38f41 Optimization a error description
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 6c021893aa)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Yong Tang
d01138c162 Remove docker stack ps -a to match removal of docker service/node ps -a
In #28507 and #28885, `docker service/node ps -a` has been removed so that
information about slots are show up even without `-a` flag.

The output of `docker stack ps` reused the same output as `docker service/node ps`.
However, the `-a` was still there. It might make sense to remove `docker stack ps -a`
as well to bring consistency with `docker service/node ps`.

This fix is related to #28507, #28885, and #25983.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 9155e14e77)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:54 +01:00
Brian Goff
def75b2c2c Fixes a race condition in client events monitoring
In cases where there is high latency (ie, not-local network)
`waitExitOrRemoved` was not receiving events for short-lived containers.
This caused the client to hang while waiting for a notification that the
container has stopped.

This happens because `client.Events()` returns immediately and spins a
goroutine up to process events. The problem here is it returns before
the request to the events endpoint is even made.
Even without high-latency issues, there is no guarantee that the
goroutine is even scheduled by the time the function returns.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 47585996bf)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:54 +01:00
Harald Albers
ff7934faf2 Fix usage message of plugin inspect
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 1b58d0bc51)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:44:54 +01:00
Daniel Nephin
045e9834a5 Trim quotes from TLS flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit abe32de6b4)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:43:17 +01:00
Daniel Nephin
a2dc349c74 Add quoted string flag Value.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit e4c1f07729)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:42 +01:00
Sebastiaan van Stijn
7cbc4cb7f2 fix powershell dco check
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 611a633ba4)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:42 +01:00
Yong Tang
e2b04a7818 Fix image's CMD after WORKDIR in Dockerfile
This fix tries to fix 29667 where image's `CMD` is modified
after `WORKDIR` in Dockerfile.

The value of `b.runConfig.Cmd` was modified in the processing
of `WORKDIR`, in order to fix 28902. However, the same
`b.runConfig.Cmd` is passed to `commit()`.

This fix restored the `b.runConfig.Cmd` before `commit()`
the image for `WORKDIR`.

A test has been added.

This fix fixes 29667.

This fix is related to 28902, 28909, 28514.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0836023847)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:42 +01:00
Harald Albers
ea00b14170 Add bash completion for plugin disable --force
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e1403453f0)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:42 +01:00
Harald Albers
5903ead08e Fix bash completion for plugin enable|disable
`docker plugin enable` and `docker plugin disable` only
accept one plugin.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 390effdd11)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:42 +01:00
Alexander Morozov
428ae70759 commit: do not change container labels on commit
Fix #29547

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
(cherry picked from commit ca6c6f0765)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:42 +01:00
Brian Goff
eefb2220c0 Fix usage of boltdb in volume restore
bolt k/v pairs are only valid for the life of a transaction.
This means the memory that the k/v pair is referencing may be invalid if
it is accessed outside of the transaction.
This can potentially cause a panic.

For reference: https://godoc.org/github.com/boltdb/bolt#hdr-Caveats

To fix this issue, unmarshal the stored data into volume meta before
closing the transaction.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 4876a9047e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
yuexiao-wang
8b155a9109 Update 'ID' field for 'docker plugin ls'
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 1e6587ff28)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Harald Albers
c809c40647 Add bash completion for plugin install --alias
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 83158f8aff)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Yanqiang Miao
994b3928f6 Add 'volume prune' to the volume commands index
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 3d4ea98971)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Harald Albers
39b3e39c40 Remove bash completion for deprecated docker daemon
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 536a9ec698)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Harald Albers
e7960584f2 Remove --all|-a from docker node ps reference
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 364e900237)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Harald Albers
c25a4762ef Remove bash completion for docker node ps --all|-a
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a54cc4f88d)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Zhang Wei
2c53989b4b Add missing "--default-runtime" flag in manpage
Add missing flag and more descriptions in manpage.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
(cherry picked from commit 977fd43985)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Akihiro Suda
1c5cb46649 update experimental/README.md
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit eb11a10ddf)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
Tobias Gesellchen
97b0bb730e fix swagger description for DELETE /plugin/{name}
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
(cherry picked from commit e6b2829a7f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:40 +01:00
Tonis Tiigi
6d6c11dceb Fix inspect object by invalid reference
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 3cd39aaeab)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:40 +01:00
lixiaobing10051267
cf93b2b1c2 update URL of plugins_graphdriver.md in experimental/README.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

(cherry picked from commit 82eeab62df)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-03 23:47:46 -08:00
allencloud
7a89c43a5e update plugins in docs and correct things in index.md
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 6d3e1d2fd2)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-03 23:47:01 -08:00
yuexiao-wang
8afa73d280 Update reference document for secret and stack
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 7bb31f3168)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-03 23:46:29 -08:00
Victor Vieux
d2a4a53f11 small secret doc update
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit 91b739b552)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-03 23:45:30 -08:00
Tibor Vass
7d58f5fb88 Merge pull request #29869 from cpuguy83/backport_28263
[cherry-pick] Moves graphdriver plugin docs out of experimental
2017-01-03 21:35:06 -08:00
Tibor Vass
73be1c098a Merge pull request #29858 from mavenugo/1.13-nplugins
Cherry-pick : Fixing a couple of network plugin life-cycle mgmt issues
2017-01-03 19:56:11 -08:00
Brian Goff
c18f592150 Moves graphdriver plugn docs out of experimental
Also updates some of the structures being sent so plugins are getting
all the new options.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-01-03 21:58:43 -05:00
Tibor Vass
f335200410 Merge pull request #29859 from thaJeztah/1.13-fix-anonymous-volumes
[1.13] fix anonymous volumes
2017-01-03 16:20:10 -08:00
Madhu Venugopal
c5b5b4ea45 Properly cleanup plugin states which might impact other tests
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-03 15:37:47 -08:00
Madhu Venugopal
627bc91727 Handle Plugin reference count during network create and delete
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-03 15:37:47 -08:00
Madhu Venugopal
15293063ba Vendoring libnetwork to bring in isbuiltin changes
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-03 15:37:47 -08:00
Madhu Venugopal
b219698e75 Add a GetAll function that returns only managed plugins supported by V2
The current GetAll handles both V2 and legacy plugins. Also due to the
nature of V1 plugins, it also loads them. This causes problems when
loading is not required. Hence adding an independent API that will
return only the plugins that are loaded using v2 mangaed plugins.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-03 15:37:46 -08:00
Sebastiaan van Stijn
1ca25a2e5e
Improve validation for volume specs
The current validation only checked for the
number of elements in the volume-spec, however,
did not validate if the elements were empty.

Because of this, an empty volume-spec (""),
or volume spec only containing separators ("::")
would not be invalidated.

This adds a simple check for empty elements in
the volume-spec, and returns an error if
the spec is invalid.

A unit-test is also added to verify the behavior.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-03 21:49:03 +01:00
Sebastiaan van Stijn
36c0b59149
fix conversion of anonymous volumes in compose-file
the `convertVolumeToMount()` function did not take
anonymous volumes into account when converting
volume specifications to bind-mounts.

this resulted in the conversion to try to
look up an empty "source" volume, which
lead to an error;

    undefined volume:

this patch distinguishes "anonymous"
volumes from bind-mounts and named-volumes,
and skips further processing if no source
is defined (i.e. the volume is "anonymous").

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-03 21:22:07 +01:00
Brian Goff
3e0df05ec4 Merge pull request #29734 from tonistiigi/1.13-plugins
[v1.13] plugins updates
2016-12-28 10:56:21 -05:00
Tonis Tiigi
f02d46f050 Fix validation of plugins without rootfs in config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 6c7cb52009)
2016-12-27 17:21:08 -08:00
Derek McGowan
25bbf8ab7c Support for docker content trust for plugins
Add integration test for docker content trust

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit 14e8bba4f5)
2016-12-27 14:27:28 -08:00
Tonis Tiigi
38d914cc96 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit 3d86b0c79b)
2016-12-27 13:31:14 -08:00
Derek McGowan
bb37c67a90 Abstract distribution interfaces from image specific types
Move configurations into a single file.
Abstract download manager in pull config.
Add supports for schema2 only and schema2 type checking.
Add interface for providing push layers.
Abstract image store to generically handle configurations.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit 3c7676a057)
2016-12-27 13:31:06 -08:00
Derek McGowan
a55a9b14d1 Update distribution vendor for manifest builder change
Manifest builder allows setting the configuration type
for the manifest being build. Additionally the default
type has been renamed to reflect it is an image type.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit 61ac7c4bf8)
2016-12-27 13:30:44 -08:00
Anusha Ragunathan
2039ea6adc Enforce zero plugin refcount during disable.
When plugins have a positive refcount, they were not allowed to be
removed. However, plugins could still be disabled when volumes
referenced it and containers using them were running.

This change fixes that by enforcing plugin refcount during disable.
A "force" disable option is also added to ignore reference refcounting.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 8cb2229cd1)
2016-12-27 13:19:25 -08:00
Yong Tang
05426c80d9 Fix docker plugin inspect <unkown object> issue on Windows
This fix is a follow up for comment:
https://github.com/docker/docker/pull/29186/files#r91277345

While #29186 addresses the issue of `docker inspect <unknown object>`
on Windows, it actually makes `docker plugin inspect <unknown object>`
out `object not found` on Windows as well. This is actually misleading
as plugin is not supported on Windows.

This fix reverted the change in #29186 while at the same time,
checks `not supported` in `docker inspect <unknown object>` so that
- `docker plugin inspect <unknown object>` returns `not supported` on Windows
- `docker inspect <unknown object>` returns `not found` on Windows

This fix is related to #29186 and #29185.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0b3c10ac4d)
2016-12-27 13:19:16 -08:00
Yong Tang
fed1b91bb4 Use GetByName to check for collision before create any context in plugin creation
This fix is a follow up to the comment:
https://github.com/docker/docker/pull/28717#discussion_r90040589

Currently, the collision checking is done at the last step `Add()` of
plugin creation. However, at this stage the context such as plugin
directories have already been creation. In case of name collision,
rollback is needed which could be expensive.

This fix performs the check at the beginning of CreateFromContext using
GetByName. In this way, collision fails fast and no context creation
or rollback is needed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 52405a9b58)
2016-12-27 12:10:11 -08:00
Victor Vieux
88862e707a bump 1.13.0-rc4
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-16 02:10:49 -08:00
Victor Vieux
f3749c5a9c Merge pull request #29465 from docker/1.13.0-rc4-cherrypicks
1.13.0-rc4 cherry-picks: part2
2016-12-16 13:12:57 -08:00
Victor Vieux
7d4318c83c Merge pull request #29433 from aaronlehmann/swarm-plugins-1.13
[1.13] Support v2 plugins in swarm mode
2016-12-16 12:47:52 -08:00
Aaron Lehmann
05fba4af5f Add integration test for volume plugins on swarm
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-16 10:44:26 -08:00
Aaron Lehmann
501083e82a Fix volume Create to check against canonical driver name
Previously, it was comparing against the driver name passed in by the
caller. This could lead to subtle issues when using plugins, like
"plugin" vs. "plugin:latest".

Also, remove "conflict:" prefix to improve the error message.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit a854cf262336e5625ec06e8e12e8ebc1500ce656)
2016-12-16 10:44:26 -08:00
Aaron Lehmann
4e5129c511 Publish installed v2 plugins to manager
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 2a97ea9a6e)
2016-12-16 10:44:25 -08:00
Aaron Lehmann
e460a5f45c Vendor swarmkit from bump_v1.13.0 branch
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-16 10:44:25 -08:00
Victor Vieux
c9a557765e Merge pull request #29469 from aaronlehmann/swarm-content-trust-1.13
[1.13] Backport "Content trust for swarm services"
2016-12-16 01:00:27 -08:00
Brian Goff
1a865dd303 Fix volume plugin refecounting on daemon restart
Ensures all known volumes (known b/c they are persisted to disk) have
their volume drivers refcounted properly.

In testing this, I found an issue with `--live-restore` (required since
currently the provided volume plugin doesn't keep state on restart)
where restorted plugins did not have a plugin client loaded causing a
panic when trying to use the plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 6ef1060cd0)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 23:39:28 -08:00
Akihiro Suda
0c19045523 api: allow creating a network of which name is the prefix of the ID of a swarm network
Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix #27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit edfbc3b876)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 22:59:42 -08:00
Andrew Hsu
ecf7a631a6 remove fedora-23 because eol
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit ef98091a90)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 22:45:20 -08:00
yuexiao-wang
f573d8b621 Fix inconsistency for pause and unpause
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 082f4919ca)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 22:42:43 -08:00
yuexiao-wang
51020f7074 Add the whole related information for node
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit b67b0949ed)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 22:42:02 -08:00
Sebastiaan van Stijn
5391ce8ffa swarm leave is not only for workers
the "docker swarm leave" command description
mentioned that the command can only be used
for workers, however, the command can also
be used for managers (using the `-f` / `--force`
option).

this patch removes the "(workers only)" part
of the command description.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f89eee5d9d)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 22:41:43 -08:00
Victor Vieux
29f42b4036 fix devices in plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit 6f00601c9f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 22:19:28 -08:00
Brian Goff
caaee2ebab Make graphdriver plugin use plugin BasePath
Also enables `PropagatedMount` for graphdrivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 500210475f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 22:19:22 -08:00
Yong Tang
315c34953d Show usage when docker swarm update has no flags
This fix tries to address the issue raised in 24352. Previously,
when `docker swarm update` has no flags, the output is
```
Swarm updated.
```
even though nothing was updated. This could be misleading for
users.

This fix tries to address the issue by adding a `PreRunE` function
in the command so that in case no flag is provided (`cmd.Flags().NFlag() == 0`),
the usage will be outputed instead.

An integration has been added to cover the changes.

This fix fixes 24352.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 5aa5a1cb00)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:07:18 -08:00
Trapier Marshall
b5d4f87612 fix typo in reference for service create
Signed-off-by: Trapier Marshall <trapier.marshall@docker.com>
(cherry picked from commit 90c680ad25)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:06:23 -08:00
Harald Albers
dc05dfd30e Make bash completion for docker stack deploy --bundle-file experimental
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a53bdfa3be)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:06:23 -08:00
Harald Albers
f68d703a8c Add docs for docker network create --attachable
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 7433d3acf6)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:06:23 -08:00
yuexiao-wang
ce5ea47cb0 Add the link for service logs
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 54d38fe115)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:06:23 -08:00
Christopher Jones
a260417927 [plugins] return err when failing remove
Fixes a case where removing the plugin from disk would
fail silently. Also moves pluginStore remove after we
remove from disk, so 'docker plugin ls' doesn't isn't
empty in case it errors out.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit fb11164c4f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:06:23 -08:00
Yong Tang
a80251e8cd Fix docker exec -u issue after docker daemon restart
This fix tries to address the issue raised in 29342 where
`docker exec -u` after docker daemon restart returns an error:
```
unable to find user test: no matching entries in passwd file
```

The reason was that `container.BaseFS` is not present after restart.

This fix adds the `daemon.Mount` during the restore to bring up the
`container.BaseFS`.

An integration test has been added to cover the changes.

This fix fixes 29342.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 7feb2a17e4)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:06:23 -08:00
Aaron Lehmann
8f724a277a integration-cli: Add integration tests for swarm services + content trust
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 62cd3b39f9)
2016-12-15 20:44:22 -08:00
Aaron Lehmann
61dc897a30 cli: Pin image to digest using content trust
Implement notary-based digest lookup in the client when
DOCKER_CONTENT_TRUST=1.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit d4d6f8c0d0)
2016-12-15 18:20:13 -08:00
Aaron Lehmann
5e7d2ab3b8 cli: Split out GetNotaryRepository and associated functions
Split these into cli/trust so that other commands can make use of them.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 4b8c79f25e)
2016-12-15 18:20:07 -08:00
Aaron Lehmann
261f9b6243 registry: Remove reference.go
This removes some very old vestigial code that really should have been
removed during the content addressability transition. It implements
something called "reference" but it behaves differently from the actual
reference package. This was only used by client-side content trust code,
and is relatively easy to extricate.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit d91ed88365)
2016-12-15 18:18:47 -08:00
Justin Cormack
45b441f4f9 Merge pull request #29395 from mavenugo/exp13
Cherry-pick : Add the missing experimental ipvlan network driver
2016-12-15 14:56:00 -08:00
Sebastiaan van Stijn
61ce93a6f5 Merge pull request #29429 from vdemeester/publish-long-short-syntax-1_13
[1.13.x] Publish long short syntax 1 13
2016-12-15 21:44:06 +01:00
Vincent Demeester
162ef5d158
Make --publish-rm precedes --publish-add, so that add wins
`--publish-add 8081:81 --publish-add 8082:82 --publish-rm 80
--publish-rm 81/tcp --publish-rm 82/tcp` would thus result in 81 and
82 to be published.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-15 09:15:54 +01:00
Vincent Demeester
37ea8104b0
Remove --port and update --publish for services to support syntaxes
Add support for simple and complex syntax to `--publish` through the
use of `PortOpt`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-15 07:24:26 +01:00
Victor Vieux
1b521547f0 Merge pull request #29229 from vieux/1.13.0-rc4-cherrypicks
1.13.0-rc4 cherry-picks: part1
2016-12-14 17:18:17 -08:00
Victor Vieux
4d2be03b68 Merge pull request #29418 from aboch/p66
[1.13.x] Fix buildIpamResources()
2016-12-14 15:28:58 -08:00
Alessandro Boch
fa9618550a Fix buildIpamResources()
- Can no longer assume IPv6 operational data to be present

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-12-14 10:36:44 -08:00
Madhu Venugopal
29861173e1 Pass daemon experiemental flag to libnetwork
Required to enable ipvlan experimental network driver

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-14 00:55:34 -08:00
Madhu Venugopal
b7316e85c0 Vendor libnetwork with experimental daemon flag handling
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-14 00:54:57 -08:00
Victor Vieux
efdf7ae8f3 skip empty networks in plugin install
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit 04e35a01fc)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 23:49:27 -08:00
yuexiao-wang
a4af72fc87 Update the manual for docker wait
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 303ff807f2)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 23:48:53 -08:00
Ben Firshman
20dc482b10 Add display name for tags in swagger.yaml
In #29071, we made the tags the correct name for generating types,
at the expense of the menu in the documentation looking good.

ReDoc now has support for tag display names
( https://github.com/Rebilly/ReDoc/pull/152 ), so we can assign
a more human-friendly name to the menu items.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 0caa6c218c)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 23:48:22 -08:00
Brian Goff
8b31f217ff Refcount graphdriver plugins properly
Adds 2 new methods to v2 plugin `Acquire` and `Release` which allow
refcounting directly at the plugin level instead of just the store.
Since a graphdriver is initialized exactly once, and is really managed
by a separate object, it didn't really seem right to call
`getter.Get()` to refcount graphdriver plugins.
On shutdown it was particularly weird where we'd either need to keep a
driver reference in daemon, or keep a reference to the pluggin getter in
the layer store, and even then still store extra details on if the
graphdriver is a plugin or not.

Instead the plugin proxy itself will handle calling the neccessary
refcounting methods directly on the plugin object.

Also adds a new interface in `plugingetter` to account for these new
functions which are not going to be implemented by v1 plugins.

Changes terms `plugingetter.CREATE` and `plugingetter.REMOVE` to
`ACQUIRE` and `RELEASE` respectively, which seems to be better
adjectives for what we're doing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit f29bbd16f5)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 19:56:51 -08:00
Dong Chen
39c9f1c024 Run overlay attachable test on a single daemon
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
(cherry picked from commit e42d1bb4b2)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 19:56:51 -08:00
Brian Goff
4e08d8ef03 Fix issues with plugin and --live-restore
Fixes an issue when starting the daemon with live-restore
where previously it was not set, plugins are not running.

Fixes an issue when starting the daemon with live-restore, the plugin
client (for interacting with the plugins HTTP interface) is not set,
causing a panic when the plugin is called.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit cb6633175c)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 19:56:44 -08:00
Sebastiaan van Stijn
47b838db40 Update reference docs for service ps
commit bbd2018ee1
changed the output format of `docker service ps`.

this patch updates the reference docs
to match the updated output format.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5902fa3384)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 17:10:24 -08:00
yuexiao-wang
1dd2e2f545 Fix the incorrect option name
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit b101e451f1)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 17:10:05 -08:00
lixiaobing10051267
e65660da3d stack_config.md not exist and delete it
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
(cherry picked from commit afaff51a8b)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 17:09:47 -08:00
John Howard
004ec96608 Windows: Prompt fix
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 30b8f08443)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 17:09:29 -08:00
yuexiao-wang
54e52b97f4 Update the option 'network' for docker build
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit cd317282c9)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 17:09:12 -08:00
allencloud
4aa72cb5a9 add missing status code 403 for services/create in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 19654fd71e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 17:08:53 -08:00
Sebastiaan van Stijn
f59aa96e3d deprecate "top-level" network information in NetworkSettings
When inspecting a container, `NetworkSettings` contains top-level
information about the default ("bridge") network;

`EndpointID`, `Gateway`, `GlobalIPv6Address`, `GlobalIPv6PrefixLen`,
`IPAddress`, `IPPrefixLen`, `IPv6Gateway`, and `MacAddress`.

These properties are deprecated in favor of per-network properties in
`NetworkSettings.Networks`. These properties were already "deprecated" in
docker 1.9, but kept around for backward compatibility.

Refer to [#17538](https://github.com/docker/docker/pull/17538) for further
information.

This officially deprecates these properties, and marks them
for removal in 1.16

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ae6f09b29c)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 17:08:28 -08:00
Victor Vieux
89c27499da Merge pull request #29340 from vieux/1.13_changelog
update changelog 1.13.0-rc4
2016-12-13 09:41:03 -08:00
Christopher Jones
4c65bf9a10 [integration-cli] skip plugin tests on non-x86
Due to the test plugins being architecture specific, these
tests fail to start the plugin (even though they don't fail yet)

Temporary fix until we can build architecture specific test
plugins.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit ebff8c79a3)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 20:56:38 -08:00
Victor Vieux
1149997787 update changelog 1.13.0
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 17:08:18 -08:00
Anusha Ragunathan
1a86cbb031 When plugin enable fails, unmount PropagatedMount.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit cef443bddf)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 16:17:19 -08:00
Aleksa Sarai
80c3ed1c0c daemon: switch to 'ensure' workflow for AppArmor profiles
In certain cases (unattended upgrades), system services can disable
loaded AppArmor profiles. However, since /etc being read-only is a
supported setup we cannot just write a copy of the profile to
/etc/apparmor.d.

Instead, dynamically load the docker-default AppArmor profile if a
container is started with that profile set. This code will short-cut if
the profile is already loaded.

Fixes: 2f7596aaef ("apparmor: do not save profile to /etc/apparmor.d")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 567ef8e785)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 16:16:50 -08:00
Aleksa Sarai
20d6f23b55 apparmor: switch IsLoaded to return bool
Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit e440a57a79)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:33:10 -08:00
Yong Tang
20a7e39728 Fix missing IPAM options in swarm network mode
This fix tries to fix the issue raised in 29044 where
the IPAM options is missing in swarm network mode
after the service is deployed. Before the service
is deployed, the IPAM options is available.

The reason for the issue is that, before service is
deployed, `network inspect` is querying the swarm and
obtained the correct information.
However, after service is deployed, swarm executor
does not pass the IPAM options to the backend (daemon).
Also after service is deployed, `network inspect` is
actually querying the local daemon for information.
At this time the network information with missing IPAM
options is returned.

This fix fixes the issue by updating the swarm network
allocator and swarm executor.

A separate PR for swarmkit will be opened.

An integration test has been added to cover the change.

This fix fixes 29044.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 4d958e99c1)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:26:30 -08:00
Misty Stanley-Jones
09296e053d Edits to plugin upgrade warning
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 66cbb5a552)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:26:12 -08:00
Lajos Papp
1f4dc1158c Note about potential plugin issue when upgrading
Fixes: #29172
Fixes: https://github.com/docker/for-mac/issues/1000

Signed-off-by: Lajos Papp <lalyos@yahoo.com>
Signed-off-by: lalyos <lalyos@yahoo.com>
(cherry picked from commit acd847cd56)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:26:06 -08:00
Andrea Luzzardi
99eb943186 service ps: Revert output to 1.12 behavior.
- Display the ID column
- Do not append the task ID in the name column
- (NEW): Truncate task IDs, unless --no-trunc is specified

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
(cherry picked from commit bbd2018ee1)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:25:44 -08:00
Victor Vieux
d8e435ab6c remove old media type compat for plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit f644e758bd)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:25:27 -08:00
John Howard
09cd31b128 Windows: Fix crash in docker system prune
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit e5900ee9bf)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:25:01 -08:00
Harald Albers
85ae13f6d0 Add bash completion for docker inspect --type plugin
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 81b4b2b5fa)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:24:42 -08:00
Qinglan Peng
fcb58702bc fix some broken contents links
Signed-off-by: Qinglan Peng <qinglanpeng@zju.edu.cn>

fix-contents-links

Signed-off-by: Qinglan Peng <qinglanpeng@zju.edu.cn>
(cherry picked from commit bac792c163)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:24:22 -08:00
Kei Ohmura
cc855179cf docs: fix description of docker swarm update --help
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
(cherry picked from commit 2f0e00f587)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:24:03 -08:00
Kei Ohmura
9a6c5e14be docs: fix description of docker swarm join --help
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
(cherry picked from commit 77dd8474a7)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:23:57 -08:00
Martin Honermeyer
0d575d1304 Fix link to volume label support in changelog
Signed-off-by: Martin Honermeyer <maze@strahlungsfrei.de>
(cherry picked from commit bb06e138e4)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:23:37 -08:00
Steve Durrheimer
508d06752d Add zsh completion for 'docker inspect --type=plugin' and other missing ones
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 2bdffc1fb5)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:22:44 -08:00
lixiaobing10051267
159f4f14d7 replace env description with args in extend config
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
(cherry picked from commit abdc031aea)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-12 13:22:24 -08:00
Victor Vieux
de5fba3833 Merge pull request #29333 from sanimej/libn_bump_1.13.x
Update libnetwork to 4df06c4
2016-12-12 13:16:51 -08:00
Santhosh Manohar
4b7bef26c5 Update libnetwork to 4df06c4
This fixes docker #28931, #28172, #28969

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-12-12 11:40:14 -08:00
Brian Goff
cd7fea22f4 Merge pull request #29294 from yongtang/1.13.x
[1.13.x] Update vendored swarmkit to b5f07ce49c66d2f5feee83998b23d4c905b78155
2016-12-12 11:46:50 -05:00
Yong Tang
30b458a28c [1.13.x] Update vendored swarmkit to b5f07ce49c66d2f5feee83998b23d4c905b78155
This fix update swarmkit to b5f07ce49c66d2f5feee83998b23d4c905b78155

The following changes have been included:
- Fix missing IPAM options in swarm network mode (docker/swarmkit#1789)

The above PR is related to docker PR #29074 and docker issue #29044.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-10 04:02:22 -08:00
Yong Tang
870beb70fb xFix issue for --hostname when running in "--net=host"
This fix tries to address the issue raised in 29129 where
"--hostname" not working when running in "--net=host" for
`docker run`.

The fix fixes the issue by not resetting the `container.Config.Hostname`
if the `Hostname` has already been assigned through `--hostname`.

An integration test has been added to cover the changes.

This fix fixes 29129.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit b0a7b0120f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:42:16 -08:00
Doug Davis
64aac182d6 Fix processing of unset build-args during build
This reverts 26103.  26103 was trying to make it so that if someone did:
  docker build --build-arg FOO .
and FOO wasn't set as an env var then it would pick-up FOO from the
Dockerfile's ARG cmd.  However, it went too far and removed the ability
to specify a build arg w/o any value. Meaning it required the --build-arg
param to always be in the form "name=value", and not just "name".

This PR does the right fix - it allows just "name" and it'll grab the value
from the env vars if set. If "name" isn't set in the env then it still needs
to send "name" to the server so that a warning can be printed about an
unused --build-arg. And this is why buildArgs in the options is now a
*string instead of just a string - 'nil' == mentioned but no value.

Closes #29084

Signed-off-by: Doug Davis <dug@us.ibm.com>
(cherry picked from commit cdb8ea90b0)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:24:00 -08:00
Jake Sanders
4fba52a2f7 Add registry-specific credential helper support
Signed-off-by: Jake Sanders <jsand@google.com>
(cherry picked from commit 07c4b4124b)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:23:58 -08:00
John Howard
b18516e6ac Windows: make.ps1 fix DCO check
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit e538c1fdca)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:20:25 -08:00
Michael Friis
6e08e2edcf remove bonus whitespace
Signed-off-by: Michael Friis <friism@gmail.com>
(cherry picked from commit 8d47858f96)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:20:00 -08:00
Sebastiaan van Stijn
c027e4a861 remove unsupported distros from install script
The install script currently includes some
distros that we don't actually have packages
for.

For these distros, the script currently
performs step to install Docker from
the distro's repository.

This patch removes those distros from
the install script, because we have no
control over these packages, and cannot
provide support for them.

Installing docker anyway will give the
false impression that they installed
a package from our repository (but they
didn't), and that they need to contact
us for support.

It's better to tell people that we don't
install in that case, and refer them to
the installation documentation, or the
documentation of their distro.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 29b98b6ee6)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:17:25 -08:00
Anusha Ragunathan
1c858abc96 Fix race in setting plugin refcounts.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 4c088d1e2e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:16:26 -08:00
Tibor Vass
3a571b72fd plugins: container-rootfs-relative paths
Legacy plugins expect host-relative paths (such as for Volume.Mount).
However, a containerized plugin cannot respond with a host-relative
path. Therefore, this commit modifies new volume plugins' paths in Mount
and List to prepend the container's rootfs path.

This introduces a new PropagatedMount field in the Plugin Config.
When it is set for volume plugins, RootfsPropagation is set to rshared
and the path specified by PropagatedMount is bind-mounted with rshared
prior to launching the container. This is so that the daemon code can
access the paths returned by the plugin from the host mount namespace.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit c54b717caf)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:16:04 -08:00
Qinglan Peng
aa22b96457 fix some version information
Signed-off-by: Qinglan Peng <qinglanpeng@zju.edu.cn>
(cherry picked from commit aa26364ce1)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:15:08 -08:00
lixiaobing10051267
d842cf6db6 add SCOPE field content for docker network ls
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

(cherry picked from commit 170fcead7e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:14:27 -08:00
Anusha Ragunathan
213ee20706 Make v2/Plugin accesses safe.
v2/Plugin struct had fields that were
- purely used by the manager.
- unsafely exposed without proper locking.
This change fixes this, by moving relevant fields to the manager as well
as making remaining fields as private and providing proper accessors for
them.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit b35490a8ba)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:13:13 -08:00
Evan Hazlett
f081b22a4a add headers when using exec
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

ensure headers are properly sanitized

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
(cherry picked from commit f86db80b5f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:12:09 -08:00
Ian Campbell
c84f43d63f Caution against the use of CONFIG_LEGACY_VSYSCALL_NATIVE
It provides an ASLR-bypassing target with usable ROP gadgets.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
(cherry picked from commit 49dcce7ba0)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:11:46 -08:00
Xianglin Gao
be7d576f5d fix apparmor load profile
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
(cherry picked from commit 2ab8f2e389)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:10:58 -08:00
Derek McGowan
cca0132fcf Add class to repository scope
Expose registry error translation for plugin distribution

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit a12b466183)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:10:29 -08:00
Derek McGowan
9ecbaa77ae Update vendor distribution
Distribution client change for class in resource

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit d1f5e0f7a6)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:10:23 -08:00
Victor Vieux
edd9c522b7 Merge pull request #29232 from aaronlehmann/vendor-swarmkit-999addf
[1.13] Update vendored swarmkit to 999addf
2016-12-09 13:51:32 -08:00
Aaron Lehmann
aca0bdab13 Update vendored swarmkit to 999addf
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-07 17:59:31 -08:00
unclejack
674cf8233d api/types/container,client: gofmt
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
(cherry picked from commit c1ce63b17b)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:23:00 -08:00
yuexiao-wang
90a24f7bfd Optimize the log info for client test
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 40b8ff6243)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:22:57 -08:00
Antonio Murdaca
6c8bd56007 hack/make.sh: fix BUILDTIME
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 7b1f77dcbc)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:20:38 -08:00
Steve Durrheimer
78f2dc90bf Add zsh completion for 'docker network create --attachable'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit bce11a29f8)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:17:33 -08:00
lixiaobing10051267
52b88ccc23 modify URLs for bind docker in docs/api
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
(cherry picked from commit 9c76fb253e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:17:14 -08:00
Lei Jitang
c9ec321e56 fix #29199, reset container if container start failed
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit e806821b53)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:16:55 -08:00
Yong Tang
bec385cff0 Fix docker inspect <unkown object> issue on Windows
This fix tries to address the issue raised on 29185 where
`docker inspect <unknown object>` on Windows will return:
```
Error response from daemon: plugins are not supported on this platform
```

The reason was that in case `--type` is not specified, `docker inspect`
will iterate through different types `container`, `image`, `network`,
`plugin` etc. The `plugin` object is the last type to check.

However, as `plugin` is not supported on Windows yet, the error message
is not very informative for `plugins are not supported on this platform`.

This fix tries to fix the issue by return a `not found` error on unsupported
platforms as well.

An integration test has been added to cover the changes for Windows/Linux.

This fix fixes 29185.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 88fcdb0a82)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:16:34 -08:00
Harald Albers
0383913b65 Add bash completion for docker network create --attachable
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 8d2e789bbc)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:16:09 -08:00
allencloud
51b83ae8fb add 403 for endpoint network create
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 0d21e24b9f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:15:45 -08:00
John Howard
ad794bba5b Windows: Dockerfile 2GB clarification Hyper-V
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit f7b4d65445)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:15:24 -08:00
John Howard
540758ee99 Windows: make.ps1 Throw exception on failure
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 8c22a00b77)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:15:01 -08:00
Vincent Demeester
0f2364f73c Handle logging in compose to swarm
Logging configuration was completely ignore when deploy a compose file
to swarm. This fixes it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 806cc1e0f8)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:14:20 -08:00
Harald Albers
6ce7fb23f5 Add bash completion for docker version --format
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 3d43c48c1b)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:13:12 -08:00
Harald Albers
fd7aee8fe0 Fix bash completion for `docker service create|update
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit be5685e4bf)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:12:50 -08:00
Harald Albers
e0d8cfaa7d Add bash completion for secret management
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 324dd3cfec)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:12:29 -08:00
Arash Deshmeh
62fdac59bd Print checkpoint id when creating a checkpoint
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
(cherry picked from commit f1df2d5a2e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:11:43 -08:00
erxian
487fad2a2c refine api swagger.yaml towards image create status code
Signed-off-by: erxian <evelynhsu21@gmail.com>
(cherry picked from commit 15be050fb3)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:11:20 -08:00
Akihiro Suda
e26de82e54 improve TestServiceLogs for the goroutine issue #28915
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit f8a93d0c9d)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:10:56 -08:00
Victor Vieux
8bed67c368 update docs
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 30db51c169)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:10:31 -08:00
Victor Vieux
728296b9ea refactor plugin install
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit fa3b61a28f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:10:24 -08:00
Yong Tang
696130c949 Fix issue where secret ID is masked by name
This fix tries to address the issue in 28884 where
it is possible to mask the secret ID by name.

The reason was that searching a secret is based on name.
However, searching a secret should be done based on:
- Full ID
- Full Name
- Partial ID (prefix)

This fix addresses the issue by changing related implementation
in `getCliRequestedSecretIDs()`

An integration test has been added to cover the changes.

This fix fixes 28884

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 3638ca4d14)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:09:46 -08:00
Yong Tang
d1d6357beb Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit a6be56b54e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-07 16:08:18 -08:00
Andrew Hsu
4d92237de1 run dnf upgrade before installing in fedora
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit ebd804bfb6)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 10:13:02 -08:00
Victor Vieux
c0522e349a bump version to 1.13.0-rc3
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 02:30:49 -08:00
Victor Vieux
3ac2991ff8 Merge pull request #29094 from vieux/1.13.0-rc3-cherrypicks
1.13.0-rc3 cherry-picks: part3
2016-12-05 02:29:24 -08:00
allencloud
69f3cb179e add missing status code in api docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 9a1f7b6b0b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 00:42:55 -08:00
Chris Gavin
1b195847f4 Fix a spelling mistake in the docs.
Signed-off-by: Chris Gavin <chris@chrisgavin.me>
(cherry picked from commit 35c82f422d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 00:41:35 -08:00
Vincent Demeester
877c2b5ac0 Revert "Fix dockerfile parser with empty line after escape"
This reverts commit 3e1b539e8d.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 6e0666e622)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 00:41:03 -08:00
Vincent Demeester
1b310cd47c Remove hostname validation as it seems to break users
Validation is still done by swarmkit on the service side.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit ef39256dfb)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 00:40:19 -08:00
Yong Tang
3891c1f376 Support plugins in docker inspect
This fix tries to address the proposal raised in 28946
to support plugins in `docker inspect`.

The command `docker inspect` already supports
"container", "image", "node", "network", "service", "volume", "task".
However, `--type plugin` is not supported yet at the moment.

This fix address this issue by adding the support of `--type plugin`
for `docker inspect`.

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

This fix fixes 28946.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 90bb2cdb9f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 00:39:30 -08:00
Yong Tang
c015a2a1a6 Add ID field for docker plugin ls
This fix tries to address the enhancement proposed in 28708 to display
ID field for the output of `docker plugin ls`.

This fix add `ID` field to the output of `docker plugin ls`

Related docs has been updated.

This fix fixes 28708.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 8a226ed643)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 00:38:57 -08:00
Brian Goff
2aed732d3a Fix out-of-band vol delete+create for same driver
Fix issue where out-of-band deletions and then a `docker volume create`
on the same driver caused volume to not be re-created in the driver but
return as created since it was stored in the cache.

Previous fix only worked if the driver names did not match.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit d8ce4a6e10)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 16:54:15 -08:00
John Howard
e509501437 Windows: make.ps1 and Dockerfile for native builds
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 155435b6ce)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 16:54:05 -08:00
Victor Vieux
e81d02e4cd Merge pull request #29002 from vieux/1.13.0-rc3-cherrypicks
1.13.0-rc3 cherry-picks: part2
2016-12-02 16:51:49 -08:00
Daniel Nephin
8f961397f4 Fix swagger-gen validation.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit f247a99c6d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:44:34 -08:00
Misty Stanley-Jones
7ec079dbfd Fix instances of doubled words
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 379e9259cf)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:43:55 -08:00
Brian Goff
c49078c78d Fix issue where TmpfsOptions are not sent to swarm
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit a5b3649bfa)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:43:02 -08:00
Ben Firshman
94f3ccc31e Use singular tag names in swagger.yaml
This is required to make the type generation put things in the
correct directory, but unfortunately makes the names in the
documentation menu look a bit crap.

I think the best solution would be to add a `x-display-name`
extension to tags to determine how the tags show up in the menu,
rather than it depend on the name of the tag. I shall do this in
a follow-up PR - for now, let's fix the breakage.

Fixes #29045

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 30a9249e15)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:42:15 -08:00
Harald Albers
f1ea64fa07 Add bash completion for experimental docker deploy
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 10f567ec6a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:41:43 -08:00
Harald Albers
64b41aa52a Allow selective activation of experimental features in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit af84b7e441)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:41:36 -08:00
Sebastiaan van Stijn
6df19c209f pin go-swagger 0.7.4
This pins the version of go-swagger used, because
the results generated by different versions
can differ quite a bit (tested between 0.7.2 - 0.7.4),
and can cause CI / validation to fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ba20c3e65e)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:41:10 -08:00
Sebastiaan van Stijn
ecf889816c Fix restartpolicy max-retry validation
the restart policy validation was moved from
the client to the daemon in 94e95e4711

As part of that change, retry-counts < 1
were marked as "invalid".

However, the default is 0 (unlimited), causing

    docker run -d --restart=on-failure nginx

To fail.

This changes the validation to only invalidate
retry-counts < 0.

A test was added, and other tests renamed
to allow running just these tests :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9db5d649ae)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:40:40 -08:00
John Howard
018f19f8c9 Windows: Factor out sqlite
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 3f6127b173)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:40:06 -08:00
Yong Tang
3477da0cdb Allow docker plugin inspect to search based on ID or name
This fix tries to address the issue raised in discussion of
PR 28735 where it was not possible to manage plugin based on
plugin ID. Previously it was not possible to invoke
`docker plugin inspect` with a plugin ID (or ID prefix).

This fix updates the implementation of `docker plugin inspect`
so that it is possbile to search based on a plugin name, or a
plugin ID. A short format of plugin ID (prefix) is also possible,
as long as there is no ambiguity.

Previously the check of `docker plugin inspect` was mostly done
on the client side. This could potentially cause inconsistency
between API and CMD. This fix move all the checks to daemon side
so that API and CMD will be consistent.

An integration test has been added to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0ce6e070f7)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 13:39:37 -08:00
Tõnis Tiigi
90c3c389c4 Merge pull request #28999 from mavenugo/1.13.0-rc3-ln
Cherry-picking #28975 to 1.13.x
2016-12-02 13:25:43 -08:00
Alexander Morozov
6ad8328cb8 Merge pull request #29049 from aaronlehmann/vendor-swarmkit-1.13.0
[1.13] Vendor swarmkit
2016-12-02 13:06:34 -08:00
Aaron Lehmann
df71cee489 Vendor swarmkit
Update swarmkit to 522d951f733c821cdc33cccca6127c15a2b6de38, from the
bump_v1.13.0 branch.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-01 18:42:24 -08:00
lixiaobing10051267
12aa5ea8b1 rectify several wrong URLs in branch of man
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
(cherry picked from commit 576780369f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-01 13:41:17 -08:00
Lei Jitang
32e0ea346b Fix docker restart panic on machine ungracefully shutdown
Machine ungracefully shutdown leaves a lot of container has a
Running=true state.

```
$ cat config.v2.json | jq .

    "Running": true,
    "Paused": false,
    "Restarting": false,

```

And the next docker start will fail with panic.

```

time="2016-12-01T01:54:45.086446715-05:00" level=warning msg="libcontainerd: client is out of sync, restore was called on a fully synced container (49f41ad5ca0be860622d9190673b5816d012022fb2c1794560ec4851e7cfec6a)."
time="2016-12-01T01:54:45.087046004-05:00" level=warning msg="libcontainerd: failed to retrieve container 49f41ad5ca0be860622d9190673b5816d012022fb2c1794560ec4851e7cfec6a state: rpc error: code = 2 desc = containerd: container not found"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x5db7f3]

goroutine 57 [running]:
panic(0x16a8e60, 0xc420010130)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/docker/docker/libcontainerd.(*client).Restore(0xc4202e1a40, 0xc420415000, 0x40, 0xc42015a0b0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/docker/docker/libcontainerd/client_linux.go:457 +0x553
github.com/docker/docker/daemon.(*Daemon).restore.func1(0xc4201c46f0, 0xc4202581e0, 0xc4201c46e8, 0xc42047bfb0, 0xc42047bf80, 0xc42047bf50, 0xc42024ba10, 0xc420512c00)
        /go/src/github.com/docker/docker/daemon/daemon.go:205 +0x198
created by github.com/docker/docker/daemon.(*Daemon).restore
        /go/src/github.com/docker/docker/daemon/daemon.go:260 +0x7bb

```

Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 267422e4d0)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-01 13:40:44 -08:00
yuexiao-wang
68b88c8749 Fix the use for secret create
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 5cef55ba91)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-01 13:40:14 -08:00
Darren Stahl
c31df2f3de Stop retrying pull on UnkownBlob error
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit dee2968560)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-01 13:39:35 -08:00
yuexiao-wang
f687616995 Fix the inconsistency for docker secret
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit b4306588e9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-01 13:39:06 -08:00
Ben Firshman
766e6ab07f Make swagger.yaml operationIds consistent
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit bf6a790f00)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:25:52 -08:00
Ben Firshman
fba707ee1f Make docs URLs in swagger.yaml absolute
This makes the swagger.yaml useful outside of the documentation.
For background:
https://github.com/docker/docker.github.io/pull/606#issuecomment-261389645

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 54051b18a1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:25:40 -08:00
Ben Firshman
76f4793290 Improve tags in swagger.yaml
- Consistent naming (plural, etc)
- Add section descriptions
- Add docs in swagger.yaml about how to maintain them

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 2aea9ad56b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:24:09 -08:00
Ben Firshman
0e1721f09f Add intro to swagger.yaml to explain what it's for
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit be52738a2c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:24:04 -08:00
Ben Firshman
2d0a198eb8 Fix headings in old API docs
Jekyll automatically adds titles based on the title of the page,
so this was causing duplicate titles.

Also, made all the headings the correct level.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit d9b109b807)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:23:59 -08:00
Akihiro Suda
783e1a94b5 cli: remove --mount from docker run
This commit reverts 273eeb813c (#26825).
For the discussion so far, please refer to #28527.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit e6d9b7de64)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:22:43 -08:00
Brian Goff
bb55c05ec1 Move plugin shutdown after layerstore shtudown
This ensures that graphdriver plugins can properly cleanup on daemon
exit.
Also prevents errors during shutdown when it tries to send the plugin a
`Cleanup()` request but ultimately times out since it's already been
shutdown.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 4b400ecc4d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:19:24 -08:00
chchliang
6c466eadb7 don't spell error
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
(cherry picked from commit 167f2f3f1b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:19:22 -08:00
lixiaobing10051267
f5c429bea2 modify some urls related to reference path
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
(cherry picked from commit b069690827)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:15:19 -08:00
Aaron Lehmann
1638b8f5c5 distribution: Fix panic on push
When building a manifest during a push operation, all layers must have
an associated descriptor. If a layer is missing a descriptor, that leads
to a panic.

A break inside a switch in layerAlreadyExists meant to break from the
loop surrounding the switch, but instead breaks from the switch. This
causes the loop to continue, and can overwrite the descriptor with an
empty one, leading to the panic.

Also, fix layerAlreadyExists not to abort the push when a speculative
stat on a candidate layer digest fails with an error. This could happen
in situations like a potential cross-repository mount where the user
does not have permission to access the source repository.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit e0702e9f37)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:14:42 -08:00
Harald Albers
7c081219ac Add more types to bash completion of docker inspect
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 1076f0882b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:13:51 -08:00
Christopher Jones
d55b0802cf [ppc64le] allow replacing httpredir in dockerfile
Allows replacing of the default httpredir.debian.org in /etc/apt/sources.list
with a user-specified mirror. This will (hopefully) fix CI apt issues.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit 150a519a0b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:13:18 -08:00
Lei Jitang
d9329742d0 Fix docker save with empty timestamp of layer created time
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit e0b2c0af4d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:12:52 -08:00
erxian
375e970991 correct the http return code of secret remove
Signed-off-by: erxian <evelynhsu21@gmail.com>
(cherry picked from commit 21768933fb)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:12:22 -08:00
Aaron Lehmann
30e5e0a781 Don't resolve or pull images referenced by ID
If a swarm service is created using an image ID, it's useless to try to
pull this reference or resolve it to a manifest digest. Avoid doing this
when a fully qualified image ID is given.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 089842c4b4)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:11:43 -08:00
Vincent Demeester
50bcdc9de2 Revert "Add bash completion for docker service ps --all"
This reverts commit 188d2fac57.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit cee0fff9fe)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:11:08 -08:00
Vincent Demeester
f8b981574c Revert "Add -a option to service/node ps"
This reverts commit 139fff2bf0.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit eb55d03f3c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:11:02 -08:00
Vincent Demeester
4609c728e3 stack deploy: handle external network when deploying
If the network is marked as external, don't use the namespace on
it. Otherwise, it's not found.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 6fff845409)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:10:29 -08:00
Steve Durrheimer
5764fbb878 Add zsh completion for 'docker stack' subcommand
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 1e0c612f84)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:10:02 -08:00
Lei Jitang
ee7d498364 Change Error log to Warning when close stdin fail
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 37db022045)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:09:26 -08:00
Lei Jitang
79f153f49e Ignore "failed to close stdin" if container or process not found
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 9aedaf5b3a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:09:19 -08:00
Yanqiang Miao
bf711ea00e Fix a error of the function 'CopyMessage' in 'daemon/logger/logger.go'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

add a test for 'CopyMessage'

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 3b82eac65f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:08:05 -08:00
Sebastiaan van Stijn
f5df634db7 Add some adjectives to the namesgenerator
Because .. `hardcore_hamilton` and `inspiring_murdock`

https://twitter.com/swiftonsecurity/status/801195049165799424

Also replacing adjectives that could be interpreted as
refering to body size, (mental) health, intoxication.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 169b4d92a1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:07:37 -08:00
Kenfe-Mickael Laventure
5e5d02b9f5 Fix race with containerd events stream on restore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 9fff9bb761)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:06:59 -08:00
Harald Albers
51f1980e30 Add bash completion for docker stack
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 16494a81f9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:06:29 -08:00
John Howard
68cfaf216d Windows: Builder case insensitive env
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 49f392ff6b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:05:48 -08:00
Brian Goff
0dd3ae8ed0 Move stack dump dir to exec root
Dump stack dumps to exec root instead of daemon root.
When no path is provided to the stack dumper, such is the case with
SIGQUIT, dump to stderr.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 0bd720b28d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-30 14:02:24 -08:00
Madhu Venugopal
1f289dc411 Vendoring libnetwork to address some concurrency issues
Addresses #28697, #28845, #28712, #26111

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 8f082e418b)
2016-11-30 13:28:21 -08:00
Vincent Demeester
005a5428ee Merge pull request #28774 from vieux/1.13.0-rc3-cherrypicks
1.13.0-rc3 cherry-picks
2016-11-30 07:36:53 +01:00
Yanqiang Miao
b4567db876 Fix some format errors
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 71f1205269)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:15:02 -08:00
allencloud
1b187660c2 change secret remove logic in cli
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 5b93e77138)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:14:36 -08:00
Aaron Lehmann
0669e372d2 cluster: Refuse swarm spec not named "default"
If, using the API, a user submits an init request with a spec that has a
name other than "default", the engine will rename the "default" cluster
object. Some parts of swarmkit depend on having a cluster object named
"default". Reject any specs that use other names.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 9dba9e3248)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:14:06 -08:00
John Howard
a40ae77529 WORKDIR set cmd
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 1b97bb416b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:13:40 -08:00
Misty Stanley-Jones
7c030bbd76 Document publishing a UDP port
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 2178c840ba)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:13:15 -08:00
Josh Hawn
98132f7db9 Reject unspecified advertise addr on swarm init
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

(cherry picked from commit eeac871946)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:12:45 -08:00
Daniel Nephin
a8c2248e6f Use namespace label on stack volumes.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 4013a7c6d8)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:12:10 -08:00
Victor Vieux
97b0fd9fe3 update plugin example
Signed-off-by: Victor Vieux <victorvieux@gmail.com>

cleanup whitespace formatting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d73f73b365)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:11:14 -08:00
Vincent Demeester
936499e1ff Fixes ImageList to be retro-compatible with older API
Make sure current client code can talk for ImageList can still talk to
older daemon.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit c6e31454ba)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:10:44 -08:00
Anusha Ragunathan
8c56588d04 Fix issue with plugin exit.
A plugin has an `ExitChan` channel which is used to signal the exit of
the plugin process. In a recent change, the initialization was
incorrectly moved to the daemon Shutdown path.

Fix this by initializing the channel during plugin enable.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 890a98ceed)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:10:10 -08:00
Anusha Ragunathan
e3d03adc25 On plugin pull errors, delete created dirs.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 9e4234261c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:09:33 -08:00
yuexiao-wang
90dab0778c Modify the link for config.json
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 4e970c1e5a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:09:07 -08:00
John Howard
b998f95014 Windows: Note about volumes in run
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit b9e65f40cf)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:08:07 -08:00
John Howard
7c74809fe9 Align output of docker version again
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit dfeaf7a959)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:07:39 -08:00
William Henry
0f5d85371a Added and example of using --format with docker images
Docker-DCO-1.1-Signed-off-by: William Henry <whenry@redhat.com> (github: ipbabble)

Signed-off-by: William Henry <whenry@redhat.com>
(cherry picked from commit 798c00a7ee)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:07:00 -08:00
Dong Chen
bee66467cd Fix network attachable option.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
(cherry picked from commit abcb699ad1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:06:31 -08:00
Yong Tang
d0fb24d853 Fix issue caused by duplicate docker plugin create with same names
This fix tries to fix the issue raised in 28684:
1. Duplicate plugin create with the same name will override the old plugin reference
2. In case an error happens in the middle of the plugin creation, plugin directories
   in `/var/lib/docker/plugins` are not cleaned up.

This fix update the plugin store so that `Add()` will return an error if a plugin
with the same name already exist.

This fix also will clean up the directory in `/var/lib/docker/plugins` in case
an error happens in the middle of the plugin creation.

This fix fixes 28684.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 662d456928)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-29 14:06:04 -08:00
Misty Stanley-Jones
4a0b7b215e Fix copypaste error 'is-automated'
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 2333657e1b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:30:34 -08:00
Misty Stanley-Jones
bdde4d3be5 Fix some redirect loops and problems
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit a1f55dca21)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:30:02 -08:00
Vincent Demeester
568a0a83a9 Remove docker stack config commandline reference doc
`docker stack config` command does not exists anymore, removing it
from the command reference documentation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 3f98871a19)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:29:32 -08:00
Kei Ohmura
a903471bfc fix more according to the actual output of 'docker swarm init --help'
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
(cherry picked from commit 4a3207de5b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:28:57 -08:00
Kei Ohmura
76d2619406 fix description of 'docker swarm init'
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
(cherry picked from commit 3abee1bf8a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:28:52 -08:00
Harald Albers
e0654b40b7 Add bash completion for docker service {create,update} host options
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit f3b7f40aaf)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:28:17 -08:00
Harald Albers
555f65587e Add aliases and options to docker stack ls docs
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 8260366dd2)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:27:39 -08:00
Yanqiang Miao
25cb6a829b Fix a description of 'docker run [-a]'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 08ff4f427e)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:27:07 -08:00
Steve Durrheimer
877207946a Add zsh completion for 'docker service update --hostname'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit b23fbc3fbd)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:26:36 -08:00
Justin Cormack
0e386515c8 Fix grammar on error message
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit cd5c8e9c2d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:26:08 -08:00
Harald Albers
7d7af6ad14 Add bash completion for docker service update --hostname
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 9d98d6d8cb)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:25:39 -08:00
lixiaobing10051267
6622465645 modify invalid url in plugins_network.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

(cherry picked from commit fc7c235f84)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:24:33 -08:00
yuexiao-wang
bfbb2fdee9 Modify reponame to PLUGIN and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit c394034f59)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:23:58 -08:00
Yanqiang Miao
663ca540ea Fix some syntax error
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 18724726c2)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:23:28 -08:00
Daniel Nephin
4b230af83f Add a short flag for docker stack deploy
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit f1dd721b69)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:22:59 -08:00
Ben Firshman
99e1814731 Improve error when connecting service to network
The error didn't hint at how to resolve it. Google auto-suggest
also implies that people have been Googling this error.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 70acb89fa2)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:22:22 -08:00
Ian Campbell
3d27cb3d6f Check for LEGACY_VSYSCALL_* options
Chosing LEGACY_VSYSCALL_NONE (over NATIVE or EMULATE) will mean that binaries
using eglibc <= 2.13 will not run (segfault).

Fixes #28705.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
(cherry picked from commit 163db04452)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:21:53 -08:00
yuexiao-wang
05a75a567a Add options for docker plugin enable and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 9e414bfa6b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:21:20 -08:00
Yong Tang
a2c9e625e6 Update docs of docker network ls --filter
Currently the help output of `docker network ls --filter` is:
```
Options:
  -f, --filter value   Provide filter values (i.e. 'dangling=true') (default [])
  ...
```
This caused confusion as only the following filters are supported at the moment:
 - `driver`
 - `type`
 - `name`
 - `id`
 - `label`

This fix update the help output of `docker network ls --filter` and `network_ls.md`.
The `dangling=true` description has been replace to:
```
Options:
  -f, --filter filter   Provide filter values (i.e. 'driver=bridge')
  ...
```

This fix fixes 28786.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 2510f254ee)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:19:34 -08:00
Victor Vieux
edbe73670a support src in --secret
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit f70470b71e)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:19:02 -08:00
Daniel Nephin
234a8b9496 exit with status 1 if help is called on an invalid command.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit bb7601a3ff)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:18:28 -08:00
Yong Tang
86ae5d2895 Restrict checkpoint name to prevent directory traversal
This fix tries to address the issue raised in 28769 where
checkpoint name was not checked before passing to containerd.
As a result, it was possible to use a special checkpoint name
to get outside of the container's directory.

This fix add restriction `[a-zA-Z0-9][a-zA-Z0-9_.-]+` (`RestrictedNamePattern`).
This is the same as container name restriction.

This fix fixes 28769.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit c90ec05175)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:17:55 -08:00
Daniel Nephin
46cfeaf8ef Allow hostname to be updated on service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 1c65cb6657)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:17:18 -08:00
erxian
d981bbc288 update secret command
Signed-off-by: erxian <evelynhsu21@gmail.com>
(cherry picked from commit d87c91e39f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:16:47 -08:00
Masayuki Morita
bc4219bd0c Fix broken markdown in CHANGELOG.md
Signed-off-by: Masayuki Morita <minamijoyo@gmail.com>
(cherry picked from commit 2ca39d27a6)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:16:13 -08:00
Daniel Nephin
f70e7f840b Better error message on stack deploy against not a swarm.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit c72daf953a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:15:40 -08:00
John Howard
35a87689e4 Windows: Case insensitive env vars
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit b2049a84de)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:15:09 -08:00
erxian
07fa269eee update the secret command docs
Signed-off-by: erxian <evelynhsu21@gmail.com>
(cherry picked from commit c22821014a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:14:36 -08:00
Harald Albers
46b8a5fb57 Add bash completion for plugin API
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit ecb707cb0f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:13:56 -08:00
dattatrayakumbhar04
fcc38c048c 28600: Docs: network connect for container in Created/Stopped state
Signed-off-by: dattatrayakumbhar04 <dattatraya.kumbhar@gslab.com>
(cherry picked from commit 16c9cdad6f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:13:20 -08:00
John Howard
c75eeb4b7c COPY file . after WORKDIR (now always created)
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 286ab6d69b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:12:45 -08:00
Vincent Demeester
10d2d8aefd Update docker info cli reference documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit d28eaa1171)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-23 12:28:16 -08:00
Vincent Demeester
d4d4edec2e Update plugin enable cli reference documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 43297dd6f8)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-23 12:27:46 -08:00
Vincent Demeester
833f3b3cf0 Fixes some integration-cli on userns
Mainly adding requirements on Network or NotUserNamespace to make it pass.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit eb5fe064cf)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-23 12:27:16 -08:00
Antonio Murdaca
bbfd3a518b daemon: remove not needed unmarshal
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 30b8712e93)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-23 12:27:11 -08:00
Harald Albers
3decd08d7a Move docker stack docs out of experimental
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit bb96e18b19)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-23 12:24:37 -08:00
Victor Vieux
1f9b3ef9e9 bump version to 1.13.0-rc2
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 21:23:23 -08:00
Victor Vieux
dba611d0f1 Merge pull request #28729 from aluzzardi/1.13.x-swarmkit-revendor-1109c363ce9d6400d42908ead944df4f7f788860
1.13.x: revendor swarmkit to 1109c363ce9d6400d42908ead944df4f7f788860
2016-11-22 20:34:10 -08:00
Andrea Luzzardi
2a80a863ca 1.13.x: revendor swarmkit to 1109c363ce9d6400d42908ead944df4f7f788860
Includes:
- https://github.com/docker/swarmkit/pull/1766
- https://github.com/docker/swarmkit/pull/1770

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-22 18:50:46 -08:00
Evan Hazlett
01807b785f update secret inspect to support IDs
This updates secret inspect to support inspect by ID in addition to name
as well as inspecting multiple secrets.  This also cleans up the
help text for consistency.

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
(cherry picked from commit 70d2cefd51)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 18:43:53 -08:00
yupeng
b82be871ab context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
(cherry picked from commit aff5dacec1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 18:43:29 -08:00
Darren Stahl
00fd466e00 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit 22c83c567f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 18:40:35 -08:00
John Howard
f9f8a94f42 Windows: Native autogen
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 64cc7677bf)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 18:40:19 -08:00
Sebastiaan van Stijn
f531a8f06b Use official fedora 25 image
Fedora 25 was released today, and the official
image will be available soon.

This removes the temporary override, so that
we can build using the official image.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 545a2f009e)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 18:39:58 -08:00
Victor Vieux
44fe761b35 Merge pull request #28674 from vieux/1.13.0-rc2-cherrypicks
1.13.0-rc2 cherry-picks : part 3
2016-11-22 18:39:06 -08:00
cyli
38b0c93954 Update docs to reflect no longer displaying secret digest or size.
Signed-off-by: cyli <cyli@twistedmatrix.com>
(cherry picked from commit fe127b7eae)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:54:55 -08:00
cyli
aa6211e153 Do not display the digest or size of swarm secrets
Signed-off-by: cyli <cyli@twistedmatrix.com>
(cherry picked from commit 2c0613540a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:54:50 -08:00
Ben Firshman
fad605e8c5 Add documentation for working on Engine API
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 109c54c481)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:52:48 -08:00
Ben Firshman
8738566853 Update swagger.yaml with changes to API
Up to and including 673c5ee559

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 44c50807c6)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:52:40 -08:00
Ben Firshman
f67b380325 Add version information to swagger.yaml
- Tidied up copy
- API version is now mandatory
- Links to previous API versions

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit c97f67dbab)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:51:14 -08:00
Ben Firshman
520e601dc2 Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit f0d55cd081)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:49:58 -08:00
Ben Firshman
2ac34851ec Move API reference to new location
See: https://github.com/docker/docker.github.io/pull/606

Also:
- Add missing redirects to API reference pages
- Remove v1.25 and 1.26, because they are being replaced with
  swagger generated docs.
- Remove all other docs which aren't reference material, because
  this can live in docker/docker.github.io

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 993854f58f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:48:38 -08:00
Jacob Tomlinson
a4aabe7286 Add concurrent uploads/downloads section
Document and link to the concurrent uploads/downloads daemon option.

Signed-off-by: Jacob Tomlinson <jacob@tom.linson.uk>
(cherry picked from commit b303381a4d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:20:19 -08:00
Sebastiaan van Stijn
e8b27e7dc7 add note that windows does not support managed plugins
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f885463b58)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:19:48 -08:00
Antonio Murdaca
54518a214d hack/dockerfile/binaries-commits: use full commit hash for docker info
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit fa15d5ed0f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:19:18 -08:00
yupeng
1053fdf27e error strings should not be capitalized or end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
(cherry picked from commit fc11efa2db)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:18:49 -08:00
Andrea Luzzardi
43e6479fd4 service logs: Support no-follow mode
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
(cherry picked from commit c2d435e4f0)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:18:09 -08:00
Darren Stahl
af08f44640 Revendor go-winio to v0.3.7
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit 873a26697d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:17:33 -08:00
Tibor Vass
faab09c1aa plugins: misc fixes
Rename variable to reflect manifest -> config renaming
Populate Description fields when computing privileges.
Refactor/reuse code from daemon/oci_linux.go

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 6547609870)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:16:39 -08:00
Tibor Vass
561f2b27cb plugins: support for devices
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 53b9b99e5c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:16:33 -08:00
Tibor Vass
63277b0aff vendor go-connections to error out if unix socket path is too long
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit e2e7ab655f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:16:24 -08:00
Tibor Vass
8f66c5e731 plugins: fix some tests
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit a08ffa0e93)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:16:16 -08:00
Tibor Vass
a275ca2093 plugins: support for host networking
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 99124c055a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:16:10 -08:00
Tibor Vass
c28c63472a plugins: linux capabilities and device creation
In the plugin manifest, Capabilities has been moved to
Linux.Capabilities to avoid confusion with Interface.Types[i].Capability

A DeviceCreation boolean has also been added to the manifest. This could
be changed in the future to be specific to a major number.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 9f239281b1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:16:04 -08:00
Tibor Vass
fb3c3d7eea plugins: do not try to contact disabled plugin
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 84e58e2f89)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:15:58 -08:00
Darren Stahl
40a56f29e2 Ensure vmcompute.dll exists during daemon start
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit 000366f1a7)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:15:19 -08:00
Brian Goff
9e35dea991 Use container Mounts API for Swarm containers.
Instead of converting nicely typed service mounts into untyped `Binds`
when creating containers, use the new `Mounts` API which is a 1-1
mapping between service mounts and container mounts.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 821aeb6a6f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 16:13:28 -08:00
Victor Vieux
a65a2936ac Merge pull request #28676 from aboch/1.13.x-local
[1.13.x] Vendor libnetwork, netlink and libkv
2016-11-22 12:07:05 -08:00
Harald Albers
24628fd7a0 Fix typo in docs (Copmose)
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 2e12055687)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:27:57 -08:00
Vincent Demeester
9302b0f59c Update aanand/compose-file to a3e58764f50597b6217fec07e9bff7225c4a1719
This fixes services networks list to be ignored when loading.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 01b70a95c9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:27:28 -08:00
Andrew Hsu
3168635120 skip solaris and allow dry run control points
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit f60541069c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:27:01 -08:00
Steve Durrheimer
f46b2fd604 Add zsh completion for 'docker image ls --filter reference'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 15134b8d36)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:26:33 -08:00
Steve Durrheimer
702b03b6fc Add zsh completion for 'dockerd --userland-proxy-path'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 97e1892922)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:26:03 -08:00
Tonis Tiigi
3f0aa9bceb Fix race on sending stdin close event
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 4e262f6387)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:25:33 -08:00
Kenfe-Mickael Laventure
3ab3f953d7 Add generate.sh for armhf deb Dockerfiles
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 3b3cf87478)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:25:01 -08:00
Kenfe-Mickael Laventure
bab6bf1d5e Add support for armhf ubuntu-yakkety deb
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit b118056241)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:24:55 -08:00
Darren Stahl
8ebbeda5a8 Update hcsshim
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit baac0ef67f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:24:21 -08:00
Reficul
ca51b2bf2c fix incorrect ErrConnectFailed comparison
Signed-off-by: Reficul <xuzhenglun@gmail.com>
(cherry picked from commit d5dc9b8b1f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:23:49 -08:00
Anusha Ragunathan
0403addc5f Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 83ca993c15)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:23:20 -08:00
allencloud
abc0eea899 update secret create url for consistency
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 86d7682843)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:22:39 -08:00
Brian Goff
b4c0b07d89 Handle run --rm against older daemons on the cli
For previous versions of Docker, `--rm` was handled client side, as such
there was no support in the daemon for it.
Now it is handled daemon side, but we still need to handle the case of a
newer client talking to an older daemon.

Falls back to client-side removal when the daemon does not support it.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit f4bb8c51de)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:22:08 -08:00
Harald Albers
2d5f5287c3 Add bash completion for docker build --network
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit d48e70843f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:21:36 -08:00
Felix Ruess
41b92e6f36 build debian package for armhf ubuntu-xenial
Signed-off-by: Felix Ruess <felix.ruess@gmail.com>
(cherry picked from commit 015e83a8da)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:21:10 -08:00
Qiang Huang
8079cc8147 Add make deb support for aarch64
Fixes: #27045

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
(cherry picked from commit a532ff8cc3)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 11:20:32 -08:00
Sebastiaan van Stijn
309662d03f Merge pull request #28680 from cyli/1.13.0-rc2-swarmkit-reendor
Include swarmkik dek rotation fixes in re-vendor
2016-11-22 10:50:33 +01:00
Andrew Hsu
e285a304db allow replacing httpredir or deb mirror in jessie
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 060196ee4c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 17:29:22 -08:00
Harald Albers
6f03b32968 Add bash completion for docker images --filter reference
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e84d62f6cb)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 17:28:46 -08:00
Vincent Demeester
2fb6810841 Add documentation about templating support on…
… services creation/update.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 4571ad05db)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 17:28:06 -08:00
Sebastiaan van Stijn
7e2522ec9f Update service ps reference for "--no-trunc"
The "--no-trunc" option toggles between showing/hiding
digests.

This updates the reference to show this difference.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 90993640f0)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 17:26:38 -08:00
Daniel Nephin
95398c33cc Move docker stack out of experimental
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 6df5baf30f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 14:47:24 -08:00
Brian Goff
fcb64b6e08 re-vendor syslog log driver
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 00caf03132)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 14:46:48 -08:00
allencloud
2ecc8cd4bd judge manager if locked before parsing key
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 89100c162b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 14:46:22 -08:00
Evan Hazlett
bdc378e781 lint fixes
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
(cherry picked from commit eb036ea4db)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 14:45:45 -08:00
Evan Hazlett
01aab8baa3 do not force target type for secret references
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

use secret store interface instead of embedded secret data into container

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
(cherry picked from commit bebd472e40)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 14:45:39 -08:00
Antonio Murdaca
0a5732d1cf api: types: keep info.SecurityOptions a string slice
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 514ca09426)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 14:45:05 -08:00
Aaron Lehmann
2737519f9a cli: Add valid suffixes for remaining duration options
A recent PR added `(ns|us|ms|s|m|h)` to the descriptions of some
duration options, but not all. Add it to the remaining options for
consistency.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 32b12a28fc)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 14:44:33 -08:00
Alessandro Boch
5c684ba099 Vendoring libkv @1d84310
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-21 14:15:33 -08:00
cyli
ba9726350d Include swarmkik dek rotation fixes in re-vendor
Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-11-21 16:43:55 -05:00
Vincent Demeester
05eb544ae2 Do not panic if network is nil
network is `nil` if the following case:

```
services:
  foo:
    image: nginx
    networks:
      mynetwork:
```

It's a valid compose so we should not panic.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 158388ef8d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:24 -08:00
Vincent Demeester
040d4ebd58 Update cli reference for docker {,stack} deploy
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 88cdfc512b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:24 -08:00
Zhang Wei
db8991c957 Bugfix: set cli.manualOverride when env var not empty
If env var "DOCKER_API_VERSION" is specified by user, we'll set
`cli.manualOverride`, before this, this field is always true due to
wrong logic.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
(cherry picked from commit 4d54d30477)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:24 -08:00
zhukj
20f3c552e0 close the file
Signed-off-by: zhukj <zhu.kunjia@zte.com.cn>
(cherry picked from commit cf3ef262b1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:23 -08:00
Harald Albers
a20820b05c Add bash completion for dockerd --userland-proxy-path
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 0d573a62f7)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:23 -08:00
Derek McGowan
68e99239d3 Update deprecation notes about v1 registry
Adds section about the hub deprecating the v1 protocol.
Adds note about intent to disable by default and remove support.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit c8f826f407)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:23 -08:00
bbayani
a47957d6f6 Clarify that ipmasq rules are not added when iptables is false
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit db3f06fd97)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:23 -08:00
Nishant Totla
5b81d7e8b5 Suppressing digest for docker service ls/ps
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit e7d83fdb9a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:23 -08:00
Yanqiang Miao
4acf6aa456 The type of 'ExportdPorts' should be 'nat.PortSet'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit c44c542d95)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 13:23:16 -08:00
Tom Denham
c707468415 Update tests to handle bug fix from libnetwork
Signed-off-by: Tom Denham <tom@tomdee.co.uk>
2016-11-21 13:21:02 -08:00
Alessandro Boch
a6e1ed7a51 Vendoring libnetwork @dd0ddde
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-21 13:20:57 -08:00
Tom Denham
2c832d7d66 Update netlink library (required for libnetwork)
Signed-off-by: Tom Denham <tom@tomdee.co.uk>
2016-11-21 11:58:37 -08:00
Vincent Demeester
f44e2dca56 Update compose-file to bc280351b9589b05c6da031d9f93c5c5d22db922
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit b0903c9db0)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 11:48:27 -08:00
Vincent Demeester
c8e2552827 Add support for healthcheck in composefile v3
`docker stack deploy` now supports a composefile v3 format that have a
healthcheck.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 3bd64de7a9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 11:48:22 -08:00
Daniel Nephin
a0df810219 Default parallelism to 1.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 7c1b399235)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 11:48:16 -08:00
Boaz Shuster
c050ee1917 Return an empty stats if the container is restarting
In case, a container is restarting indefinitely running
"docker stats --no-stream <restarting_container>" is suspended.

To fix this, the daemon makes sure the container is either not
running or restarting if `--no-stream` is set to true and if so
returns an empty stats.

Should fix #27772.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
(cherry picked from commit 786a95493d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-21 11:45:57 -08:00
Vincent Demeester
cbff9474d2 Merge pull request #28604 from aluzzardi/1.13-swarmkit-revendor
1.13.x: Re-vendor swarmkit to a2080913b9cf2cac309845a28902896d65d3f527
2016-11-21 15:09:35 +01:00
Brian Goff
f7ae8204cb Merge pull request #28489 from vieux/1.13.0-rc2-cherrypicks
1.13.0-rc2 cherry-picks : part 2
2016-11-20 10:43:55 -05:00
Sean McIntyre
2d632c34ce Add HostConfig.Tmpfs to docs for container creation remote API
Signed-off-by: Sean McIntyre <s.mcintyre@xverba.ca>
(cherry picked from commit 2c38d43eb5)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:52:14 -08:00
Victor Vieux
4edaaeb671 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 9c559e6d0b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:50:06 -08:00
Brian Goff
d63582c131 Allow graphdriver plugins to use v2
Currently the plugin initialization is too late for a loaded v2 plugin
to be usable as a graph driver.

This moves the initialization up before we create the graph driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 020b051dfb)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:49:03 -08:00
Victor Vieux
e773e0e654 error on cli when trying to use experimental feature with non experimental daemon
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 98bb08fe38)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:48:19 -08:00
yupeng
fe8e347741 Fix the typo
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
(cherry picked from commit 9551dd03cf)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:47:44 -08:00
Andrea Luzzardi
0d94260458 router: Return explicit error rather than 404 for experimental.
Instead of not adding experimental routes at all, fail with an explicit
message if the daemon is not running in experimental mode.

Added the `router.Experimental` which does this automatically.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
(cherry picked from commit 3976a33c1a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:47:12 -08:00
Vincent Demeester
cdfde9ecc1 Use Container.Config.Shell instead of hardcoded…
… for healthcheck. It make the code a little cleaner and more
future/usage proof.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 5f81cf11f6)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:45:58 -08:00
Victor Vieux
8e21480106 skip api/types/container/ (like golint) and fix one pkg
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 79a891efb7)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 18:41:43 -08:00
Victor Vieux
fd75cc462f fix gofmt in master
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 9f348d5625)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 15:22:42 -08:00
Sebastiaan van Stijn
c4fd597ab3 swap position of "host" and "ip"
the service definition uses the format as defined
in  http://man7.org/linux/man-pages/man5/hosts.5.html
(IP_address canonical_hostname [aliases...])

This format is the _reverse_ of the format used in
the container API.

Commit f32869d956
inadvertently used the incorrect order.

This fixes the order, and correctly sets it to;

    IP-Address hostname

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f1b9df9172)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 15:15:51 -08:00
Kenfe-Mickael Laventure
47ccfcc09f Update containerd & runc
containerd: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc: 51371867a01c467f08af739783b8beafc15

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 8b1aeb22fe)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 15:15:19 -08:00
Yong Tang
e3c24caf7a Fix several issues with go vet and go fmt
For some reason, `go vet` and `go fmt` validate does not capture
several issues.

The following was the output of `go vet`:
```
ubuntu@ubuntu:~/docker$ go vet ./... 2>&1 | grep -v ^vendor | grep -v '^exit status 1$'
cli/command/formatter/container_test.go:393: possible formatting directive in Log call
volume/volume_test.go:257: arg mp.RW for printf verb %s of wrong type: bool
```

The following was the output of `go fmt -s`:
```
ubuntu@ubuntu:~/docker$ gofmt -s -l . | grep -v ^vendor
cli/command/stack/list.go
daemon/commit.go
```

Fixed above issues with `go vet` and `go fmt -s`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit ace786e9d5)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 15:14:49 -08:00
Aaron Lehmann
d4392659f7 Return warnings from service create and service update when digest pinning fails
Modify the service update and create APIs to return optional warning
messages as part of the response. Populate these messages with an
informative reason when digest resolution fails.

This is a small API change, but significantly improves the UX. The user
can now get immediate feedback when they've specified a nonexistent
image or unreachable registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 948e60691e)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:57:11 -08:00
He Xin
649445a206 fix bugs 'fatal error: concurrent map read and map write' to change VolumeStore.globalLock type from Mutex to RWMutex, and add globalLock.RLock() for the read of names, refs, labels and options in VolumeStore
Signed-off-by: He Xin <he_xinworld@126.com>
(cherry picked from commit 19bd1cee23)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:54:40 -08:00
Yanqiang Miao
df8a5e48de Fix a comment error
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 19e2c9177a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:54:23 -08:00
Michael Crosby
c0ea2c8498 Fix cfs period calculation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit aff99136b4)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:45:58 -08:00
Stephen J Day
ce22bc39dc api/server/httputils: service unavailable for disable swarm
When swarm-mode is disabled, we need to return an error indicating this.
406 was chosen for the "Not Acceptable" verbiage, but this code has
specific semantics in relation to the `Accept` header, which aren't
applicable here.

We now use a 503 for this case. While it is not a perfect match, it does
make it clear that the particular "service" (read: API endpoint) is not
available. The body of the message provides the user with enough
information to take action on it by enabling swarm-mode and ensuring the
service is available.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 1d90d76048)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:44:36 -08:00
Yong Tang
3e9dd55695 Use map[string]bool for preProcessor to ignore unknwon field
This fix is an attempt to address the issue raised in 28339. In
`docker ps`, the formatter needs to expose all fields of `types.Container`
to `preProcessor` so that template could be executed.

This direct exposing is unreliable and could cause issues as user may incorrectly
assume all fields in `types.Container` will be available for templating.

However, the purpose of `preProcessor` is to only find out if `.Size`
is defined (so that opts.size could be set accordingly).

This fix defines `preProcessor` as `map[string]bool` with a func `Size()`.
In this way, any unknown fields will be ignored.

This fix adds several test cases to the existing `TestBuildContainerListOptions`.

This fix fixes 28339.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 312cc7eebd)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:42:21 -08:00
Boaz Shuster
19d2e68fb8 Change the docker-tag usage text to be clearer
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
(cherry picked from commit 039aca05c2)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:41:48 -08:00
John Howard
530b7cb4a0 Windows: Allow user in builder
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit a3c4ab9b65)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:41:13 -08:00
Nishant Totla
902774c871 Refactoring code for pinning image by digest
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit dc1b6341b9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:40:13 -08:00
Nishant Totla
1af49192e4 Updating docker/distribution vendoring
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit d910781c66)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:40:06 -08:00
Andrea Luzzardi
0be7359265 1.13.x: Re-vendor swarmkit to a2080913b9cf2cac309845a28902896d65d3f527
Includes:
- https://github.com/docker/swarmkit/pull/1749
- https://github.com/docker/swarmkit/pull/1753
- https://github.com/docker/swarmkit/pull/1760
- https://github.com/docker/swarmkit/pull/1762
- https://github.com/docker/swarmkit/pull/1764
- https://github.com/docker/swarmkit/pull/1765

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-18 13:39:53 -08:00
Yong Tang
e013d7c543 Fix error messages for --cpus from daemon
This fix fixes error messages for `--cpus` from daemon.

When `docker run` takes `--cpus`, it will translate into NanoCPUs
and pass the value to daemon. The `NanoCPU` is not visible to the user.
The error message generated from daemon used 'NanoCPU' which may cause
some confusion to the user.

This fix fixes this issue by returning the error in CPUs instead.

This fix fixes 28456.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit d22ac2f3a0)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:38:21 -08:00
Tonis Tiigi
5e7e260bac Fix deadlock on cancelling healthcheck
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 89b1234737)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:37:44 -08:00
Vincent Demeester
20dd2d1e4e Update images cli reference with reference filter
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit a0d7b34d9c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:37:07 -08:00
John Howard
3d43caf6f6 Windows: Revert 27884
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 7e03ce3f13)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:36:37 -08:00
Anusha Ragunathan
3f6e6b3f2d Cleanup after plugin install.
During error cases, we dont cleanup correctly. This commit takes care
of removing the plugin, if there are errors after the pull passed. It
also shuts down the plugin, if there are errors after the plugin in the
enable path.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 1144f8f1d4)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:36:09 -08:00
Aaron Lehmann
48c2da3cd5 api: Remove omitempty tag on Parallelism
It doesn't make sense to use omitempty here. 0 is a meaningful value and
it's different from the default. If someone sets Parallelism to 0, we
want to show that Parallelism is 0, not hide the field.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit d8b8b12994)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:35:33 -08:00
Yong Tang
7ef4feaf38 Fix crash caused by docker service inspect --pretty
This fix tries to fix the crash caused by `docker service inspect --pretty`,
by performing necessary nil pointer check.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit b6857e91c1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:34:35 -08:00
Stephen J Day
8b9b8bd930 api/server/httputils: ensure consistent status code
Error code resolution is powered by string matching. Not the greatest
thing in the world and I hope no one is proud of this code, but it
works. However, because a map is used, the iteration order of the map is
random, such that if an error matches two of the snippets, it may return
a different error code depending on the seed of the hashmap. This change
converts it to use a slice instead.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 3484e02590)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:34:05 -08:00
allencloud
cd587419d0 judge manager before unlocking
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 972a246c67)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:33:07 -08:00
Brian Goff
10ce88227d Reduce spew data dumped
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 4130eb24e9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:32:26 -08:00
Tom Wilkie
9f3c9209d0 s/bCap/bLen/
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
(cherry picked from commit 3a05545851)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:31:39 -08:00
Tom Wilkie
f02e4e1900 Fix use of cap in MultiReadSeeker
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
(cherry picked from commit 158bb9bbd5)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:31:33 -08:00
Victor Vieux
411e0bdc8e refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit bf95472105)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:30:44 -08:00
Vincent Demeester
51dc584445 Update Tini to fix photon build-rpm compilation errors
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-18 13:29:20 -08:00
Akshay Karle
78fe91c31c fix a typo
Signed-off-by: Akshay Karle <akshay.a.karle@gmail.com>
2016-11-18 13:28:11 -08:00
allencloud
0b8f8876b9 fix typo
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 1f039a66ac)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:27:01 -08:00
Justin Cormack
c125c131d7 Fix check config script on 4.8 kernels
DEVPTS_MULTIPLE_INSTANCES is no longer an option, it is always set, so
do not check for this post 4.8.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 228ee16df3)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:26:03 -08:00
Felipe Oliveira
0a9521d321 fix infinite recursion
Signed-off-by: Felipe Oliveira <felipeweb.programador@gmail.com>
(cherry picked from commit 271b1f2756)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:25:29 -08:00
Aaron Lehmann
88a45c4a1b Merge pull request #28525 from aluzzardi/swarmkit-revendor
1.13.x: Re-vendor SwarmKit to 577d6bf89a474d3f459804efc5f160ba9fff2b5d
2016-11-17 11:08:33 -08:00
Sebastiaan van Stijn
22f0055e18 Merge pull request #28433 from thaJeztah/docker-1.13-changelog-updates
Docker 1.13 changelog updates
2016-11-17 10:01:50 +01:00
Andrea Luzzardi
73bf1ec999 1.13.x: Re-vendor SwarmKit to 577d6bf89a474d3f459804efc5f160ba9fff2b5d
Includes https://github.com/docker/swarmkit/pull/1746

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-16 18:10:07 -08:00
Tonis Tiigi
0269ac0494 Skip cli initialization for daemon command
Cli initialization pings back to remote API and
creates a deadlock if socket is already being
listened by systemd.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-16 17:10:48 -08:00
Victor Vieux
f2eeaed8a3 explicitly show plugins as unsupported on !linux
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-16 17:10:40 -08:00
Noah Treuhaft
43f1682cef Disable v1 protocol for the default registry
All images in the default registry (AKA docker.io, index.docker.io, and
registry-1.docker.io) are available via the v2 protocol, so there's no
reason to use the v1 protocol.  Disabling it prevents useless fallbacks.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
2016-11-16 17:10:33 -08:00
Riyaz Faizullabhoy
94c4cfc209 Edits to plugin docs after building authz plugin
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-11-16 17:10:24 -08:00
Sebastiaan van Stijn
dc71b1425e Changelog updates
This adds some missing entries to the changelog,
and some smal fixes / inconsistencies.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-11-17 01:42:56 +01:00
Vincent Demeester
a51fe6b056 Update stats cli reference documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-16 11:11:52 -08:00
Steve Durrheimer
1841986d17 Add zsh completion for 'docker system df'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-16 11:11:45 -08:00
Yanqiang Miao
0d815d9bb7 Remove redundant 'if' statement
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-11-16 11:11:39 -08:00
Brian Goff
3b93497fdb Don't validate platform-dep tmpfs opts on client
Daemon still does validation and errors out on incorrect options.

Fixes an issue where non-Linux clients attempting to pass tmpfs options
on `docker run` to a Linux daemon will incorrectly error out.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-16 11:11:32 -08:00
Victor Vieux
44bb0bb7f2 update tini to a87614212b3a51a9cad57ff7989103a841546745
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-16 11:11:22 -08:00
Yong Tang
896e4f2d75 Fix missing versions in example requests of api docs
It is not required to have version prefix for all the remote
APIs. Though there are still quite a few example requests
in api docs that does not have the version prefix.

This fix update the remote api docs to address this issue.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 11:07:38 -08:00
Yong Tang
7154093e59 Update docs for docker info for most recent changes.
This fix updates docs for `docker info` for most recent changes.
It also made several chagnes:
1. Replace 0.12.0-dev to 0.13.0 for api docs v1.24.
2. Replace 0.13.0-dev to 0.13.0 for api docs v1.25

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 11:06:12 -08:00
John Howard
dbf1900e8c Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-16 11:05:23 -08:00
allencloud
d1b1dea80f allow node update api receive node name and id prefix
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-16 10:59:21 -08:00
Victor Vieux
2dfa08bc50 Merge pull request #28408 from vieux/1.13.0-rc2-cherrypicks
1.13.0 rc2 cherrypicks
2016-11-16 10:50:34 -08:00
Tõnis Tiigi
f5afe63eb6 Merge pull request #28463 from aluzzardi/swarmkit-revendor
1.13.x: Revendor swarmkit to 3076318ec0327e22c837c2bfdfacea08124dc755
2016-11-15 21:41:12 -08:00
Andrea Luzzardi
7a457451f6 Revendor swarmkit to 3076318ec0327e22c837c2bfdfacea08124dc755
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-15 19:04:09 -08:00
Sebastiaan van Stijn
5c69e4fa94 Revert reference docs for ambient capabilities
This feature was reverted for docker 1.13
in c5251f7116,
so removing the documentation as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-11-15 13:59:39 -08:00
Jonathan Boulle
c102ab8711 man/docker: wrap lines consistently
Quite a few changes, as it seems like previous wrapping was done
manually, so it's all over the place.

As noted in #28424

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
2016-11-15 13:58:43 -08:00
Jonathan Boulle
44b5bcd744 man page: consistent indents for flag descriptions
Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
2016-11-15 13:57:57 -08:00
yuexiao-wang
0f254ab8b9 Remove inexistent link and add related links
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-15 13:57:10 -08:00
bbayani
4d850bd49a Updated daemon documentation to clarify that live-restore is not suppoted on windows
Review comment implementation

Signed-off-by: bbayani <bhumikabayani@gmail.com>
2016-11-15 13:55:14 -08:00
John Howard
7346a6aebd Gitignore dockerversion\version_autogen_unix.go
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 17:32:44 -08:00
Anusha Ragunathan
846b198dd7 Perform graceful shutdown during plugin disable.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-14 17:31:00 -08:00
Steve Durrheimer
6c3744f4fc Add zsh completion for 'docker image build --network'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-14 17:04:08 -08:00
lixiaobing10051267
6e10c4c8b2 fix the wrong title with docker swarm
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-11-14 17:02:42 -08:00
Brian Goff
a9bbf92b3f Fix issue with missing fields for ps template
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-14 14:25:27 -08:00
Muayyad Alsadi
02c7b6ffad remove "starting with /"
Signed-off-by: Muayyad Alsadi <alsadi@gmail.com>
2016-11-14 14:22:24 -08:00
Muayyad Alsadi
d3ae1d7bd6 fixes #17734, clear message for host volumes not starting with /
Signed-off-by: Muayyad Alsadi <alsadi@gmail.com>
2016-11-14 14:22:22 -08:00
Steve Durrheimer
b1c96a73a3 Add zsh completion for 'docker service {create,update} --secret'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-14 14:18:12 -08:00
Steve Durrheimer
d114b7dc48 Add zsh completion for the new 'docker secret' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-14 14:17:36 -08:00
Steve Durrheimer
fd04a2db51 Add zsh completion for 'docker service' DNS settings
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-14 14:16:57 -08:00
Yong Tang
2c61e9c3bd Fix a small typo in docs/deprecated.md
A small typo in `docs/deprecated.md`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-14 14:16:19 -08:00
Yong Tang
9ed0bb2d0a Update bash completion dns-options-add/rm -> dns-option-add/rm
In 28186, `dns-options-add/rm` has been changed to `dns-option-add/rm`
in `docker service create/update`, for the purpose of consistency.

This fix updates bash completion to remove extra `s`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-14 14:15:31 -08:00
Harald Albers
ba5d2331d5 Add bash completion for DNS settings in services
Signed-off-by: Harald Albers <github@albersweb.de>
2016-11-14 14:14:52 -08:00
Harald Albers
6ec7c7a89c Add bash completion for docker service ps --all
Signed-off-by: Harald Albers <github@albersweb.de>
2016-11-14 14:13:10 -08:00
Steve Durrheimer
a2575eb741 Add zsh completion for 'docker service {create --port, update --port-{add,rm}}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-14 14:12:08 -08:00
Harald Albers
4b003634bc Fix bash completion for docker ps --filter is-task
Signed-off-by: Harald Albers <github@albersweb.de>
2016-11-14 14:11:27 -08:00
Steve Durrheimer
580343247e Add zsh completion for 'docker image build --cache-from'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-14 14:10:44 -08:00
Harald Albers
261958bfa8 Add bash completion for managing ports in services
Bash completion for

- `docker service create --port`
- `docker service update --port-{add,rm}`

Signed-off-by: Harald Albers <github@albersweb.de>
2016-11-14 14:10:03 -08:00
Harald Albers
2da971cf06 Add bash completion for docker build --cache-from
Signed-off-by: Harald Albers <github@albersweb.de>
2016-11-14 14:09:02 -08:00
Brian Goff
285915755c Move StreamConfig out of runconfig
`StreamConfig` carries with it a dep on libcontainerd, which is used by
other projects, but libcontainerd doesn't compile on all platforms, so
move it to `github.com/docker/docker/container/stream`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-14 14:03:05 -08:00
allencloud
9798cdd632 fix typo in node update docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-14 13:30:51 -08:00
yuexiao-wang
5060ff0d8d Remove duplicated document
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-14 13:29:51 -08:00
John Howard
4bfd3643da Extra v1.25 in API docs
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 12:00:24 -08:00
Alexander Morozov
f3d628129e dockerversion: add other binaries to _lib.go
Otherwise it's impossible to build without autogen tag

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-11-14 11:59:08 -08:00
Shayne Wang
19c16fd95e Change reading order of tailfile
change reading order from beginning at the end to beginning at a buffer start
added intergration tests for boundary cases
Removed whitespace
Signed-off-by: Shayne Wang <shaynexwang@gmail.com>
2016-11-14 11:58:01 -08:00
allencloud
89c4410799 judge manager before getting secret
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-14 11:54:29 -08:00
Kenfe-Mickael Laventure
70e7fcc595 Remove extra binaries commit variables from windows build
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-14 11:52:45 -08:00
Kenfe-Mickael Laventure
03c8f0cda1 Fix version detection for docker-init
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-14 11:52:39 -08:00
Tonis Tiigi
22c09cf902 Skip plugin tests if not in amd64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-14 11:50:20 -08:00
Evan Hazlett
8ac6b97189 only check secrets for service create if requested
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-14 11:48:48 -08:00
Anusha Ragunathan
a7a8fa0e6b Add docs for plugin push
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-14 11:34:28 -08:00
John Stephens
16d4e6395e Show experimental flags and subcommands if enabled
Signed-off-by: John Stephens <johnstep@docker.com>
2016-11-14 11:34:17 -08:00
Victor Vieux
75fd88ba89 bump version to 1.13.0-rc1
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-11 02:27:33 -08:00
897 changed files with 32751 additions and 18438 deletions

1
.gitignore vendored
View file

@ -17,6 +17,7 @@ bundles/
cmd/dockerd/dockerd
cmd/docker/docker
dockerversion/version_autogen.go
dockerversion/version_autogen_unix.go
docs/AWS_S3_BUCKET
docs/GITCOMMIT
docs/GIT_BRANCH

View file

@ -142,6 +142,7 @@ Jessica Frazelle <jessfraz@google.com> <me@jessfraz.com>
Jessica Frazelle <jessfraz@google.com> <jess@mesosphere.com>
Jessica Frazelle <jessfraz@google.com> <jfrazelle@users.noreply.github.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> <princess@docker.com>
<konrad.wilhelm.kleine@gmail.com> <kwk@users.noreply.github.com>
@ -273,3 +274,47 @@ Tom Barlow <tomwbarlow@gmail.com>
Xianlu Bird <xianlubird@gmail.com>
Dan Feldman <danf@jfrog.com>
Harry Zhang <harryz@hyper.sh> <harryzhang@zju.edu.cn>
Alex Chen <alexchenunix@gmail.com> alexchen <root@localhost.localdomain>
Alex Ellis <alexellis2@gmail.com>
Alicia Lauerman <alicia@eta.im> <allydevour@me.com>
Ben Bonnefoy <frenchben@docker.com>
Bhumika Bayani <bhumikabayani@gmail.com>
Bingshen Wang <bingshen.wbs@alibaba-inc.com>
Chen Chuanliang <chen.chuanliang@zte.com.cn>
Chen Mingjie <chenmingjie0828@163.com>
CUI Wei <ghostplant@qq.com> cuiwei13 <cuiwei13@pku.edu.cn>
Dattatraya Kumbhar <dattatraya.kumbhar@gslab.com>
Diego Siqueira <dieg0@live.com>
Evelyn Xu <evelynhsu21@gmail.com>
Felix Ruess <felix.ruess@gmail.com> <felix.ruess@roboception.de>
Gabriel Nicolas Avellaneda <avellaneda.gabriel@gmail.com>
Gang Qiao <qiaohai8866@gmail.com> <1373319223@qq.com>
Helen Xie <chenjg@harmonycloud.cn>
Jacob Tomlinson <jacob@tom.linson.uk> <jacobtomlinson@users.noreply.github.com>
Jiuyue Ma <majiuyue@huawei.com>
Jose Diaz-Gonzalez <jose@seatgeek.com> <josegonzalez@users.noreply.github.com>
Josh Eveleth <joshe@opendns.com> <jeveleth@users.noreply.github.com>
Josh Wilson <josh.wilson@fivestars.com> <jcwilson@users.noreply.github.com>
Kevin Kern <kaiwentan@harmonycloud.cn>
Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> <kunal.kushwaha@gmail.com>
Lajos Papp <lajos.papp@sequenceiq.com> <lalyos@yahoo.com>
Lyn <energylyn@zju.edu.cn>
Michael Käufl <docker@c.michael-kaeufl.de> <michael-k@users.noreply.github.com>
Michal Minář <miminar@redhat.com>
Michael Hudson-Doyle <michael.hudson@canonical.com> <michael.hudson@linaro.org>
Milind Chawre <milindchawre@gmail.com>
Ma Müller <mueller-ma@users.noreply.github.com>
Roberto Muñoz Fernández <robertomf@gmail.com> <roberto.munoz.fernandez.contractor@bbva.com>
Stefan S. <tronicum@user.github.com>
Sun Gengze <690388648@qq.com>
Tim Zju <21651152@zju.edu.cn>
Tõnis Tiigi <tonistiigi@gmail.com>
Wang Ping <present.wp@icloud.com>
Wang Yuexiao <wang.yuexiao@zte.com.cn>
Wewang Xiaorenfine <wang.xiaoren@zte.com.cn>
Wei Wu <wuwei4455@gmail.com> cizixs <cizixs@163.com>
Ying Li <ying.li@docker.com> <cyli@twistedmatrix.com>
Yu Peng <yu.peng36@zte.com.cn>
Yu Peng <yu.peng36@zte.com.cn> <yupeng36@zte.com.cn>
Zhenkun Bi <bi.zhenkun@zte.com.cn>
Zhu Kunjia <zhu.kunjia@zte.com.cn>

107
AUTHORS
View file

@ -18,6 +18,7 @@ Adam Miller <admiller@redhat.com>
Adam Mills <adam@armills.info>
Adam Singer <financeCoding@gmail.com>
Adam Walz <adam@adamwalz.net>
Addam Hardy <addam.hardy@gmail.com>
Aditi Rajagopal <arajagopal@us.ibm.com>
Aditya <aditya@netroy.in>
Adolfo Ochagavía <aochagavia92@gmail.com>
@ -35,6 +36,8 @@ AJ Bowen <aj@gandi.net>
Ajey Charantimath <ajey.charantimath@gmail.com>
ajneu <ajneu@users.noreply.github.com>
Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Akira Koyasu <mail@akirakoyasu.net>
Akshay Karle <akshay.a.karle@gmail.com>
Al Tobey <al@ooyala.com>
alambike <alambike@gmail.com>
Alan Scherger <flyinprogrammer@gmail.com>
@ -47,6 +50,7 @@ Alena Prokharchyk <alena@rancher.com>
Alessandro Boch <aboch@docker.com>
Alessio Biancalana <dottorblaster@gmail.com>
Alex Chan <alex@alexwlchan.net>
Alex Chen <alexchenunix@gmail.com>
Alex Coventry <alx@empirical.com>
Alex Crawford <alex.crawford@coreos.com>
Alex Ellis <alexellis2@gmail.com>
@ -67,6 +71,7 @@ Alexey Kotlyarov <alexey@infoxchange.net.au>
Alexey Shamrin <shamrin@gmail.com>
Alexis THOMAS <fr.alexisthomas@gmail.com>
Ali Dehghani <ali.dehghani.g@gmail.com>
Alicia Lauerman <alicia@eta.im>
Allen Madsen <blatyo@gmail.com>
Allen Sun <allen.sun@daocloud.io>
almoehi <almoehi@users.noreply.github.com>
@ -74,6 +79,7 @@ Alvaro Saurin <alvaro.saurin@gmail.com>
Alvin Richards <alvin.richards@docker.com>
amangoel <amangoel@gmail.com>
Amen Belayneh <amenbelayneh@gmail.com>
Amir Goldstein <amir73il@aquasec.com>
Amit Bakshi <ambakshi@gmail.com>
Amit Krishnan <amit.krishnan@oracle.com>
Amit Shukla <amit.shukla@docker.com>
@ -97,6 +103,7 @@ Andrew Duckworth <grillopress@gmail.com>
Andrew France <andrew@avito.co.uk>
Andrew Gerrand <adg@golang.org>
Andrew Guenther <guenther.andrew.j@gmail.com>
Andrew Hsu <andrewhsu@docker.com>
Andrew Kuklewicz <kookster@gmail.com>
Andrew Macgregor <andrew.macgregor@agworld.com.au>
Andrew Macpherson <hopscotch23@gmail.com>
@ -136,6 +143,7 @@ Antony Messerli <amesserl@rackspace.com>
Anuj Bahuguna <anujbahuguna.dev@gmail.com>
Anusha Ragunathan <anusha.ragunathan@docker.com>
apocas <petermdias@gmail.com>
Arash Deshmeh <adeshmeh@ca.ibm.com>
ArikaChen <eaglesora@gmail.com>
Arnaud Lefebvre <a.lefebvre@outlook.fr>
Arnaud Porterie <arnaud.porterie@docker.com>
@ -156,6 +164,7 @@ Barry Allard <barry.allard@gmail.com>
Bartłomiej Piotrowski <b@bpiotrowski.pl>
Bastiaan Bakker <bbakker@xebia.com>
bdevloed <boris.de.vloed@gmail.com>
Ben Bonnefoy <frenchben@docker.com>
Ben Firshman <ben@firshman.co.uk>
Ben Golub <ben.golub@dotcloud.com>
Ben Hall <ben@benhall.me.uk>
@ -169,6 +178,7 @@ Bernerd Schaefer <bj.schaefer@gmail.com>
Bert Goethals <bert@bertg.be>
Bharath Thiruveedula <bharath_ves@hotmail.com>
Bhiraj Butala <abhiraj.butala@gmail.com>
Bhumika Bayani <bhumikabayani@gmail.com>
Bilal Amarni <bilal.amarni@gmail.com>
Bill W <SydOps@users.noreply.github.com>
bin liu <liubin0329@users.noreply.github.com>
@ -205,6 +215,7 @@ Bruno Bigras <bigras.bruno@gmail.com>
Bruno Binet <bruno.binet@gmail.com>
Bruno Gazzera <bgazzera@paginar.com>
Bruno Renié <brutasse@gmail.com>
Bruno Tavares <btavare@thoughtworks.com>
Bryan Bess <squarejaw@bsbess.com>
Bryan Boreham <bjboreham@gmail.com>
Bryan Matsuo <bryan.matsuo@gmail.com>
@ -227,6 +238,7 @@ Carlos Sanchez <carlos@apache.org>
Carol Fager-Higgins <carol.fager-higgins@docker.com>
Cary <caryhartline@users.noreply.github.com>
Casey Bisson <casey.bisson@joyent.com>
Ce Gao <ce.gao@outlook.com>
Cedric Davies <cedricda@microsoft.com>
Cezar Sa Espinola <cezarsa@gmail.com>
Chad Swenson <chadswen@gmail.com>
@ -239,11 +251,14 @@ Charles Lindsay <chaz@chazomatic.us>
Charles Merriam <charles.merriam@gmail.com>
Charles Sarrazin <charles@sarraz.in>
Charles Smith <charles.smith@docker.com>
Charlie Drage <charlie@charliedrage.com>
Charlie Lewis <charliel@lab41.org>
Chase Bolt <chase.bolt@gmail.com>
ChaYoung You <yousbe@gmail.com>
Chen Chao <cc272309126@gmail.com>
Chen Chuanliang <chen.chuanliang@zte.com.cn>
Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Chen Mingjie <chenmingjie0828@163.com>
cheney90 <cheney-90@hotmail.com>
Chewey <prosto-chewey@users.noreply.github.com>
Chia-liang Kao <clkao@clkao.org>
@ -253,6 +268,7 @@ Chris Alfonso <calfonso@redhat.com>
Chris Armstrong <chris@opdemand.com>
Chris Dituri <csdituri@gmail.com>
Chris Fordham <chris@fordham-nagy.id.au>
Chris Gavin <chris@chrisgavin.me>
Chris Khoo <chris.khoo@gmail.com>
Chris McKinnel <chrismckinnel@gmail.com>
Chris Seto <chriskseto@gmail.com>
@ -338,6 +354,7 @@ Danny Yates <danny@codeaholics.org>
Darren Coxall <darren@darrencoxall.com>
Darren Shepherd <darren.s.shepherd@gmail.com>
Darren Stahl <darst@microsoft.com>
Dattatraya Kumbhar <dattatraya.kumbhar@gslab.com>
Davanum Srinivas <davanum@gmail.com>
Dave Barboza <dbarboza@datto.com>
Dave Henderson <dhenderson@gmail.com>
@ -376,6 +393,7 @@ Deng Guangxing <dengguangxing@huawei.com>
Deni Bertovic <deni@kset.org>
Denis Gladkikh <denis@gladkikh.email>
Denis Ollier <larchunix@users.noreply.github.com>
Dennis Chen <barracks510@gmail.com>
Dennis Docter <dennis@d23.nl>
Derek <crq@kernel.org>
Derek <crquan@gmail.com>
@ -393,6 +411,7 @@ Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
Dimitris Rozakis <dimrozakis@gmail.com>
Dimitry Andric <d.andric@activevideo.com>
Dinesh Subhraveti <dineshs@altiscale.com>
Ding Fei <dingfei@stars.org.cn>
Diogo Monica <diogo@docker.com>
DiuDiugirl <sophia.wang@pku.edu.cn>
Djibril Koné <kone.djibril@gmail.com>
@ -429,6 +448,7 @@ Eike Herzbach <eike@herzbach.net>
Eivin Giske Skaaren <eivinsn@axis.com>
Eivind Uggedal <eivind@uggedal.com>
Elan Ruusamäe <glen@delfi.ee>
Elena Morozova <lelenanam@gmail.com>
Elias Probst <mail@eliasprobst.eu>
Elijah Zupancic <elijah@zupancic.name>
eluck <mail@eluck.me>
@ -439,6 +459,7 @@ Emily Rose <emily@contactvibe.com>
Emir Ozer <emirozer@yandex.com>
Enguerran <engcolson@gmail.com>
Eohyung Lee <liquidnuker@gmail.com>
epeterso <epeterson@breakpoint-labs.com>
Eric Barch <barch@tomesoftware.com>
Eric Hanchrow <ehanchrow@ine.com>
Eric Lee <thenorthsecedes@gmail.com>
@ -455,6 +476,7 @@ Erik Dubbelboer <erik@dubbelboer.com>
Erik Hollensbe <github@hollensbe.org>
Erik Inge Bolsø <knan@redpill-linpro.com>
Erik Kristensen <erik@erikkristensen.com>
Erik St. Martin <alakriti@gmail.com>
Erik Weathers <erikdw@gmail.com>
Erno Hopearuoho <erno.hopearuoho@gmail.com>
Erwin van der Koogh <info@erronis.nl>
@ -464,15 +486,18 @@ eugenkrizo <eugen.krizo@gmail.com>
evalle <shmarnev@gmail.com>
Evan Allrich <evan@unguku.com>
Evan Carmi <carmi@users.noreply.github.com>
Evan Hazlett <ehazlett@users.noreply.github.com>
Evan Hazlett <ejhazlett@gmail.com>
Evan Krall <krall@yelp.com>
Evan Phoenix <evan@fallingsnow.net>
Evan Wies <evan@neomantra.net>
Evelyn Xu <evelynhsu21@gmail.com>
Everett Toews <everett.toews@rackspace.com>
Evgeny Vereshchagin <evvers@ya.ru>
Ewa Czechowska <ewa@ai-traders.com>
Eystein Måløy Stenberg <eystein.maloy.stenberg@cfengine.com>
ezbercih <cem.ezberci@gmail.com>
Ezra Silvera <ezra@il.ibm.com>
Fabiano Rosas <farosas@br.ibm.com>
Fabio Falci <fabiofalci@gmail.com>
Fabio Rapposelli <fabio@vmware.com>
@ -485,10 +510,12 @@ Fangyuan Gao <21551127@zju.edu.cn>
Fareed Dudhia <fareeddudhia@googlemail.com>
Fathi Boudra <fathi.boudra@linaro.org>
Federico Gimenez <fgimenez@coit.es>
Felipe Oliveira <felipeweb.programador@gmail.com>
Felix Abecassis <fabecassis@nvidia.com>
Felix Geisendörfer <felix@debuggable.com>
Felix Hupfeld <quofelix@users.noreply.github.com>
Felix Rabe <felix@rabe.io>
Felix Ruess <felix.ruess@roboception.de>
Felix Ruess <felix.ruess@gmail.com>
Felix Schindler <fschindler@weluse.de>
Ferenc Szabo <pragmaticfrank@gmail.com>
Fernando <fermayo@gmail.com>
@ -525,9 +552,12 @@ Félix Baylac-Jacqué <baylac.felix@gmail.com>
Félix Cantournet <felix.cantournet@cloudwatt.com>
Gabe Rosenhouse <gabe@missionst.com>
Gabor Nagy <mail@aigeruth.hu>
Gabriel Linder <linder.gabriel@gmail.com>
Gabriel Monroy <gabriel@opdemand.com>
GabrielNicolasAvellaneda <avellaneda.gabriel@gmail.com>
Gabriel Nicolas Avellaneda <avellaneda.gabriel@gmail.com>
Gaetan de Villele <gdevillele@gmail.com>
Galen Sampson <galen.sampson@gmail.com>
Gang Qiao <qiaohai8866@gmail.com>
Gareth Rushgrove <gareth@morethanseven.net>
Garrett Barboza <garrett@garrettbarboza.com>
Gaurav <gaurav.gosec@gmail.com>
@ -540,6 +570,7 @@ Georgi Hristozov <georgi@forkbomb.nl>
Gereon Frey <gereon.frey@dynport.de>
German DZ <germ@ndz.com.ar>
Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl>
Gerwim <gerwim@gmail.com>
Gianluca Borello <g.borello@gmail.com>
Gildas Cuisinier <gildas.cuisinier@gcuisinier.net>
gissehel <public-devgit-dantus@gissehel.org>
@ -576,7 +607,9 @@ Harald Albers <github@albersweb.de>
Harley Laue <losinggeneration@gmail.com>
Harold Cooper <hrldcpr@gmail.com>
Harry Zhang <harryz@hyper.sh>
Harshal Patil <harshalp@linux.vnet.ibm.com>
He Simei <hesimei@zju.edu.cn>
He Xin <he_xinworld@126.com>
heartlock <21521209@zju.edu.cn>
Hector Castro <hectcastro@gmail.com>
Henning Sprang <henning.sprang@gmail.com>
@ -600,6 +633,7 @@ Ian Babrou <ibobrik@gmail.com>
Ian Bishop <ianbishop@pace7.com>
Ian Bull <irbull@gmail.com>
Ian Calvert <ianjcalvert@gmail.com>
Ian Campbell <ian.campbell@docker.com>
Ian Lee <IanLee1521@gmail.com>
Ian Main <imain@redhat.com>
Ian Truslove <ian.truslove@gmail.com>
@ -624,8 +658,10 @@ J. Nunn <jbnunn@gmail.com>
Jack Danger Canty <jackdanger@squareup.com>
Jacob Atzen <jacob@jacobatzen.dk>
Jacob Edelman <edelman.jd@gmail.com>
Jacob Tomlinson <jacob@tom.linson.uk>
Jake Champlin <jake.champlin.27@gmail.com>
Jake Moshenko <jake@devtable.com>
Jake Sanders <jsand@google.com>
jakedt <jake@devtable.com>
James Allen <jamesallen0108@gmail.com>
James Carey <jecarey@us.ibm.com>
@ -648,6 +684,7 @@ Jan-Gerd Tenberge <janten@gmail.com>
Jan-Jaap Driessen <janjaapdriessen@gmail.com>
Jana Radhakrishnan <mrjana@docker.com>
Jannick Fahlbusch <git@jf-projects.de>
Janonymous <janonymous.codevulture@gmail.com>
Januar Wayong <januar@gmail.com>
Jared Biel <jared.biel@bolderthinking.com>
Jared Hocutt <jaredh@netapp.com>
@ -672,7 +709,9 @@ Jay <teguhwpurwanto@gmail.com>
Jay Kamat <github@jgkamat.33mail.com>
Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Jean-Baptiste Dalido <jeanbaptiste@appgratis.com>
Jean-Christophe Berthon <huygens@berthon.eu>
Jean-Paul Calderone <exarkun@twistedmatrix.com>
Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Jean-Tiare Le Bigot <jt@yadutaf.fr>
Jeff Anderson <jeff@docker.com>
Jeff Johnston <jeff.johnston.mn@gmail.com>
@ -734,8 +773,10 @@ John Feminella <jxf@jxf.me>
John Gardiner Myers <jgmyers@proofpoint.com>
John Gossman <johngos@microsoft.com>
John Howard (VM) <John.Howard@microsoft.com>
John Mulhausen <john@docker.com>
John OBrien III <jobrieniii@yahoo.com>
John Starks <jostarks@microsoft.com>
John Stephens <johnstep@docker.com>
John Tims <john.k.tims@gmail.com>
John Warwick <jwarwick@gmail.com>
John Willis <john.willis@docker.com>
@ -753,11 +794,12 @@ Jonathan Mueller <j.mueller@apoveda.ch>
Jonathan Pares <jonathanpa@users.noreply.github.com>
Jonathan Rudenberg <jonathan@titanous.com>
Jonathan Stoppani <jonathan.stoppani@divio.com>
Jonh Wendell <jonh.wendell@redhat.com>
Joost Cassee <joost@cassee.net>
Jordan <jjn2009@users.noreply.github.com>
Jordan Arentsen <blissdev@gmail.com>
Jordan Sissel <jls@semicomplete.com>
Jose Diaz-Gonzalez <josegonzalez@users.noreply.github.com>
Jose Diaz-Gonzalez <jose@seatgeek.com>
Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
Joseph Hager <ajhager@gmail.com>
Joseph Kern <jkern@semafour.net>
@ -767,6 +809,7 @@ Josh Chorlton <jchorlton@gmail.com>
Josh Hawn <josh.hawn@docker.com>
Josh Horwitz <horwitz@addthis.com>
Josh Poimboeuf <jpoimboe@redhat.com>
Josh Wilson <josh.wilson@fivestars.com>
Josiah Kiehl <jkiehl@riotgames.com>
José Tomás Albornoz <jojo@eljojo.net>
JP <jpellerin@leapfrogonline.com>
@ -805,8 +848,10 @@ Katie McLaughlin <katie@glasnt.com>
Kato Kazuyoshi <kato.kazuyoshi@gmail.com>
Katrina Owen <katrina.owen@gmail.com>
Kawsar Saiyeed <kawsar.saiyeed@projiris.com>
Kay Yan <kay.yan@daocloud.io>
kayrus <kay.diam@gmail.com>
Ke Xu <leonhartx.k@gmail.com>
Kei Ohmura <ohmura.kei@gmail.com>
Keith Hudgins <greenman@greenman.org>
Keli Hu <dev@keli.hu>
Ken Cochrane <kencochrane@gmail.com>
@ -848,7 +893,7 @@ Kristian Haugene <kristian.haugene@capgemini.com>
Kristina Zabunova <triara.xiii@gmail.com>
krrg <krrgithub@gmail.com>
Kun Zhang <zkazure@gmail.com>
Kunal Kushwaha <kunal.kushwaha@gmail.com>
Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Kyle Conroy <kyle.j.conroy@gmail.com>
Kyle Linden <linden.kyle@gmail.com>
kyu <leehk1227@gmail.com>
@ -857,13 +902,14 @@ Lai Jiangshan <jiangshanlai@gmail.com>
Lajos Papp <lajos.papp@sequenceiq.com>
Lakshan Perera <lakshan@laktek.com>
Lalatendu Mohanty <lmohanty@redhat.com>
lalyos <lalyos@yahoo.com>
Lance Chen <cyen0312@gmail.com>
Lance Kinley <lkinley@loyaltymethods.com>
Lars Butler <Lars.Butler@gmail.com>
Lars Kellogg-Stedman <lars@redhat.com>
Lars R. Damerow <lars@pixar.com>
Lars-Magnus Skog <ralphtheninja@riseup.net>
Laszlo Meszaros <lacienator@gmail.com>
Laura Frank <ljfrank@gmail.com>
Laurent Erignoux <lerignoux@gmail.com>
Laurie Voss <github@seldo.com>
Leandro Siqueira <leandro.siqueira@gmail.com>
@ -873,6 +919,7 @@ leeplay <hyeongkyu.lee@navercorp.com>
Lei Jitang <leijitang@huawei.com>
Len Weincier <len@cloudafrica.net>
Lennie <github@consolejunkie.net>
Leo Gallucci <elgalu3@gmail.com>
Leszek Kowalski <github@leszekkowalski.pl>
Levi Blackstone <levi.blackstone@rackspace.com>
Levi Gross <levi@levigross.com>
@ -883,6 +930,7 @@ Liana Lo <liana.lixia@gmail.com>
Liang Mingqiang <mqliang.zju@gmail.com>
Liang-Chi Hsieh <viirya@gmail.com>
liaoqingwei <liaoqingwei@huawei.com>
Lily Guo <lily.guo@docker.com>
limsy <seongyeol37@gmail.com>
Lin Lu <doraalin@163.com>
LingFaKe <lingfake@huawei.com>
@ -892,13 +940,16 @@ Liron Levin <liron@twistlock.com>
Liu Bo <bo.li.liu@oracle.com>
Liu Hua <sdu.liu@huawei.com>
lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Liz Zhang <lizzha@microsoft.com>
LIZAO LI <lzlarryli@gmail.com>
Lizzie Dixon <_@lizzie.io>
Lloyd Dewolf <foolswisdom@gmail.com>
Lokesh Mandvekar <lsm5@fedoraproject.org>
longliqiang88 <394564827@qq.com>
Lorenz Leutgeb <lorenz.leutgeb@gmail.com>
Lorenzo Fontana <fontanalorenzo@me.com>
Louis Opter <kalessin@kalessin.fr>
Luca Favatella <lucafavatella@users.noreply.github.com>
Luca Marturana <lucamarturana@gmail.com>
Luca Orlandi <luca.orlandi@gmail.com>
Luca-Bogdan Grigorescu <Luca-Bogdan Grigorescu>
@ -933,6 +984,7 @@ Marc Kuo <kuomarc2@gmail.com>
Marc Tamsky <mtamsky@gmail.com>
Marcelo Salazar <chelosalazar@gmail.com>
Marco Hennings <marco.hennings@freiheit.com>
Marcus Cobden <mcobden@cisco.com>
Marcus Farkas <toothlessgear@finitebox.com>
Marcus Linke <marcus.linke@gmx.de>
Marcus Ramberg <marcus@nordaaker.com>
@ -958,6 +1010,7 @@ Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
Martin Redmond <redmond.martin@gmail.com>
Mary Anthony <mary.anthony@docker.com>
Masahito Zembutsu <zembutsu@users.noreply.github.com>
Masayuki Morita <minamijoyo@gmail.com>
Mason Malone <mason.malone@gmail.com>
Mateusz Sulima <sulima.mateusz@gmail.com>
Mathias Monnerville <mathias@monnerville.com>
@ -972,6 +1025,7 @@ Matt Moore <mattmoor@google.com>
Matt Richardson <matt@redgumtech.com.au>
Matt Robenolt <matt@ydekproductions.com>
Matthew Heon <mheon@redhat.com>
Matthew Lapworth <matthewl@bit-shift.net>
Matthew Mayer <matthewkmayer@gmail.com>
Matthew Mueller <mattmuelle@gmail.com>
Matthew Riley <mattdr@google.com>
@ -1008,8 +1062,9 @@ Michael Friis <friism@gmail.com>
Michael Gorsuch <gorsuch@github.com>
Michael Grauer <michael.grauer@kitware.com>
Michael Holzheu <holzheu@linux.vnet.ibm.com>
Michael Hudson-Doyle <michael.hudson@linaro.org>
Michael Hudson-Doyle <michael.hudson@canonical.com>
Michael Huettermann <michael@huettermann.net>
Michael Irwin <mikesir87@gmail.com>
Michael Käufl <docker@c.michael-kaeufl.de>
Michael Neale <michael.neale@gmail.com>
Michael Prokop <github@michael-prokop.at>
@ -1021,7 +1076,7 @@ Michael West <mwest@mdsol.com>
Michal Fojtik <mfojtik@redhat.com>
Michal Gebauer <mishak@mishak.net>
Michal Jemala <michal.jemala@gmail.com>
Michal Minar <miminar@redhat.com>
Michal Minář <miminar@redhat.com>
Michal Wieczorek <wieczorek-michal@wp.pl>
Michaël Pailloncy <mpapo.dev@gmail.com>
Michał Czeraszkiewicz <czerasz@gmail.com>
@ -1044,6 +1099,7 @@ Mike Naberezny <mike@naberezny.com>
Mike Snitzer <snitzer@redhat.com>
mikelinjie <294893458@qq.com>
Mikhail Sobolev <mss@mawhrin.net>
Milind Chawre <milindchawre@gmail.com>
Miloslav Trmač <mitr@redhat.com>
mingqing <limingqing@cyou-inc.com>
Mingzhen Feng <fmzhen@zju.edu.cn>
@ -1063,6 +1119,7 @@ mqliang <mqliang.zju@gmail.com>
Mrunal Patel <mrunalp@gmail.com>
msabansal <sabansal@microsoft.com>
mschurenko <matt.schurenko@gmail.com>
Muayyad Alsadi <alsadi@gmail.com>
muge <stevezhang2014@gmail.com>
Mustafa Akın <mustafa91@gmail.com>
Muthukumar R <muthur@gmail.com>
@ -1107,9 +1164,11 @@ Nicolás Hock Isaza <nhocki@gmail.com>
Nigel Poulton <nigelpoulton@hotmail.com>
NikolaMandic <mn080202@gmail.com>
nikolas <nnyby@columbia.edu>
Nikolay Milovanov <nmil@itransformers.net>
Nirmal Mehta <nirmalkmehta@gmail.com>
Nishant Totla <nishanttotla@gmail.com>
NIWA Hideyuki <niwa.niwa@nifty.ne.jp>
Noah Treuhaft <noah.treuhaft@docker.com>
noducks <onemannoducks@gmail.com>
Nolan Darilek <nolan@thewordnerd.info>
nponeccop <andy.melnikov@gmail.com>
@ -1152,6 +1211,7 @@ Paul Bowsher <pbowsher@globalpersonals.co.uk>
Paul Furtado <pfurtado@hubspot.com>
Paul Hammond <paul@paulhammond.org>
Paul Jimenez <pj@place.org>
Paul Kehrer <paul.l.kehrer@gmail.com>
Paul Lietar <paul@lietar.net>
Paul Liljenberg <liljenberg.paul@gmail.com>
Paul Morie <pmorie@gmail.com>
@ -1205,10 +1265,10 @@ Prasanna Gautam <prasannagautam@gmail.com>
Prayag Verma <prayag.verma@gmail.com>
Przemek Hejman <przemyslaw.hejman@gmail.com>
pysqz <randomq@126.com>
qg <1373319223@qq.com>
qhuang <h.huangqiang@huawei.com>
Qiang Huang <h.huangqiang@huawei.com>
qq690388648 <690388648@qq.com>
Qinglan Peng <qinglanpeng@zju.edu.cn>
qudongfang <qudongfang@gmail.com>
Quentin Brossard <qbrossard@gmail.com>
Quentin Perez <qperez@ocs.online.net>
Quentin Tayssier <qtayssier@gmail.com>
@ -1228,6 +1288,7 @@ Ramon van Alteren <ramon@vanalteren.nl>
Ray Tsang <saturnism@users.noreply.github.com>
ReadmeCritic <frankensteinbot@gmail.com>
Recursive Madman <recursive.madman@gmx.de>
Reficul <xuzhenglun@gmail.com>
Regan McCooey <rmccooey27@aol.com>
Remi Rampin <remirampin@gmail.com>
Renato Riccieri Santos Zannon <renato.riccieri@gmail.com>
@ -1269,6 +1330,7 @@ Roel Van Nyen <roel.vannyen@gmail.com>
Roger Peppe <rogpeppe@gmail.com>
Rohit Jnagal <jnagal@google.com>
Rohit Kadam <rohit.d.kadam@gmail.com>
Rojin George <rojingeorge@huawei.com>
Roland Huß <roland@jolokia.org>
Roland Kammerer <roland.kammerer@linbit.com>
Roland Moriz <rmoriz@users.noreply.github.com>
@ -1301,6 +1363,7 @@ Ryan Seto <ryanseto@yak.net>
Ryan Thomas <rthomas@atlassian.com>
Ryan Trauntvein <rtrauntvein@novacoast.com>
Ryan Wallner <ryan.wallner@clusterhq.com>
Ryan Zhang <ryan.zhang@docker.com>
RyanDeng <sheldon.d1018@gmail.com>
Rémy Greinhofer <remy.greinhofer@livelovely.com>
s. rannou <mxs@sbrk.org>
@ -1324,6 +1387,7 @@ Samuel Andaya <samuel@andaya.net>
Samuel Dion-Girardeau <samuel.diongirardeau@gmail.com>
Samuel Karp <skarp@amazon.com>
Samuel PHAN <samuel-phan@users.noreply.github.com>
Sandeep Bansal <msabansal@microsoft.com>
Sankar சங்கர் <sankar.curiosity@gmail.com>
Sanket Saurav <sanketsaurav@gmail.com>
Santhosh Manohar <santhosh@docker.com>
@ -1341,8 +1405,10 @@ Scott Walls <sawalls@umich.edu>
sdreyesg <sdreyesg@gmail.com>
Sean Christopherson <sean.j.christopherson@intel.com>
Sean Cronin <seancron@gmail.com>
Sean McIntyre <s.mcintyre@xverba.ca>
Sean OMeara <sean@chef.io>
Sean P. Kane <skane@newrelic.com>
Sean Rodman <srodman7689@gmail.com>
Sebastiaan van Steenis <mail@superseb.nl>
Sebastiaan van Stijn <github@gone.nl>
Senthil Kumar Selvaraj <senthil.thecoder@gmail.com>
@ -1360,6 +1426,7 @@ shaunol <shaunol@gmail.com>
Shawn Landden <shawn@churchofgit.com>
Shawn Siefkas <shawn.siefkas@meredith.com>
shawnhe <shawnhe@shawnhedeMacBook-Pro.local>
Shayne Wang <shaynexwang@gmail.com>
Shekhar Gulati <shekhargulati84@gmail.com>
Sheng Yang <sheng@yasker.org>
Shengbo Song <thomassong@tencent.com>
@ -1375,6 +1442,7 @@ Shuwei Hao <haosw@cn.ibm.com>
Sian Lerk Lau <kiawin@gmail.com>
sidharthamani <sid@rancher.com>
Silas Sewell <silas@sewell.org>
Silvan Jegen <s.jegen@gmail.com>
Simei He <hesimei@zju.edu.cn>
Simon Eskildsen <sirup@sirupsen.com>
Simon Leinen <simon.leinen@gmail.com>
@ -1415,6 +1483,7 @@ Steven Richards <steven@axiomzen.co>
Steven Taylor <steven.taylor@me.com>
Subhajit Ghosh <isubuz.g@gmail.com>
Sujith Haridasan <sujith.h@gmail.com>
Sun Gengze <690388648@qq.com>
Suryakumar Sudar <surya.trunks@gmail.com>
Sven Dowideit <SvenDowideit@home.org.au>
Swapnil Daingade <swapnil.daingade@gmail.com>
@ -1486,11 +1555,13 @@ Todd Lunter <tlunter@gmail.com>
Todd Whiteman <todd.whiteman@joyent.com>
Toli Kuznets <toli@docker.com>
Tom Barlow <tomwbarlow@gmail.com>
Tom Booth <tombooth@gmail.com>
Tom Denham <tom@tomdee.co.uk>
Tom Fotherby <tom+github@peopleperhour.com>
Tom Howe <tom.howe@enstratius.com>
Tom Hulihan <hulihan.tom159@gmail.com>
Tom Maaswinkel <tom.maaswinkel@12wiki.eu>
Tom Wilkie <tom.wilkie@gmail.com>
Tom X. Tobin <tomxtobin@tomxtobin.com>
Tomas Tomecek <ttomecek@redhat.com>
Tomasz Kopczynski <tomek@kopczynski.net.pl>
@ -1498,25 +1569,26 @@ Tomasz Lipinski <tlipinski@users.noreply.github.com>
Tomasz Nurkiewicz <nurkiewicz@gmail.com>
Tommaso Visconti <tommaso.visconti@gmail.com>
Tomáš Hrčka <thrcka@redhat.com>
Tonis Tiigi <tonistiigi@gmail.com>
Tonny Xu <tonny.xu@gmail.com>
Tony Daws <tony@daws.ca>
Tony Miller <mcfiredrill@gmail.com>
toogley <toogley@mailbox.org>
Torstein Husebø <torstein@huseboe.net>
Tõnis Tiigi <tonistiigi@gmail.com>
tpng <benny.tpng@gmail.com>
tracylihui <793912329@qq.com>
Trapier Marshall <trapier.marshall@docker.com>
Travis Cline <travis.cline@gmail.com>
Travis Thieman <travis.thieman@gmail.com>
Trent Ogren <tedwardo2@gmail.com>
Trevor <trevinwoodstock@gmail.com>
Trevor Pounds <trevor.pounds@gmail.com>
Trevor Sullivan <pcgeek86@gmail.com>
trishnaguha <trishnaguha17@gmail.com>
Tristan Carel <tristan@cogniteev.com>
Troy Denton <trdenton@gmail.com>
Tyler Brock <tyler.brock@gmail.com>
Tzu-Jung Lee <roylee17@gmail.com>
Tõnis Tiigi <tonistiigi@gmail.com>
Ulysse Carion <ulyssecarion@gmail.com>
unknown <sebastiaan@ws-key-sebas3.dpi1.dpi>
vagrant <vagrant@ubuntu-14.04-amd64-vbox>
@ -1561,7 +1633,10 @@ waitingkuo <waitingkuo0527@gmail.com>
Walter Leibbrandt <github@wrl.co.za>
Walter Stanish <walter@pratyeka.org>
WANG Chao <wcwxyz@gmail.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>
Ward Vandewege <ward@jhvc.com>
WarheadsSE <max@warheads.net>
Wayne Chang <wayne@neverfear.org>
@ -1571,8 +1646,10 @@ Weiyang Zhu <cnresonant@gmail.com>
Wen Cheng Ma <wenchma@cn.ibm.com>
Wendel Fleming <wfleming@usc.edu>
Wenkai Yin <yinw@vmware.com>
Wentao Zhang <zhangwentao234@huawei.com>
Wenxuan Zhao <viz@linux.com>
Wenyu You <21551128@zju.edu.cn>
Wenzhi Liang <wenzhi.liang@gmail.com>
Wes Morgan <cap10morgan@gmail.com>
Will Dietz <w@wdtz.org>
Will Rouesnel <w.rouesnel@gmail.com>
@ -1589,6 +1666,7 @@ Wolfgang Powisch <powo@powo.priv.at>
wonderflow <wonderflow.sun@gmail.com>
Wonjun Kim <wonjun.kim@navercorp.com>
xamyzhao <x.amy.zhao@gmail.com>
Xianglin Gao <xlgao@zju.edu.cn>
Xianlu Bird <xianlubird@gmail.com>
XiaoBing Jiang <s7v7nislands@gmail.com>
Xiaoxu Chen <chenxiaoxu14@otcaix.iscas.ac.cn>
@ -1608,17 +1686,17 @@ Yestin Sun <sunyi0804@gmail.com>
Yi EungJun <eungjun.yi@navercorp.com>
Yibai Zhang <xm1994@gmail.com>
Yihang Ho <hoyihang5@gmail.com>
Ying Li <cyli@twistedmatrix.com>
Ying Li <ying.li@docker.com>
Yohei Ueda <yohei@jp.ibm.com>
Yong Tang <yong.tang.github@outlook.com>
Yongzhi Pan <panyongzhi@gmail.com>
yorkie <yorkiefixer@gmail.com>
Youcef YEKHLEF <yyekhlef@gmail.com>
Yu Peng <yu.peng36@zte.com.cn>
Yuan Sun <sunyuan3@huawei.com>
yuchangchun <yuchangchun1@huawei.com>
yuchengxia <yuchengxia@huawei.com>
yuexiao-wang <wang.yuexiao@zte.com.cn>
YuPengZTE <yu.peng36@zte.com.cn>
Yunxiang Huang <hyxqshk@vip.qq.com>
Yurii Rashkovskii <yrashk@gmail.com>
yuzou <zouyu7@huawei.com>
Zac Dover <zdover@redhat.com>
@ -1635,6 +1713,7 @@ Zhang Wentao <zhangwentao234@huawei.com>
Zhenan Ye <21551168@zju.edu.cn>
zhouhao <zhouhao@cn.fujitsu.com>
Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Zhu Kunjia <zhu.kunjia@zte.com.cn>
Zhuoyun Wei <wzyboy@wzyboy.org>
Zilin Du <zilin.du@gmail.com>
zimbatm <zimbatm@zimbatm.com>

View file

@ -5,9 +5,182 @@ 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.
## 1.13.0 (2016-12-08)
## 17.03.2-ce (2017-05-29)
### Networking
- Fix a concurrency issue preventing network creation [#33273](https://github.com/moby/moby/pull/33273)
### Runtime
- Relabel secrets path to avoid a Permission Denied on selinux enabled systems [#33236](https://github.com/moby/moby/pull/33236) (ref [#32529](https://github.com/moby/moby/pull/32529)
- Fix cases where local volume were not properly relabeled if needed [#33236](https://github.com/moby/moby/pull/33236) (ref [#29428](https://github.com/moby/moby/pull/29428))
- Fix an issue while upgrading if a plugin rootfs was still mounted [#33236](https://github.com/moby/moby/pull/33236) (ref [#32525](https://github.com/moby/moby/pull/32525))
- Fix an issue where volume wouldn't default to the `rprivate` propagation mode [#33236](https://github.com/moby/moby/pull/33236) (ref [#32851](https://github.com/moby/moby/pull/32851))
- Fix a panic that could occur when a volume driver could not be retrieved [#33236](https://github.com/moby/moby/pull/33236) (ref [#32347](https://github.com/moby/moby/pull/32347))
+ Add a warning in `docker info` when the `overlay` or `overlay2` graphdriver is used on a filesystem without `d_type` support [#33236](https://github.com/moby/moby/pull/33236) (ref [#31290](https://github.com/moby/moby/pull/31290))
- Fix an issue with backporting mount spec to older volumes [#33207](https://github.com/moby/moby/pull/33207)
- Fix issue where a failed unmount can lead to data loss on local volume remove [#33120](https://github.com/moby/moby/pull/33120)
### Swarm Mode
- Fix a case where tasks could get killed unexpectedly [#33118](https://github.com/moby/moby/pull/33118)
- Fix an issue preventing to deploy services if the registry cannot be reached despite the needed images being locally present [#33117](https://github.com/moby/moby/pull/33117)
## 17.03.1-ce (2017-03-27)
### Remote API (v1.27) & Client
* Fix autoremove on older api [#31692](https://github.com/docker/docker/pull/31692)
* Fix default network customization for a stack [#31258](https://github.com/docker/docker/pull/31258/)
* Correct CPU usage calculation in presence of offline CPUs and newer Linux [#31802](https://github.com/docker/docker/pull/31802)
* Fix issue where service healthcheck is `{}` in remote API [#30197](https://github.com/docker/docker/pull/30197)
### Runtime
* Update runc to 54296cf40ad8143b62dbcaa1d90e520a2136ddfe [#31666](https://github.com/docker/docker/pull/31666)
* Ignore cgroup2 mountpoints [opencontainers/runc#1266](https://github.com/opencontainers/runc/pull/1266)
* Update containerd to 4ab9917febca54791c5f071a9d1f404867857fcc [#31662](https://github.com/docker/docker/pull/31662) [#31852](https://github.com/docker/docker/pull/31852)
* Register healtcheck service before calling restore() [docker/containerd#609](https://github.com/docker/containerd/pull/609)
* Fix `docker exec` not working after unattended upgrades that reload apparmor profiles [#31773](https://github.com/docker/docker/pull/31773)
* Fix unmounting layer without merge dir with Overlay2 [#31069](https://github.com/docker/docker/pull/31069)
* Do not ignore "volume in use" errors when force-delete [#31450](https://github.com/docker/docker/pull/31450)
### Swarm Mode
* Update swarmkit to 17756457ad6dc4d8a639a1f0b7a85d1b65a617bb [#31807](https://github.com/docker/docker/pull/31807)
* Scheduler now correctly considers tasks which have been assigned to a node but aren't yet running [docker/swarmkit#1980](https://github.com/docker/swarmkit/pull/1980)
* Allow removal of a network when only dead tasks reference it [docker/swarmkit#2018](https://github.com/docker/swarmkit/pull/2018)
* Retry failed network allocations less aggressively [docker/swarmkit#2021](https://github.com/docker/swarmkit/pull/2021)
* Avoid network allocation for tasks that are no longer running [docker/swarmkit#2017](https://github.com/docker/swarmkit/pull/2017)
* Bookkeeping fixes inside network allocator allocator [docker/swarmkit#2019](https://github.com/docker/swarmkit/pull/2019) [docker/swarmkit#2020](https://github.com/docker/swarmkit/pull/2020)
* Avoid timing out service create or update when a registry is slow to respond [#31861](https://github.com/docker/docker/pull/31861)
### Windows
* Cleanup HCS on restore [#31503](https://github.com/docker/docker/pull/31503)
## 17.03.0-ce (2017-03-01)
**IMPORTANT**: Starting with this release, Docker is on a monthly release cycle and uses a
new YY.MM versioning scheme to reflect this. Two channels are available: monthly and quarterly.
Any given monthly release will only receive security and bugfixes until the next monthly
release is available. Quarterly releases receive security and bugfixes for 4 months after
initial release. This release includes bugfixes for 1.13.1 but
there are no major feature additions and the API version stays the same.
Upgrading from Docker 1.13.1 to 17.03.0 is expected to be simple and low-risk.
### Client
* Fix panic in `docker stats --format` [#30776](https://github.com/docker/docker/pull/30776)
### Contrib
* Update various `bash` and `zsh` completion scripts [#30823](https://github.com/docker/docker/pull/30823), [#30945](https://github.com/docker/docker/pull/30945) and more...
* Block obsolete socket families in default seccomp profile - mitigates unpatched kernels' CVE-2017-6074 [#29076](https://github.com/docker/docker/pull/29076)
### Networking
* Fix bug on overlay encryption keys rotation in cross-datacenter swarm [#30727](https://github.com/docker/docker/pull/30727)
* Fix side effect panic in overlay encryption and network control plane communication failure ("No installed keys could decrypt the message") on frequent swarm leader re-election [#25608](https://github.com/docker/docker/pull/25608)
* Several fixes around system responsiveness and datapath programming when using overlay network with external kv-store [docker/libnetwork#1639](https://github.com/docker/libnetwork/pull/1639), [docker/libnetwork#1632](https://github.com/docker/libnetwork/pull/1632) and more...
* Discard incoming plain vxlan packets for encrypted overlay network [#31170](https://github.com/docker/docker/pull/31170)
* Release the network attachment on allocation failure [#31073](https://github.com/docker/docker/pull/31073)
* Fix port allocation when multiple published ports map to the same target port [docker/swarmkit#1835](https://github.com/docker/swarmkit/pull/1835)
### Runtime
* Fix a deadlock in docker logs [#30223](https://github.com/docker/docker/pull/30223)
* Fix cpu spin waiting for log write events [#31070](https://github.com/docker/docker/pull/31070)
* Fix a possible crash when using journald [#31231](https://github.com/docker/docker/pull/31231) [#31263](https://github.com/docker/docker/pull/31263)
* Fix a panic on close of nil channel [#31274](https://github.com/docker/docker/pull/31274)
* Fix duplicate mount point for `--volumes-from` in `docker run` [#29563](https://github.com/docker/docker/pull/29563)
* Fix `--cache-from` does not cache last step [#31189](https://github.com/docker/docker/pull/31189)
### Swarm Mode
* Shutdown leaks an error when the container was never started [#31279](https://github.com/docker/docker/pull/31279)
* Fix possibility of tasks getting stuck in the "NEW" state during a leader failover [docker/swarmkit#1938](https://github.com/docker/swarmkit/pull/1938)
* Fix extraneous task creations for global services that led to confusing replica counts in `docker service ls` [docker/swarmkit#1957](https://github.com/docker/swarmkit/pull/1957)
* Fix problem that made rolling updates slow when `task-history-limit` was set to 1 [docker/swarmkit#1948](https://github.com/docker/swarmkit/pull/1948)
* Restart tasks elsewhere, if appropriate, when they are shut down as a result of nodes no longer satisfying constraints [docker/swarmkit#1958](https://github.com/docker/swarmkit/pull/1958)
## 1.13.1 (2017-02-08)
**IMPORTANT**: On Linux distributions where `devicemapper` was the default storage driver,
the `overlay2`, or `overlay` is now used by default (if the kernel supports it).
To use devicemapper, you can manually configure the storage driver to use through
the `--storage-driver` daemon option, or by setting "storage-driver" in the `daemon.json`
configuration file.
**IMPORTANT**: In Docker 1.13, the managed plugin api changed, as compared to the experimental
version introduced in Docker 1.12. You must **uninstall** plugins which you installed with Docker 1.12
_before_ upgrading to Docker 1.13. You can uninstall plugins using the `docker plugin rm` command.
If you have already upgraded to Docker 1.13 without uninstalling
previously-installed plugins, you may see this message when the Docker daemon
starts:
Error starting daemon: json: cannot unmarshal string into Go value of type types.PluginEnv
To manually remove all plugins and resolve this problem, take the following steps:
1. Remove plugins.json from: `/var/lib/docker/plugins/`.
2. Restart Docker. Verify that the Docker daemon starts with no errors.
3. Reinstall your plugins.
### Contrib
* Do not require a custom build of tini [#28454](https://github.com/docker/docker/pull/28454)
* Upgrade to Go 1.7.5 [#30489](https://github.com/docker/docker/pull/30489)
### Remote API (v1.26) & Client
+ Support secrets in docker stack deploy with compose file [#30144](https://github.com/docker/docker/pull/30144)
### Runtime
* Fix size issue in `docker system df` [#30378](https://github.com/docker/docker/pull/30378)
* Fix error on `docker inspect` when Swarm certificates were expired. [#29246](https://github.com/docker/docker/pull/29246)
* Fix deadlock on v1 plugin with activate error [#30408](https://github.com/docker/docker/pull/30408)
* Fix SELinux regression [#30649](https://github.com/docker/docker/pull/30649)
### Plugins
* Support global scoped network plugins (v2) in swarm mode [#30332](https://github.com/docker/docker/pull/30332)
+ Add `docker plugin upgrade` [#29414](https://github.com/docker/docker/pull/29414)
### Windows
* Fix small regression with old plugins in Windows [#30150](https://github.com/docker/docker/pull/30150)
* Fix warning on Windows [#30730](https://github.com/docker/docker/pull/30730)
## 1.13.0 (2017-01-18)
**IMPORTANT**: On Linux distributions where `devicemapper` was the default storage driver,
the `overlay2`, or `overlay` is now used by default (if the kernel supports it).
To use devicemapper, you can manually configure the storage driver to use through
the `--storage-driver` daemon option, or by setting "storage-driver" in the `daemon.json`
configuration file.
**IMPORTANT**: In Docker 1.13, the managed plugin api changed, as compared to the experimental
version introduced in Docker 1.12. You must **uninstall** plugins which you installed with Docker 1.12
_before_ upgrading to Docker 1.13. You can uninstall plugins using the `docker plugin rm` command.
If you have already upgraded to Docker 1.13 without uninstalling
previously-installed plugins, you may see this message when the Docker daemon
starts:
Error starting daemon: json: cannot unmarshal string into Go value of type types.PluginEnv
To manually remove all plugins and resolve this problem, take the following steps:
1. Remove plugins.json from: `/var/lib/docker/plugins/`.
2. Restart Docker. Verify that the Docker daemon starts with no errors.
3. Reinstall your plugins.
### Builder
+ Add capability to specify images used as a cache source on build. These images do not need to have local parent chain and can be pulled from other registries [#26839](https://github.com/docker/docker/pull/26839)
+ (experimental) Add option to squash image layers to the FROM image after successful builds [#22641](https://github.com/docker/docker/pull/22641)
* Fix dockerfile parser with empty line after escape [#24725](https://github.com/docker/docker/pull/24725)
@ -18,15 +191,20 @@ be found.
- Fix image layer inconsistencies when using the overlay storage driver [#27209](https://github.com/docker/docker/pull/27209)
* Unused build-args are now allowed. A warning is presented instead of an error and failed build [#27412](https://github.com/docker/docker/pull/27412)
- Fix builder cache issue on Windows [#27805](https://github.com/docker/docker/pull/27805)
+ Allow `USER` in builder on Windows [#28415](https://github.com/docker/docker/pull/28415)
+ Handle env case-insensitive on Windows [#28725](https://github.com/docker/docker/pull/28725)
### Contrib
+ Add support for building docker debs for Ubuntu Xenial on PPC64 [#23438](https://github.com/docker/docker/pull/23438)
+ Add support for building docker debs for Ubuntu Xenial on s390x [#26104](https://github.com/docker/docker/pull/26104)
+ Add support for building docker debs for Ubuntu 16.04 Xenial on PPC64LE [#23438](https://github.com/docker/docker/pull/23438)
+ Add support for building docker debs for Ubuntu 16.04 Xenial on s390x [#26104](https://github.com/docker/docker/pull/26104)
+ Add support for building docker debs for Ubuntu 16.10 Yakkety Yak on PPC64LE [#28046](https://github.com/docker/docker/pull/28046)
- Add RPM builder for VMWare Photon OS [#24116](https://github.com/docker/docker/pull/24116)
+ Add shell completions to tgz [#27735](https://github.com/docker/docker/pull/27735)
* Update the install script to allow using the mirror in China [#27005](https://github.com/docker/docker/pull/27005)
+ Add DEB builder for Ubuntu 16.10 Yakkety Yak [#27993](https://github.com/docker/docker/pull/27993)
+ Add RPM builder for Fedora 25 [#28222](https://github.com/docker/docker/pull/28222)
+ Add `make deb` support for aarch64 [#27625](https://github.com/docker/docker/pull/27625)
### Distribution
@ -52,11 +230,14 @@ be found.
+ Unix socket support for fluentd [#26088](https://github.com/docker/docker/pull/26088)
* Enable fluentd logging driver on Windows [#28189](https://github.com/docker/docker/pull/28189)
- Sanitize docker labels when used as journald field names [#23725](https://github.com/docker/docker/pull/23725)
- Fix an issue where `docker logs --tail` returned less lines than expected [#28203](https://github.com/docker/docker/pull/28203)
- Splunk Logging Driver: performance and reliability improvements [#26207](https://github.com/docker/docker/pull/26207)
- Splunk Logging Driver: configurable formats and skip for verifying connection [#25786](https://github.com/docker/docker/pull/25786)
### Networking
+ Add `--attachable` network support to enable `docker run` to work in swarm-mode overlay network [#25962](https://github.com/docker/docker/pull/25962)
+ Add support for host port PublishMode in services using the `--port` option in `docker service create` [#27917](https://github.com/docker/docker/pull/27917)
+ Add support for host port PublishMode in services using the `--publish` option in `docker service create` [#27917](https://github.com/docker/docker/pull/27917) and [#28943](https://github.com/docker/docker/pull/28943)
+ Add support for Windows server 2016 overlay network driver (requires upcoming ws2016 update) [#28182](https://github.com/docker/docker/pull/28182)
* Change the default `FORWARD` policy to `DROP` [#28257](https://github.com/docker/docker/pull/28257)
+ Add support for specifying static IP addresses for predefined network on windows [#22208](https://github.com/docker/docker/pull/22208)
@ -77,6 +258,7 @@ be found.
+ Add `docker plugin create` command [#28164](https://github.com/docker/docker/pull/28164)
* Send request's TLS peer certificates to authorization plugins [#27383](https://github.com/docker/docker/pull/27383)
* Support for global-scoped network and ipam plugins in swarm-mode [#27287](https://github.com/docker/docker/pull/27287)
* Split `docker plugin install` into two API call `/privileges` and `/pull` [#28963](https://github.com/docker/docker/pull/28963)
### Remote API (v1.25) & Client
@ -86,21 +268,21 @@ be found.
* Remove `--name` from `docker volume create` [#23830](https://github.com/docker/docker/pull/23830)
+ Add `docker stack ls` [#23886](https://github.com/docker/docker/pull/23886)
+ Add a new `is-task` ps filter [#24411](https://github.com/docker/docker/pull/24411)
+ Add `--env-file` flag to `docker create service` [#24844](https://github.com/docker/docker/pull/24844)
+ Add `--env-file` flag to `docker service create` [#24844](https://github.com/docker/docker/pull/24844)
+ Add `--format` on `docker stats` [#24987](https://github.com/docker/docker/pull/24987)
+ Make `docker node ps` default to `self` in swarm node [#25214](https://github.com/docker/docker/pull/25214)
+ Add `--group` in `docker service create` [#25317](https://github.com/docker/docker/pull/25317)
+ Add `--no-trunc` to service/node/stack ps output [#25337(https://github.com/docker/docker/pull/25337)
+ Add `--no-trunc` to service/node/stack ps output [#25337](https://github.com/docker/docker/pull/25337)
+ Add Logs to `ContainerAttachOptions` so go clients can request to retrieve container logs as part of the attach process [#26718](https://github.com/docker/docker/pull/26718)
+ Allow client to talk to an older server [#27745](https://github.com/docker/docker/pull/27745)
* Inform user client-side that a container removal is in progress [#26074](https://github.com/docker/docker/pull/26074)
+ Add `Isolation` to the /info endpoint [#26255](https://github.com/docker/docker/pull/26255)
+ Add `userns` to the /info endpoint [#27840](https://github.com/docker/docker/pull/27840)
- Do not allow more than one mode be requested at once in the services endpoint [#26643](https://github.com/docker/docker/pull/26643)
+ Add `--mount` flag to `docker create` and `docker run` [#26825](https://github.com/docker/docker/pull/26825)[#28150](https://github.com/docker/docker/pull/28150)
+ Add capability to /containers/create API to specify mounts in a more granular and safer way [#22373](https://github.com/docker/docker/pull/22373)
+ Add `--format` flag to `network ls` and `volume ls` [#23475](https://github.com/docker/docker/pull/23475)
* Allow the top-level `docker inspect` command to inspect any kind of resource [#23614](https://github.com/docker/docker/pull/23614)
+ Add --cpus flag to control cpu resources for `docker run` and `docker create`, and add `NanoCPUs` to `HostConfig` [#27958](https://github.com/docker/docker/pull/27958)
- Allow unsetting the `--entrypoint` in `docker run` or `docker create` [#23718](https://github.com/docker/docker/pull/23718)
* Restructure CLI commands by adding `docker image` and `docker container` commands for more consistency [#26025](https://github.com/docker/docker/pull/26025)
- Remove `COMMAND` column from `service ls` output [#28029](https://github.com/docker/docker/pull/28029)
@ -132,7 +314,7 @@ be found.
- Fix a race condition between device deferred removal and resume device, when using the devicemapper graphdriver [#23497](https://github.com/docker/docker/pull/23497)
- Add `docker stats` support in Windows [#25737](https://github.com/docker/docker/pull/25737)
- Allow using `--pid=host` and `--net=host` when `--userns=host` [#25771](https://github.com/docker/docker/pull/25771)
+ (experimental) Add metrics output [#25820](https://github.com/docker/docker/pull/25820)
+ (experimental) Add metrics (Prometheus) output for basic `container`, `image`, and `daemon` operations [#25820](https://github.com/docker/docker/pull/25820)
- Fix issue in `docker stats` with `NetworkDisabled=true` [#25905](https://github.com/docker/docker/pull/25905)
+ Add `docker top` support in Windows [#25891](https://github.com/docker/docker/pull/25891)
+ Record pid of exec'd process [#27470](https://github.com/docker/docker/pull/27470)
@ -150,32 +332,38 @@ be found.
### Swarm Mode
+ Add secret management [#27794](https://github.com/docker/docker/pull/27794)
+ Add support for templating service options (hostname, mounts, and environment variables) [#28025](https://github.com/docker/docker/pull/28025)
* Display the endpoint mode in the output of `docker service inspect --pretty` [#26906](https://github.com/docker/docker/pull/26906)
* Make `docker service ps` output more bearable by shortening service IDs in task names [#28088](https://github.com/docker/docker/pull/28088)
* `docker node ps` now defaults to the current node [#25214](https://github.com/docker/docker/pull/25214)
+ Add `-a`/`--all` flags to `docker service ps` and `docker node ps` to show all results [#25983](https://github.com/docker/docker/pull/25983)
* Make `docker node ps` default to the current node [#25214](https://github.com/docker/docker/pull/25214)
+ Add `--dns`, -`-dns-opt`, and `--dns-search` to service create. [#27567](https://github.com/docker/docker/pull/27567)
+ Add `--force` to `docker service update` [#27596](https://github.com/docker/docker/pull/27596)
+ Add `--health-*` and `--no-healthcheck` flags to `docker service create` and `docker service update` [#27369](https://github.com/docker/docker/pull/27369)
+ Add `-q` to `docker service ps` [#27654](https://github.com/docker/docker/pull/27654)
* Display number of global services in `docker service ls` [#27710](https://github.com/docker/docker/pull/27710)
- Remove `--name` flag from `docker service update`. This flag is only functional on `docker service create`, so was removed from the `update` command [#26988](https://github.com/docker/docker/pull/26988)
- Fix worker nodes failing to recover because of transient networking issues [#26646](https://github.com/docker/docker/issues/26646)
* Add support for health aware load balancing and DNS records [#27279](https://github.com/docker/docker/pull/27279)
* Add `--hostname` to `docker service create` [#27857](https://github.com/docker/docker/pull/27857)
- Add `--tty` flag to `docker service create`/`update` [#28076](https://github.com/docker/docker/pull/28076)
+ Add `--hostname` to `docker service create` [#27857](https://github.com/docker/docker/pull/27857)
+ Add `--host` to `docker service create`, and `--host-add`, `--host-rm` to `docker service update` [#28031](https://github.com/docker/docker/pull/28031)
+ Add `--tty` flag to `docker service create`/`update` [#28076](https://github.com/docker/docker/pull/28076)
* Autodetect, store, and expose node IP address as seen by the manager [#27910](https://github.com/docker/docker/pull/27910)
* Encryption at rest of manager keys and raft data [#27967](https://github.com/docker/docker/pull/27967)
+ Add `--update-max-failure-ratio`, `--update-monitor` and `--rollback` flags to `docker service update` [#26421](https://github.com/docker/docker/pull/26421)
- Fix an issue with address autodiscovery on `docker swarm init` running inside a container [#26457](https://github.com/docker/docker/pull/26457)
+ (experimental) Add `docker service logs` command to view logs for a service [#28089](https://github.com/docker/docker/pull/28089)
- Pin images by digest for `docker service create` and `update` [#28173](https://github.com/docker/docker/pull/28173)
- Add short (`-f`) flag for `docker node rm --force` and `docker swarm leave --force` [#28196](https://github.com/docker/docker/pull/28196)
+ Don't repull image if pinned by digest [#28265](https://github.com/docker/docker/pull/28265)
+ swarm-mode support for indows [#27838](https://github.com/docker/docker/pull/27838)
+ Pin images by digest for `docker service create` and `update` [#28173](https://github.com/docker/docker/pull/28173)
* Add short (`-f`) flag for `docker node rm --force` and `docker swarm leave --force` [#28196](https://github.com/docker/docker/pull/28196)
+ Add options to customize Raft snapshots (`--max-snapshots`, `--snapshot-interval`) [#27997](https://github.com/docker/docker/pull/27997)
- Don't repull image if pinned by digest [#28265](https://github.com/docker/docker/pull/28265)
+ Swarm-mode support for Windows [#27838](https://github.com/docker/docker/pull/27838)
+ Allow hostname to be updated on service [#28771](https://github.com/docker/docker/pull/28771)
+ Support v2 plugins [#29433](https://github.com/docker/docker/pull/29433)
+ Add content trust for services [#29469](https://github.com/docker/docker/pull/29469)
### Volume
+ Add support for labels on volumes [#25628](https://github.com/docker/docker/pull/21567)
+ Add support for labels on volumes [#21270](https://github.com/docker/docker/pull/21270)
+ Add support for filtering volumes by label [#25628](https://github.com/docker/docker/pull/25628)
* Add a `--force` flag in `docker volume rm` to forcefully purge the data of the volume that has already been deleted [#23436](https://github.com/docker/docker/pull/23436)
* Enhance `docker volume inspect` to show all options used when creating the volume [#26671](https://github.com/docker/docker/pull/26671)
@ -192,10 +380,236 @@ be found.
- Deprecate unversioned API endpoints [#28208](https://github.com/docker/docker/pull/28208)
- Remove Ubuntu 15.10 (Wily Werewolf) as supported platform. Ubuntu 15.10 is EOL, and no longer receives updates [#27042](https://github.com/docker/docker/pull/27042)
- Remove Fedora 22 as supported platform. Fedora 22 is EOL, and no longer receives updates [#27432](https://github.com/docker/docker/pull/27432)
- Remove Fedora 23 as supported platform. Fedora 23 is EOL, and no longer receives updates [#29455](https://github.com/docker/docker/pull/29455)
- Deprecate the `repo:shortid` syntax on `docker pull` [#27207](https://github.com/docker/docker/pull/27207)
- Deprecate backing filesystem without d_type for overlay/overlay2 storage drivers [#27433](https://github.com/docker/docker/pull/27433)
- Deprecate MAINTAINER in Dockerfile [#25466](https://github.com/docker/docker/pull/25466)
- Deprecated filter param for endpoint `/images/json` [#27872](https://github.com/docker/docker/pull/27872)
- Deprecate backing filesystem without `d_type` for overlay and overlay2 storage drivers [#27433](https://github.com/docker/docker/pull/27433)
- Deprecate `MAINTAINER` in Dockerfile [#25466](https://github.com/docker/docker/pull/25466)
- Deprecate `filter` param for endpoint `/images/json` [#27872](https://github.com/docker/docker/pull/27872)
- Deprecate setting duplicate engine labels [#24533](https://github.com/docker/docker/pull/24533)
- Deprecate "top-level" network information in `NetworkSettings` [#28437](https://github.com/docker/docker/pull/28437)
## 1.12.6 (2017-01-10)
**IMPORTANT**: Docker 1.12 ships with an updated systemd unit file for rpm
based installs (which includes RHEL, Fedora, CentOS, and Oracle Linux 7). When
upgrading from an older version of docker, the upgrade process may not
automatically install the updated version of the unit file, or fail to start
the docker service if;
- the systemd unit file (`/usr/lib/systemd/system/docker.service`) contains local changes, or
- a systemd drop-in file is present, and contains `-H fd://` in the `ExecStart` directive
Starting the docker service will produce an error:
Failed to start docker.service: Unit docker.socket failed to load: No such file or directory.
or
no sockets found via socket activation: make sure the service was started by systemd.
To resolve this:
- Backup the current version of the unit file, and replace the file with the
[version that ships with docker 1.12](https://raw.githubusercontent.com/docker/docker/v1.12.0/contrib/init/systemd/docker.service.rpm)
- Remove the `Requires=docker.socket` directive from the `/usr/lib/systemd/system/docker.service` file if present
- Remove `-H fd://` from the `ExecStart` directive (both in the main unit file, and in any drop-in files present).
After making those changes, run `sudo systemctl daemon-reload`, and `sudo
systemctl restart docker` to reload changes and (re)start the docker daemon.
**NOTE**: Docker 1.12.5 will correctly validate that either an IPv6 subnet is provided or
that the IPAM driver can provide one when you specify the `--ipv6` option.
If you are currently using the `--ipv6` option _without_ specifying the
`--fixed-cidr-v6` option, the Docker daemon will refuse to start with the
following message:
```none
Error starting daemon: Error initializing network controller: Error creating
default "bridge" network: failed to parse pool request
for address space "LocalDefault" pool " subpool ":
could not find an available, non-overlapping IPv6 address
pool among the defaults to assign to the network
```
To resolve this error, either remove the `--ipv6` flag (to preserve the same
behavior as in Docker 1.12.3 and earlier), or provide an IPv6 subnet as the
value of the `--fixed-cidr-v6` flag.
In a similar way, if you specify the `--ipv6` flag when creating a network
with the default IPAM driver, without providing an IPv6 `--subnet`, network
creation will fail with the following message:
```none
Error response from daemon: failed to parse pool request for address space
"LocalDefault" pool "" subpool "": could not find an
available, non-overlapping IPv6 address pool among
the defaults to assign to the network
```
To resolve this, either remove the `--ipv6` flag (to preserve the same behavior
as in Docker 1.12.3 and earlier), or provide an IPv6 subnet as the value of the
`--subnet` flag.
The network network creation will instead succeed if you use an external IPAM driver
which supports automatic allocation of IPv6 subnets.
### Runtime
- Fix runC privilege escalation (CVE-2016-9962)
## 1.12.5 (2016-12-15)
**IMPORTANT**: Docker 1.12 ships with an updated systemd unit file for rpm
based installs (which includes RHEL, Fedora, CentOS, and Oracle Linux 7). When
upgrading from an older version of docker, the upgrade process may not
automatically install the updated version of the unit file, or fail to start
the docker service if;
- the systemd unit file (`/usr/lib/systemd/system/docker.service`) contains local changes, or
- a systemd drop-in file is present, and contains `-H fd://` in the `ExecStart` directive
Starting the docker service will produce an error:
Failed to start docker.service: Unit docker.socket failed to load: No such file or directory.
or
no sockets found via socket activation: make sure the service was started by systemd.
To resolve this:
- Backup the current version of the unit file, and replace the file with the
[version that ships with docker 1.12](https://raw.githubusercontent.com/docker/docker/v1.12.0/contrib/init/systemd/docker.service.rpm)
- Remove the `Requires=docker.socket` directive from the `/usr/lib/systemd/system/docker.service` file if present
- Remove `-H fd://` from the `ExecStart` directive (both in the main unit file, and in any drop-in files present).
After making those changes, run `sudo systemctl daemon-reload`, and `sudo
systemctl restart docker` to reload changes and (re)start the docker daemon.
**NOTE**: Docker 1.12.5 will correctly validate that either an IPv6 subnet is provided or
that the IPAM driver can provide one when you specify the `--ipv6` option.
If you are currently using the `--ipv6` option _without_ specifying the
`--fixed-cidr-v6` option, the Docker daemon will refuse to start with the
following message:
```none
Error starting daemon: Error initializing network controller: Error creating
default "bridge" network: failed to parse pool request
for address space "LocalDefault" pool " subpool ":
could not find an available, non-overlapping IPv6 address
pool among the defaults to assign to the network
```
To resolve this error, either remove the `--ipv6` flag (to preserve the same
behavior as in Docker 1.12.3 and earlier), or provide an IPv6 subnet as the
value of the `--fixed-cidr-v6` flag.
In a similar way, if you specify the `--ipv6` flag when creating a network
with the default IPAM driver, without providing an IPv6 `--subnet`, network
creation will fail with the following message:
```none
Error response from daemon: failed to parse pool request for address space
"LocalDefault" pool "" subpool "": could not find an
available, non-overlapping IPv6 address pool among
the defaults to assign to the network
```
To resolve this, either remove the `--ipv6` flag (to preserve the same behavior
as in Docker 1.12.3 and earlier), or provide an IPv6 subnet as the value of the
`--subnet` flag.
The network network creation will instead succeed if you use an external IPAM driver
which supports automatic allocation of IPv6 subnets.
### Runtime
- Fix race on sending stdin close event [#29424](https://github.com/docker/docker/pull/29424)
### Networking
- Fix panic in docker network ls when a network was created with `--ipv6` and no ipv6 `--subnet` in older docker versions [#29416](https://github.com/docker/docker/pull/29416)
### Contrib
- Fix compilation on Darwin [#29370](https://github.com/docker/docker/pull/29370)
## 1.12.4 (2016-12-12)
**IMPORTANT**: Docker 1.12 ships with an updated systemd unit file for rpm
based installs (which includes RHEL, Fedora, CentOS, and Oracle Linux 7). When
upgrading from an older version of docker, the upgrade process may not
automatically install the updated version of the unit file, or fail to start
the docker service if;
- the systemd unit file (`/usr/lib/systemd/system/docker.service`) contains local changes, or
- a systemd drop-in file is present, and contains `-H fd://` in the `ExecStart` directive
Starting the docker service will produce an error:
Failed to start docker.service: Unit docker.socket failed to load: No such file or directory.
or
no sockets found via socket activation: make sure the service was started by systemd.
To resolve this:
- Backup the current version of the unit file, and replace the file with the
[version that ships with docker 1.12](https://raw.githubusercontent.com/docker/docker/v1.12.0/contrib/init/systemd/docker.service.rpm)
- Remove the `Requires=docker.socket` directive from the `/usr/lib/systemd/system/docker.service` file if present
- Remove `-H fd://` from the `ExecStart` directive (both in the main unit file, and in any drop-in files present).
After making those changes, run `sudo systemctl daemon-reload`, and `sudo
systemctl restart docker` to reload changes and (re)start the docker daemon.
### Runtime
- Fix issue where volume metadata was not removed [#29083](https://github.com/docker/docker/pull/29083)
- Asynchronously close streams to prevent holding container lock [#29050](https://github.com/docker/docker/pull/29050)
- Fix selinux labels for newly created container volumes [#29050](https://github.com/docker/docker/pull/29050)
- Remove hostname validation [#28990](https://github.com/docker/docker/pull/28990)
- Fix deadlocks caused by IO races [#29095](https://github.com/docker/docker/pull/29095) [#29141](https://github.com/docker/docker/pull/29141)
- Return an empty stats if the container is restarting [#29150](https://github.com/docker/docker/pull/29150)
- Fix volume store locking [#29151](https://github.com/docker/docker/pull/29151)
- Ensure consistent status code in API [#29150](https://github.com/docker/docker/pull/29150)
- Fix incorrect opaque directory permission in overlay2 [#29093](https://github.com/docker/docker/pull/29093)
- Detect plugin content and error out on `docker pull` [#29297](https://github.com/docker/docker/pull/29297)
### Swarm Mode
* Update Swarmkit [#29047](https://github.com/docker/docker/pull/29047)
- orchestrator/global: Fix deadlock on updates [docker/swarmkit#1760](https://github.com/docker/swarmkit/pull/1760)
- on leader switchover preserve the vxlan id for existing networks [docker/swarmkit#1773](https://github.com/docker/swarmkit/pull/1773)
- Refuse swarm spec not named "default" [#29152](https://github.com/docker/docker/pull/29152)
### Networking
* Update libnetwork [#29004](https://github.com/docker/docker/pull/29004) [#29146](https://github.com/docker/docker/pull/29146)
- Fix panic in embedded DNS [docker/libnetwork#1561](https://github.com/docker/libnetwork/pull/1561)
- Fix unmarhalling panic when passing --link-local-ip on global scope network [docker/libnetwork#1564](https://github.com/docker/libnetwork/pull/1564)
- Fix panic when network plugin returns nil StaticRoutes [docker/libnetwork#1563](https://github.com/docker/libnetwork/pull/1563)
- Fix panic in osl.(*networkNamespace).DeleteNeighbor [docker/libnetwork#1555](https://github.com/docker/libnetwork/pull/1555)
- Fix panic in swarm networking concurrent map read/write [docker/libnetwork#1570](https://github.com/docker/libnetwork/pull/1570)
* Allow encrypted networks when running docker inside a container [docker/libnetwork#1502](https://github.com/docker/libnetwork/pull/1502)
- Do not block autoallocation of IPv6 pool [docker/libnetwork#1538](https://github.com/docker/libnetwork/pull/1538)
- Set timeout for netlink calls [docker/libnetwork#1557](https://github.com/docker/libnetwork/pull/1557)
- Increase networking local store timeout to one minute [docker/libkv#140](https://github.com/docker/libkv/pull/140)
- Fix a panic in libnetwork.(*sandbox).execFunc [docker/libnetwork#1556](https://github.com/docker/libnetwork/pull/1556)
- Honor icc=false for internal networks [docker/libnetwork#1525](https://github.com/docker/libnetwork/pull/1525)
### Logging
* Update syslog log driver [#29150](https://github.com/docker/docker/pull/29150)
### Contrib
- Run "dnf upgrade" before installing in fedora [#29150](https://github.com/docker/docker/pull/29150)
- Add build-date back to RPM packages [#29150](https://github.com/docker/docker/pull/29150)
- deb package filename changed to include distro to distinguish between distro code names [#27829](https://github.com/docker/docker/pull/27829)
## 1.12.3 (2016-10-26)
@ -1120,7 +1534,7 @@ that allows to add build-time environment variables (#15182)
- devicemapper: Implement deferred deletion capability (#16381)
## Networking
### Networking
+ `docker network` exits experimental and is part of standard release (#16645)
+ New network top-level concept, with associated subcommands and API (#16645)

View file

@ -25,16 +25,15 @@
FROM debian:jessie
# allow replacing httpredir or deb mirror
ARG APT_MIRROR=deb.debian.org
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
# Add zfs ppa
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61 \
|| apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61
COPY keys/launchpad-ppa-zfs.asc /go/src/github.com/docker/docker/keys/
RUN apt-key add /go/src/github.com/docker/docker/keys/launchpad-ppa-zfs.asc
RUN echo deb http://ppa.launchpad.net/zfs-native/stable/ubuntu trusty main > /etc/apt/sources.list.d/zfs.list
# Allow replacing httpredir mirror
ARG APT_MIRROR=httpredir.debian.org
RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list
# Packaged dependencies
RUN apt-get update && apt-get install -y \
apparmor \
@ -127,7 +126,7 @@ RUN set -x \
# IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
# will need updating, to avoid errors. Ping #docker-maintainers on IRC
# with a heads-up.
ENV GO_VERSION 1.7.3
ENV GO_VERSION 1.7.6
RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
| tar -xzC /usr/local
@ -238,7 +237,7 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
# Please edit hack/dockerfile/install-binaries.sh to update them.
COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy
RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy bindata
# Wrap all commands in the "docker-in-docker" script to allow nested containers
ENTRYPOINT ["hack/dind"]

View file

@ -97,7 +97,7 @@ RUN set -x \
# so we use gccgo as bootstrap to build Go from source code.
# We don't use the official ARMv6 released binaries as a GOROOT_BOOTSTRAP, because
# not all ARM64 platforms support 32-bit mode. 32-bit mode is optional for ARMv8.
ENV GO_VERSION 1.7.3
ENV GO_VERSION 1.7.6
RUN mkdir /usr/src/go && curl -fsSL https://golang.org/dl/go${GO_VERSION}.src.tar.gz | tar -v -C /usr/src/go -xz --strip-components=1 \
&& cd /usr/src/go/src \
&& GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash

View file

@ -17,6 +17,10 @@
FROM armhf/debian:jessie
# allow replacing httpredir or deb mirror
ARG APT_MIRROR=deb.debian.org
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
# Packaged dependencies
RUN apt-get update && apt-get install -y \
apparmor \
@ -68,7 +72,7 @@ RUN cd /usr/local/lvm2 \
# See https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
# Install Go
ENV GO_VERSION 1.7.3
ENV GO_VERSION 1.7.6
RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" \
| tar -xzC /usr/local
ENV PATH /go/bin:/usr/local/go/bin:$PATH

View file

@ -15,8 +15,11 @@
# the case. Therefore, you don't have to disable it anymore.
#
# ppc64le/golang is a debian:jessie based image with golang installed
FROM ppc64le/golang:1.6.3
FROM ppc64le/debian:jessie
# allow replacing httpredir or deb mirror
ARG APT_MIRROR=deb.debian.org
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
# Packaged dependencies
RUN apt-get update && apt-get install -y \
@ -91,25 +94,12 @@ RUN set -x \
# Install Go
# ppc64le doesn't have official go binaries, so use the version of go installed from the image
# to build go from source.
# NOTE: ppc64le has compatibility issues with older versions of go, so make sure the version >= 1.6
ENV GO_VERSION 1.7.3
ENV GO_DOWNLOAD_URL https://golang.org/dl/go${GO_VERSION}.src.tar.gz
# NOTE: official ppc64le go binaries weren't available until go 1.6.4 and 1.7.4
ENV GO_VERSION 1.7.6
RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-ppc64le.tar.gz" \
| tar -xzC /usr/local
RUN set -x \
&& TEMPDIR="$(mktemp -d)" \
&& mv /usr/local/go $TEMPDIR \
&& GOROOT_BOOTSTRAP=$TEMPDIR/go \
&& cd /usr/local \
&& curl -fsSL "$GO_DOWNLOAD_URL" -o golang.tar.gz \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz \
&& cd go/src && ./make.bash 2>&1 \
&& rm -rf $TEMPDIR
ENV GOROOT_BOOTSTRAP /usr/local/go
ENV PATH /usr/local/go/bin/:$PATH
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
# Dependency for golint

View file

@ -97,7 +97,7 @@ RUN cd /usr/local/lvm2 \
&& make install_device-mapper
# See https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
ENV GO_VERSION 1.7.3
ENV GO_VERSION 1.7.6
RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-s390x.tar.gz" \
| tar -xzC /usr/local

View file

@ -7,6 +7,10 @@
FROM debian:jessie
# allow replacing httpredir or deb mirror
ARG APT_MIRROR=deb.debian.org
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
# Compile and runtime deps
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
@ -51,7 +55,7 @@ RUN set -x \
# IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
# will need updating, to avoid errors. Ping #docker-maintainers on IRC
# with a heads-up.
ENV GO_VERSION 1.7.3
ENV GO_VERSION 1.7.6
RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
| tar -xzC /usr/local
ENV PATH /go/bin:/usr/local/go/bin:$PATH

View file

@ -2,7 +2,7 @@
# -----------------------------------------------------------------------------------------
# This file describes the standard way to build Docker in a container on Windows
# Server 2016.
# Server 2016 or Windows 10.
#
# Maintainer: @jhowardmsft
# -----------------------------------------------------------------------------------------
@ -11,21 +11,25 @@
# Prerequisites:
# --------------
#
# 1. Windows Server 2016 with all Windows updates applied. Pre-release versions
# of Windows are not supported (eg Windows Server 2016 TP5). The build number
# must be at least 14393. This can be confirmed, for example, by running the
# following from an elevated PowerShell prompt - this sample output is from a
# fully up to date machine as at late October 2016:
# 1. Windows Server 2016 or Windows 10 with all Windows updates applied. The major
# build number must be at least 14393. This can be confirmed, for example, by
# running the following from an elevated PowerShell prompt - this sample output
# is from a fully up to date machine as at mid-November 2016:
#
# >> PS C:\> $(gin).WindowsBuildLabEx
# >> 14393.321.amd64fre.rs1_release_inmarket.161004-2338
# >> 14393.447.amd64fre.rs1_release_inmarket.161102-0100
#
# 2. Git for Windows (or another git client) must be installed. https://git-scm.com/download/win.
#
# 3. The machine must be configured to run containers. For example, by following
# the quick start guidance at https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start or
# https://github.com/docker/labs/blob/master/windows/windows-containers/Setup.md
#
# 4. If building in a Hyper-V VM: For Windows Server 2016 using Windows Server
# containers as the default option, it is recommended you have at least 1GB
# of memory assigned; For Windows 10 where Hyper-V Containers are employed, you
# should have at least 4GB of memory assigned. Note also, to run Hyper-V
# containers in a VM, it is necessary to configure the VM for nested virtualization.
# -----------------------------------------------------------------------------------------
@ -58,23 +62,24 @@
# >> cd C:\go\src\github.com\docker\docker
#
#
# 3. Build a docker image with the components required to build the docker binaries from source:
# 3. Build a docker image with the components required to build the docker binaries from source
# by running one of the following:
#
# >> docker build -t nativebuildimage -f Dockerfile.windows .
# >> docker build -t nativebuildimage -f Dockerfile.windows -m 2GB . (if using Hyper-V containers)
#
#
# 4. Build the docker executable binaries in a container:
# 4. Build the docker executable binaries by running one of the following:
#
# >> docker run --name binaries nativebuildimage sh -c 'cd /c/go/src/github.com/docker/docker; hack/make.sh binary'
# >> docker run --name binaries nativebuildimage hack\make.ps1 -Binary
# >> docker run --name binaries -m 2GB nativebuildimage hack\make.ps1 -Binary (if using Hyper-V containers)
#
#
# 5. Copy the binaries out of the above container, replacing HostPath with an appropriate destination
# 5. Copy the binaries out of the container, replacing HostPath with an appropriate destination
# folder on the host system where you want the binaries to be located.
#
# >> $v=$(Get-Content ".\VERSION" -raw).ToString().Replace("`n","").Trim()
# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\$v\binary-client\docker-$v.exe C:\HostPath\docker.exe
# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\$v\binary-daemon\dockerd.exe C:\HostPath\dockerd.exe
# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\$v\binary-daemon\docker-proxy-$v.exe C:\HostPath\docker-proxy.exe
# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\docker.exe C:\HostPath\docker.exe
# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\dockerd.exe C:\HostPath\dockerd.exe
#
#
# 6. (Optional) Remove the interim container holding the built executable binaries:
@ -88,7 +93,42 @@
# image which has all the components required to build the binaries already installed.
#
# >> docker rmi nativebuildimage
#
# -----------------------------------------------------------------------------------------
# The validation tests can either run in a container, or directly on the host. To run in a
# container, ensure you have created the nativebuildimage above. Then run one of the
# following from an (elevated) Windows PowerShell prompt:
#
# >> docker run --rm nativebuildimage hack\make.ps1 -DCO -PkgImports -GoFormat
# >> docker run --rm -m 2GB nativebuildimage hack\make.ps1 -DCO -PkgImports -GoFormat (if using Hyper-V containers)
# To run the validation tests on the host, from the root of the repository, run the
# following from a Windows PowerShell prompt (elevation is not required): (Note Go
# must be installed to run these tests)
#
# >> hack\make.ps1 -DCO -PkgImports -GoFormat
# -----------------------------------------------------------------------------------------
# To run unit tests, ensure you have created the nativebuildimage above. Then run one of
# the following from an (elevated) Windows PowerShell prompt:
#
# >> docker run --rm nativebuildimage hack\make.ps1 -TestUnit
# >> docker run --rm -m 2GB nativebuildimage hack\make.ps1 -TestUnit (if using Hyper-V containers)
# -----------------------------------------------------------------------------------------
# To run all tests and binary build, ensure you have created the nativebuildimage above. Then
# run one of the following from an (elevated) Windows PowerShell prompt:
#
# >> docker run nativebuildimage hack\make.ps1 -All
# >> docker run -m 2GB nativebuildimage hack\make.ps1 -All (if using Hyper-V containers)
# -----------------------------------------------------------------------------------------
@ -96,28 +136,26 @@
# Important notes:
# ---------------
#
# The posix utilities from git aren't usable interactively as at October 2016. This
# is because they require a console window which isn't present in a container in Windows.
# See the example at the top of this file. Do NOT use -it in that docker run. It will not work.
# Don't attempt to use a bind-mount to pass a local directory as the bundles target
# directory. It does not work (golang attempts for follow a mapped folder incorrectly).
# Instead, use docker cp as per the example.
#
# Don't attempt to use a volume for passing the source through to the container. The posix utilities will
# balk at reparse points.
# go.zip is not removed from the image as it is used by the Windows CI servers
# to ensure the host and image are running consistent versions of go.
#
# The downloaded files are not cleared from the image. go.zip is used by the Windows
# CI servers to ensure the host and image are running consistent versions of go.
# Nanoserver support is a work in progress. Although the image will build if the
# FROM statement is updated, it will not work when running autogen through hack\make.ps1.
# It is suspected that the required GCC utilities (eg gcc, windres, windmc) silently
# quit due to the use of console hooks which are not available.
#
# The GIT installer isn't very good at unattended install. We use techniques described
# at the links below to force it to set the path and other options accordingly.
# >> http://superuser.com/questions/944576/git-for-windows-silent-install-silent-arguments
# and follow through to installer at
# >> https://github.com/ferventcoder/chocolatey-packages/blob/master/automatic/git.install/tools/chocolateyInstall.ps1
# The docker integration tests do not currently run in a container on Windows, predominantly
# due to Windows not supporting privileged mode, so anything using a volume would fail.
# They (along with the rest of the docker CI suite) can be run using
# https://github.com/jhowardmsft/docker-w2wCIScripts/blob/master/runCI/Invoke-DockerCI.ps1.
#
# As of October 2016, this does not work on Windows 10 client, just Windows Server 2016,
# and only with the default isolation mode (process). It does not work with isolation mode
# set to Hyper-V containers (hyperv).
# -----------------------------------------------------------------------------------------
# The number of build steps below are explicitly minimised to improve performance.
FROM microsoft/windowsservercore
@ -127,56 +165,103 @@ SHELL ["powershell", "-command"]
# Environment variable notes:
# - GO_VERSION must be consistent with 'Dockerfile' used by Linux.
# - FROM_DOCKERFILE is used for detection of building within a container.
ENV GO_VERSION=1.7.3 `
GIT_LOCATION=https://github.com/git-for-windows/git/releases/download/v2.10.1.windows.1/Git-2.10.1-64-bit.exe `
ENV GO_VERSION=1.7.6 `
GIT_VERSION=2.11.0 `
GOPATH=C:\go `
FROM_DOCKERFILE=1
WORKDIR C:\
RUN `
setx /M Path $($Env:PATH+';C:\gcc\bin;C:\go\bin'); `
`
$ErrorActionPreference = 'Stop'; `
$ProgressPreference = 'SilentlyContinue'; `
`
Function Test-Nano() { `
$EditionId = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name 'EditionID').EditionId; `
return (($EditionId -eq 'ServerStandardNano') -or ($EditionId -eq 'ServerDataCenterNano') -or ($EditionId -eq 'NanoServer')); `
}`
`
Function Download-File([string] $source, [string] $target) { `
$wc = New-Object net.webclient; $wc.Downloadfile($source, $target) `
if (Test-Nano) { `
$handler = New-Object System.Net.Http.HttpClientHandler; `
$client = New-Object System.Net.Http.HttpClient($handler); `
$client.Timeout = New-Object System.TimeSpan(0, 30, 0); `
$cancelTokenSource = [System.Threading.CancellationTokenSource]::new(); `
$responseMsg = $client.GetAsync([System.Uri]::new($source), $cancelTokenSource.Token); `
$responseMsg.Wait(); `
if (!$responseMsg.IsCanceled) { `
$response = $responseMsg.Result; `
if ($response.IsSuccessStatusCode) { `
$downloadedFileStream = [System.IO.FileStream]::new($target, [System.IO.FileMode]::Create, [System.IO.FileAccess]::Write); `
$copyStreamOp = $response.Content.CopyToAsync($downloadedFileStream); `
$copyStreamOp.Wait(); `
$downloadedFileStream.Close(); `
if ($copyStreamOp.Exception -ne $null) { throw $copyStreamOp.Exception } `
} `
} else { `
Throw ("Failed to download " + $source) `
}`
} else { `
$webClient = New-Object System.Net.WebClient; `
$webClient.DownloadFile($source, $target); `
} `
} `
`
setx /M PATH $('C:\git\bin;C:\git\usr\bin;'+$Env:PATH+';C:\gcc\bin;C:\go\bin'); `
`
Write-Host INFO: Downloading git...; `
Download-File $Env:GIT_LOCATION gitsetup.exe; `
$location='https://github.com/git-for-windows/git/releases/download/v'+$env:GIT_VERSION+'.windows.1/PortableGit-'+$env:GIT_VERSION+'-64-bit.7z.exe'; `
Download-File $location C:\gitsetup.7z.exe; `
`
Write-Host INFO: Downloading go...; `
Download-File $('https://golang.org/dl/go'+$Env:GO_VERSION+'.windows-amd64.zip') go.zip; `
Download-File $('https://golang.org/dl/go'+$Env:GO_VERSION+'.windows-amd64.zip') C:\go.zip; `
`
Write-Host INFO: Downloading compiler 1 of 3...; `
Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/gcc.zip gcc.zip; `
Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/gcc.zip C:\gcc.zip; `
`
Write-Host INFO: Downloading compiler 2 of 3...; `
Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/runtime.zip runtime.zip; `
Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/runtime.zip C:\runtime.zip; `
`
Write-Host INFO: Downloading compiler 3 of 3...; `
Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/binutils.zip binutils.zip; `
Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/binutils.zip C:\binutils.zip; `
`
Write-Host INFO: Installing git...; `
$installPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'; `
$installItem = 'Git_is1'; `
New-Item -Path $installPath -Name $installItem -Force; `
$installKey = $installPath+'\'+$installItem; `
New-ItemProperty $installKey -Name 'Inno Setup CodeFile: Path Option' -Value 'CmdTools' -PropertyType 'String' -Force; `
New-ItemProperty $installKey -Name 'Inno Setup CodeFile: Bash Terminal Option' -Value 'ConHost' -PropertyType 'String' -Force; `
New-ItemProperty $installKey -Name 'Inno Setup CodeFile: CRLF Option' -Value 'CRLFCommitAsIs' -PropertyType 'String' -Force; `
Start-Process gitsetup.exe -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS /DIR=C:\git\' -Wait; `
Write-Host INFO: Installing PS7Zip package...; `
Install-Package PS7Zip -Force | Out-Null; `
Write-Host INFO: Importing PS7Zip...; `
Import-Module PS7Zip -Force; `
New-Item C:\git -ItemType Directory | Out-Null ; `
cd C:\git; `
Write-Host INFO: Extracting git...; `
Expand-7Zip C:\gitsetup.7z.exe | Out-Null; `
cd C:\; `
`
Write-Host INFO: Expanding go...; `
Expand-Archive C:\go.zip -DestinationPath C:\; `
`
Write-Host INFO: Expanding compiler...; `
Write-Host INFO: Expanding compiler 1 of 3...; `
Expand-Archive C:\gcc.zip -DestinationPath C:\gcc -Force; `
Write-Host INFO: Expanding compiler 2 of 3...; `
Expand-Archive C:\runtime.zip -DestinationPath C:\gcc -Force; `
Write-Host INFO: Expanding compiler 3 of 3...; `
Expand-Archive C:\binutils.zip -DestinationPath C:\gcc -Force; `
`
Write-Host INFO: Removing downloaded files...; `
Remove-Item C:\gcc.zip; `
Remove-Item C:\runtime.zip; `
Remove-Item C:\binutils.zip; `
Remove-Item C:\gitsetup.7z.exe; `
`
Write-Host INFO: Creating source directory...; `
New-Item -ItemType Directory -Path C:\go\src\github.com\docker\docker | Out-Null; `
`
Write-Host INFO: Configuring git core.autocrlf...; `
C:\git\bin\git config --global core.autocrlf true; `
`
Write-Host INFO: Completed
# Prepare for building
COPY . C:\go\src\github.com\docker\docker
# Make PowerShell the default entrypoint
ENTRYPOINT ["powershell.exe"]
# Set the working directory to the location of the sources
WORKDIR C:\go\src\github.com\docker\docker
# Copy the sources into the container
COPY . .

View file

@ -117,6 +117,9 @@ run: build ## run the docker daemon in a container
shell: build ## start a shell inside the build env
$(DOCKER_RUN_DOCKER) bash
yaml-docs-gen: build ## generate documentation YAML files consumed by docs repo
$(DOCKER_RUN_DOCKER) sh -c 'hack/make.sh yaml-docs-generator && ( root=$$(pwd); cd bundles/latest/yaml-docs-generator; mkdir docs; ./yaml-docs-generator --root $${root} --target $$(pwd)/docs )'
test: build ## run the unit, integration and docker-py tests
$(DOCKER_RUN_DOCKER) hack/make.sh dynbinary cross test-unit test-integration-cli test-docker-py
@ -144,4 +147,4 @@ swagger-gen:
-w /go/src/github.com/docker/docker \
--entrypoint hack/generate-swagger-api.sh \
-e GOPATH=/go \
quay.io/goswagger/swagger
quay.io/goswagger/swagger:0.7.4

View file

@ -1 +1 @@
1.13.0-dev
17.03.2-ce

View file

@ -1,5 +1,42 @@
This directory contains code pertaining to the Docker API:
# Working on the Engine API
- Used by the docker client when communicating with the docker daemon
The Engine API is an HTTP API used by the command-line client to communicate with the daemon. It can also be used by third-party software to control the daemon.
- Used by third party tools wishing to interface with the docker daemon
It consists of various components in this repository:
- `api/swagger.yaml` A Swagger definition of the API.
- `api/types/` Types shared by both the client and server, representing various objects, options, responses, etc. Most are written manually, but some are automatically generated from the Swagger definition. See [#27919](https://github.com/docker/docker/issues/27919) for progress on this.
- `cli/` The command-line client.
- `client/` The Go client used by the command-line client. It can also be used by third-party Go programs.
- `daemon/` The daemon, which serves the API.
## Swagger definition
The API is defined by the [Swagger](http://swagger.io/specification/) definition in `api/swagger.yaml`. This definition can be used to:
1. To automatically generate documentation.
2. To automatically generate the Go server and client. (A work-in-progress.)
3. Provide a machine readable version of the API for introspecting what it can do, automatically generating clients for other languages, etc.
## Updating the API documentation
The API documentation is generated entirely from `api/swagger.yaml`. If you make updates to the API, you'll need to edit this file to represent the change in the documentation.
The file is split into two main sections:
- `definitions`, which defines re-usable objects used in requests and responses
- `paths`, which defines the API endpoints (and some inline objects which don't need to be reusable)
To make an edit, first look for the endpoint you want to edit under `paths`, then make the required edits. Endpoints may reference reusable objects with `$ref`, which can be found in the `definitions` section.
There is hopefully enough example material in the file for you to copy a similar pattern from elsewhere in the file (e.g. adding new fields or endpoints), but for the full reference, see the [Swagger specification](https://github.com/docker/docker/issues/27919)
`swagger.yaml` is validated by `hack/validate/swagger` to ensure it is a valid Swagger definition. This is useful for when you are making edits to ensure you are doing the right thing.
## Viewing the API documentation
When you make edits to `swagger.yaml`, you may want to check the generated API documentation to ensure it renders correctly.
All the documentation generation is done in the documentation repository, [docker/docker.github.io](https://github.com/docker/docker.github.io). The Swagger definition is vendored periodically into this repository, but you can manually copy over the Swagger definition to test changes.
Copy `api/swagger.yaml` in this repository to `engine/api/[VERSION_NUMBER]/swagger.yaml` in the documentation repository, overwriting what is already there. Then, run `docker-compose up` in the documentation repository and browse to [http://localhost:4000/engine/api/](http://localhost:4000/engine/api/) when it finishes rendering.

View file

@ -21,7 +21,7 @@ import (
// Common constants for daemon and client.
const (
// DefaultVersion of Current REST API
DefaultVersion string = "1.25"
DefaultVersion string = "1.27"
// NoBaseImageSpecifier is the symbol used by the FROM
// command to specify that no base image is to be used.

View file

@ -28,7 +28,7 @@ type inputValidationError interface {
IsValidationError() bool
}
// GetHTTPErrorStatusCode retrieve status code from error message
// GetHTTPErrorStatusCode retrieves status code from error message
func GetHTTPErrorStatusCode(err error) int {
if err == nil {
logrus.WithFields(logrus.Fields{"error": err}).Error("unexpected HTTP error handling")
@ -49,20 +49,25 @@ func GetHTTPErrorStatusCode(err error) int {
// If we need to differentiate between different possible error types,
// we should create appropriate error types that implement the httpStatusError interface.
errStr := strings.ToLower(errMsg)
for keyword, status := range map[string]int{
"not found": http.StatusNotFound,
"no such": http.StatusNotFound,
"bad parameter": http.StatusBadRequest,
"no command": http.StatusBadRequest,
"conflict": http.StatusConflict,
"impossible": http.StatusNotAcceptable,
"wrong login/password": http.StatusUnauthorized,
"unauthorized": http.StatusUnauthorized,
"hasn't been activated": http.StatusForbidden,
"this node": http.StatusNotAcceptable,
for _, status := range []struct {
keyword string
code int
}{
{"not found", http.StatusNotFound},
{"no such", http.StatusNotFound},
{"bad parameter", http.StatusBadRequest},
{"no command", http.StatusBadRequest},
{"conflict", http.StatusConflict},
{"impossible", http.StatusNotAcceptable},
{"wrong login/password", http.StatusUnauthorized},
{"unauthorized", http.StatusUnauthorized},
{"hasn't been activated", http.StatusForbidden},
{"this node", http.StatusServiceUnavailable},
{"needs to be unlocked", http.StatusServiceUnavailable},
{"certificates have expired", http.StatusServiceUnavailable},
} {
if strings.Contains(errStr, keyword) {
statusCode = status
if strings.Contains(errStr, status.keyword) {
statusCode = status.code
break
}
}

View file

@ -84,14 +84,28 @@ func newImageBuildOptions(ctx context.Context, r *http.Request) (*types.ImageBui
options.Ulimits = buildUlimits
}
var buildArgs = map[string]string{}
var buildArgs = map[string]*string{}
buildArgsJSON := r.FormValue("buildargs")
// Note that there are two ways a --build-arg might appear in the
// json of the query param:
// "foo":"bar"
// and "foo":nil
// The first is the normal case, ie. --build-arg foo=bar
// or --build-arg foo
// where foo's value was picked up from an env var.
// The second ("foo":nil) is where they put --build-arg foo
// but "foo" isn't set as an env var. In that case we can't just drop
// the fact they mentioned it, we need to pass that along to the builder
// so that it can print a warning about "foo" being unused if there is
// no "ARG foo" in the Dockerfile.
if buildArgsJSON != "" {
if err := json.Unmarshal([]byte(buildArgsJSON), &buildArgs); err != nil {
return nil, err
}
options.BuildArgs = buildArgs
}
var labels = map[string]string{}
labelsJSON := r.FormValue("labels")
if labelsJSON != "" {

View file

@ -29,8 +29,8 @@ func (r *checkpointRouter) Routes() []router.Route {
func (r *checkpointRouter) initRoutes() {
r.routes = []router.Route{
router.NewGetRoute("/containers/{name:.*}/checkpoints", r.getContainerCheckpoints),
router.NewPostRoute("/containers/{name:.*}/checkpoints", r.postContainerCheckpoint),
router.NewDeleteRoute("/containers/{name}/checkpoints/{checkpoint}", r.deleteContainerCheckpoint),
router.Experimental(router.NewGetRoute("/containers/{name:.*}/checkpoints", r.getContainerCheckpoints)),
router.Experimental(router.NewPostRoute("/containers/{name:.*}/checkpoints", r.postContainerCheckpoint)),
router.Experimental(router.NewDeleteRoute("/containers/{name}/checkpoints/{checkpoint}", r.deleteContainerCheckpoint)),
}
}

View file

@ -9,6 +9,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/pkg/archive"
)
@ -32,17 +33,17 @@ type copyBackend interface {
// stateBackend includes functions to implement to provide container state lifecycle functionality.
type stateBackend interface {
ContainerCreate(config types.ContainerCreateConfig, validateHostname bool) (container.ContainerCreateCreatedBody, error)
ContainerCreate(config types.ContainerCreateConfig) (container.ContainerCreateCreatedBody, error)
ContainerKill(name string, sig uint64) error
ContainerPause(name string) error
ContainerRename(oldName, newName string) error
ContainerResize(name string, height, width int) error
ContainerRestart(name string, seconds *int) error
ContainerRm(name string, config *types.ContainerRmConfig) error
ContainerStart(name string, hostConfig *container.HostConfig, validateHostname bool, checkpoint string, checkpointDir string) error
ContainerStart(name string, hostConfig *container.HostConfig, checkpoint string, checkpointDir string) error
ContainerStop(name string, seconds *int) error
ContainerUnpause(name string) error
ContainerUpdate(name string, hostConfig *container.HostConfig, validateHostname bool) (container.ContainerUpdateOKBody, error)
ContainerUpdate(name string, hostConfig *container.HostConfig) (container.ContainerUpdateOKBody, error)
ContainerWait(name string, timeout time.Duration) (int, error)
}
@ -64,7 +65,7 @@ type attachBackend interface {
// systemBackend includes functions to implement to provide system wide containers functionality
type systemBackend interface {
ContainersPrune(config *types.ContainersPruneConfig) (*types.ContainersPruneReport, error)
ContainersPrune(pruneFilters filters.Args) (*types.ContainersPruneReport, error)
}
// Backend is all the methods that need to be implemented to provide container specific functionality.

View file

@ -156,8 +156,7 @@ func (s *containerRouter) postContainersStart(ctx context.Context, w http.Respon
checkpoint := r.Form.Get("checkpoint")
checkpointDir := r.Form.Get("checkpoint-dir")
validateHostname := versions.GreaterThanOrEqualTo(version, "1.24")
if err := s.backend.ContainerStart(vars["name"], hostConfig, validateHostname, checkpoint, checkpointDir); err != nil {
if err := s.backend.ContainerStart(vars["name"], hostConfig, checkpoint, checkpointDir); err != nil {
return err
}
@ -332,7 +331,6 @@ func (s *containerRouter) postContainerUpdate(ctx context.Context, w http.Respon
return err
}
version := httputils.VersionFromContext(ctx)
var updateConfig container.UpdateConfig
decoder := json.NewDecoder(r.Body)
@ -346,8 +344,7 @@ func (s *containerRouter) postContainerUpdate(ctx context.Context, w http.Respon
}
name := vars["name"]
validateHostname := versions.GreaterThanOrEqualTo(version, "1.24")
resp, err := s.backend.ContainerUpdate(name, hostConfig, validateHostname)
resp, err := s.backend.ContainerUpdate(name, hostConfig)
if err != nil {
return err
}
@ -372,14 +369,18 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo
version := httputils.VersionFromContext(ctx)
adjustCPUShares := versions.LessThan(version, "1.19")
validateHostname := versions.GreaterThanOrEqualTo(version, "1.24")
// When using API 1.24 and under, the client is responsible for removing the container
if hostConfig != nil && versions.LessThan(version, "1.25") {
hostConfig.AutoRemove = false
}
ccr, err := s.backend.ContainerCreate(types.ContainerCreateConfig{
Name: name,
Config: config,
HostConfig: hostConfig,
NetworkingConfig: networkingConfig,
AdjustCPUShares: adjustCPUShares,
}, validateHostname)
})
if err != nil {
return err
}
@ -545,16 +546,12 @@ func (s *containerRouter) postContainersPrune(ctx context.Context, w http.Respon
return err
}
if err := httputils.CheckForJSON(r); err != nil {
pruneFilters, err := filters.FromParam(r.Form.Get("filters"))
if err != nil {
return err
}
var cfg types.ContainersPruneConfig
if err := json.NewDecoder(r.Body).Decode(&cfg); err != nil {
return err
}
pruneReport, err := s.backend.ContainersPrune(&cfg)
pruneReport, err := s.backend.ContainersPrune(pruneFilters)
if err != nil {
return err
}

View file

@ -92,11 +92,17 @@ func (s *containerRouter) postContainerExecStart(ctx context.Context, w http.Res
defer httputils.CloseStreams(inStream, outStream)
if _, ok := r.Header["Upgrade"]; ok {
fmt.Fprintf(outStream, "HTTP/1.1 101 UPGRADED\r\nContent-Type: application/vnd.docker.raw-stream\r\nConnection: Upgrade\r\nUpgrade: tcp\r\n\r\n")
fmt.Fprint(outStream, "HTTP/1.1 101 UPGRADED\r\nContent-Type: application/vnd.docker.raw-stream\r\nConnection: Upgrade\r\nUpgrade: tcp\r\n")
} else {
fmt.Fprintf(outStream, "HTTP/1.1 200 OK\r\nContent-Type: application/vnd.docker.raw-stream\r\n\r\n")
fmt.Fprint(outStream, "HTTP/1.1 200 OK\r\nContent-Type: application/vnd.docker.raw-stream\r\n")
}
// copy headers that were removed as part of hijack
if err := w.Header().WriteSubset(outStream, nil); err != nil {
return err
}
fmt.Fprint(outStream, "\r\n")
stdin = inStream
stdout = outStream
if !execStartCheck.Tty {

View file

@ -0,0 +1,67 @@
package router
import (
"errors"
"net/http"
"golang.org/x/net/context"
apierrors "github.com/docker/docker/api/errors"
"github.com/docker/docker/api/server/httputils"
)
var (
errExperimentalFeature = errors.New("This experimental feature is disabled by default. Start the Docker daemon with --experimental in order to enable it.")
)
// ExperimentalRoute defines an experimental API route that can be enabled or disabled.
type ExperimentalRoute interface {
Route
Enable()
Disable()
}
// experimentalRoute defines an experimental API route that can be enabled or disabled.
// It implements ExperimentalRoute
type experimentalRoute struct {
local Route
handler httputils.APIFunc
}
// Enable enables this experimental route
func (r *experimentalRoute) Enable() {
r.handler = r.local.Handler()
}
// Disable disables the experimental route
func (r *experimentalRoute) Disable() {
r.handler = experimentalHandler
}
func experimentalHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
return apierrors.NewErrorWithStatusCode(errExperimentalFeature, http.StatusNotImplemented)
}
// Handler returns returns the APIFunc to let the server wrap it in middlewares.
func (r *experimentalRoute) Handler() httputils.APIFunc {
return r.handler
}
// Method returns the http method that the route responds to.
func (r *experimentalRoute) Method() string {
return r.local.Method()
}
// Path returns the subpath where the route responds to.
func (r *experimentalRoute) Path() string {
return r.local.Path()
}
// Experimental will mark a route as experimental.
func Experimental(r Route) Route {
return &experimentalRoute{
local: r,
handler: experimentalHandler,
}
}

View file

@ -29,7 +29,7 @@ type imageBackend interface {
Images(imageFilters filters.Args, all bool, withExtraAttrs bool) ([]*types.ImageSummary, error)
LookupImage(name string) (*types.ImageInspect, error)
TagImage(imageName, repository, tag string) error
ImagesPrune(config *types.ImagesPruneConfig) (*types.ImagesPruneReport, error)
ImagesPrune(pruneFilters filters.Args) (*types.ImagesPruneReport, error)
}
type importExportBackend interface {

View file

@ -331,16 +331,12 @@ func (s *imageRouter) postImagesPrune(ctx context.Context, w http.ResponseWriter
return err
}
if err := httputils.CheckForJSON(r); err != nil {
pruneFilters, err := filters.FromParam(r.Form.Get("filters"))
if err != nil {
return err
}
var cfg types.ImagesPruneConfig
if err := json.NewDecoder(r.Body).Decode(&cfg); err != nil {
return err
}
pruneReport, err := s.backend.ImagesPrune(&cfg)
pruneReport, err := s.backend.ImagesPrune(pruneFilters)
if err != nil {
return err
}

View file

@ -2,6 +2,7 @@ package network
import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network"
"github.com/docker/libnetwork"
)
@ -17,5 +18,5 @@ type Backend interface {
ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error
DisconnectContainerFromNetwork(containerName string, networkName string, force bool) error
DeleteNetwork(name string) error
NetworksPrune(config *types.NetworksPruneConfig) (*types.NetworksPruneReport, error)
NetworksPrune(pruneFilters filters.Args) (*types.NetworksPruneReport, error)
}

View file

@ -80,7 +80,7 @@ func (n *networkRouter) postNetworkCreate(ctx context.Context, w http.ResponseWr
return err
}
if _, err := n.clusterProvider.GetNetwork(create.Name); err == nil {
if nws, err := n.clusterProvider.GetNetworksByName(create.Name); err == nil && len(nws) > 0 {
return libnetwork.NetworkNameError(create.Name)
}
@ -163,7 +163,7 @@ func (n *networkRouter) buildNetworkResource(nw libnetwork.Network) *types.Netwo
r.Created = info.Created()
r.Scope = info.Scope()
if n.clusterProvider.IsManager() {
if _, err := n.clusterProvider.GetNetwork(nw.Name()); err == nil {
if _, err := n.clusterProvider.GetNetwork(nw.ID()); err == nil {
r.Scope = "swarm"
}
} else if info.Dynamic() {
@ -172,10 +172,10 @@ func (n *networkRouter) buildNetworkResource(nw libnetwork.Network) *types.Netwo
r.Driver = nw.Type()
r.EnableIPv6 = info.IPv6Enabled()
r.Internal = info.Internal()
r.Attachable = info.Attachable()
r.Options = info.DriverOptions()
r.Containers = make(map[string]types.EndpointResource)
buildIpamResources(r, info)
r.Internal = info.Internal()
r.Labels = info.Labels()
peers := info.Peers()
@ -259,6 +259,9 @@ func buildIpamResources(r *types.NetworkResource, nwInfo libnetwork.NetworkInfo)
if !hasIpv6Conf {
for _, ip6Info := range ipv6Info {
if ip6Info.IPAMData.Pool == nil {
continue
}
iData := network.IPAMConfig{}
iData.Subnet = ip6Info.IPAMData.Pool.String()
iData.Gateway = ip6Info.IPAMData.Gateway.String()
@ -297,16 +300,7 @@ func (n *networkRouter) postNetworksPrune(ctx context.Context, w http.ResponseWr
return err
}
if err := httputils.CheckForJSON(r); err != nil {
return err
}
var cfg types.NetworksPruneConfig
if err := json.NewDecoder(r.Body).Decode(&cfg); err != nil {
return err
}
pruneReport, err := n.backend.NetworksPrune(&cfg)
pruneReport, err := n.backend.NetworksPrune(filters.Args{})
if err != nil {
return err
}

View file

@ -5,18 +5,21 @@ import (
"net/http"
enginetypes "github.com/docker/docker/api/types"
"github.com/docker/docker/reference"
"golang.org/x/net/context"
)
// Backend for Plugin
type Backend interface {
Disable(name string) error
Enable(name string) error
Disable(name string, config *enginetypes.PluginDisableConfig) error
Enable(name string, config *enginetypes.PluginEnableConfig) error
List() ([]enginetypes.Plugin, error)
Inspect(name string) (enginetypes.Plugin, error)
Inspect(name string) (*enginetypes.Plugin, error)
Remove(name string, config *enginetypes.PluginRmConfig) error
Set(name string, args []string) error
Pull(name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig) (enginetypes.PluginPrivileges, error)
Push(name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig) error
CreateFromContext(ctx context.Context, tarCtx io.Reader, options *enginetypes.PluginCreateOptions) error
Privileges(ctx context.Context, ref reference.Named, metaHeaders http.Header, authConfig *enginetypes.AuthConfig) (enginetypes.PluginPrivileges, error)
Pull(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer) error
Push(ctx context.Context, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, outStream io.Writer) error
Upgrade(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer) error
CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *enginetypes.PluginCreateOptions) error
}

View file

@ -25,12 +25,14 @@ func (r *pluginRouter) Routes() []router.Route {
func (r *pluginRouter) initRoutes() {
r.routes = []router.Route{
router.NewGetRoute("/plugins", r.listPlugins),
router.NewGetRoute("/plugins/{name:.*}", r.inspectPlugin),
router.NewGetRoute("/plugins/{name:.*}/json", r.inspectPlugin),
router.NewGetRoute("/plugins/privileges", r.getPrivileges),
router.NewDeleteRoute("/plugins/{name:.*}", r.removePlugin),
router.NewPostRoute("/plugins/{name:.*}/enable", r.enablePlugin), // PATCH?
router.NewPostRoute("/plugins/{name:.*}/disable", r.disablePlugin),
router.NewPostRoute("/plugins/pull", r.pullPlugin),
router.NewPostRoute("/plugins/{name:.*}/push", r.pushPlugin),
router.Cancellable(router.NewPostRoute("/plugins/pull", r.pullPlugin)),
router.Cancellable(router.NewPostRoute("/plugins/{name:.*}/push", r.pushPlugin)),
router.Cancellable(router.NewPostRoute("/plugins/{name:.*}/upgrade", r.upgradePlugin)),
router.NewPostRoute("/plugins/{name:.*}/set", r.setPlugin),
router.NewPostRoute("/plugins/create", r.createPlugin),
}

View file

@ -4,27 +4,30 @@ import (
"encoding/base64"
"encoding/json"
"net/http"
"strconv"
"strings"
distreference "github.com/docker/distribution/reference"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/streamformatter"
"github.com/docker/docker/reference"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func (pr *pluginRouter) pullPlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := httputils.ParseForm(r); err != nil {
return err
}
func parseHeaders(headers http.Header) (map[string][]string, *types.AuthConfig) {
metaHeaders := map[string][]string{}
for k, v := range r.Header {
for k, v := range headers {
if strings.HasPrefix(k, "X-Meta-") {
metaHeaders[k] = v
}
}
// Get X-Registry-Auth
authEncoded := r.Header.Get("X-Registry-Auth")
authEncoded := headers.Get("X-Registry-Auth")
authConfig := &types.AuthConfig{}
if authEncoded != "" {
authJSON := base64.NewDecoder(base64.URLEncoding, strings.NewReader(authEncoded))
@ -33,13 +36,180 @@ func (pr *pluginRouter) pullPlugin(ctx context.Context, w http.ResponseWriter, r
}
}
privileges, err := pr.backend.Pull(r.FormValue("name"), metaHeaders, authConfig)
return metaHeaders, authConfig
}
// parseRemoteRef parses the remote reference into a reference.Named
// returning the tag associated with the reference. In the case the
// given reference string includes both digest and tag, the returned
// reference will have the digest without the tag, but the tag will
// be returned.
func parseRemoteRef(remote string) (reference.Named, string, error) {
// Parse remote reference, supporting remotes with name and tag
// NOTE: Using distribution reference to handle references
// containing both a name and digest
remoteRef, err := distreference.ParseNamed(remote)
if err != nil {
return nil, "", err
}
var tag string
if t, ok := remoteRef.(distreference.Tagged); ok {
tag = t.Tag()
}
// Convert distribution reference to docker reference
// TODO: remove when docker reference changes reconciled upstream
ref, err := reference.WithName(remoteRef.Name())
if err != nil {
return nil, "", err
}
if d, ok := remoteRef.(distreference.Digested); ok {
ref, err = reference.WithDigest(ref, d.Digest())
if err != nil {
return nil, "", err
}
} else if tag != "" {
ref, err = reference.WithTag(ref, tag)
if err != nil {
return nil, "", err
}
} else {
ref = reference.WithDefaultTag(ref)
}
return ref, tag, nil
}
func (pr *pluginRouter) getPrivileges(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := httputils.ParseForm(r); err != nil {
return err
}
metaHeaders, authConfig := parseHeaders(r.Header)
ref, _, err := parseRemoteRef(r.FormValue("remote"))
if err != nil {
return err
}
privileges, err := pr.backend.Privileges(ctx, ref, metaHeaders, authConfig)
if err != nil {
return err
}
return httputils.WriteJSON(w, http.StatusOK, privileges)
}
func (pr *pluginRouter) upgradePlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := httputils.ParseForm(r); err != nil {
return errors.Wrap(err, "failed to parse form")
}
var privileges types.PluginPrivileges
dec := json.NewDecoder(r.Body)
if err := dec.Decode(&privileges); err != nil {
return errors.Wrap(err, "failed to parse privileges")
}
if dec.More() {
return errors.New("invalid privileges")
}
metaHeaders, authConfig := parseHeaders(r.Header)
ref, tag, err := parseRemoteRef(r.FormValue("remote"))
if err != nil {
return err
}
name, err := getName(ref, tag, vars["name"])
if err != nil {
return err
}
w.Header().Set("Docker-Plugin-Name", name)
w.Header().Set("Content-Type", "application/json")
output := ioutils.NewWriteFlusher(w)
if err := pr.backend.Upgrade(ctx, ref, name, metaHeaders, authConfig, privileges, output); err != nil {
if !output.Flushed() {
return err
}
output.Write(streamformatter.NewJSONStreamFormatter().FormatError(err))
}
return nil
}
func (pr *pluginRouter) pullPlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := httputils.ParseForm(r); err != nil {
return errors.Wrap(err, "failed to parse form")
}
var privileges types.PluginPrivileges
dec := json.NewDecoder(r.Body)
if err := dec.Decode(&privileges); err != nil {
return errors.Wrap(err, "failed to parse privileges")
}
if dec.More() {
return errors.New("invalid privileges")
}
metaHeaders, authConfig := parseHeaders(r.Header)
ref, tag, err := parseRemoteRef(r.FormValue("remote"))
if err != nil {
return err
}
name, err := getName(ref, tag, r.FormValue("name"))
if err != nil {
return err
}
w.Header().Set("Docker-Plugin-Name", name)
w.Header().Set("Content-Type", "application/json")
output := ioutils.NewWriteFlusher(w)
if err := pr.backend.Pull(ctx, ref, name, metaHeaders, authConfig, privileges, output); err != nil {
if !output.Flushed() {
return err
}
output.Write(streamformatter.NewJSONStreamFormatter().FormatError(err))
}
return nil
}
func getName(ref reference.Named, tag, name string) (string, error) {
if name == "" {
if _, ok := ref.(reference.Canonical); ok {
trimmed := reference.TrimNamed(ref)
if tag != "" {
nt, err := reference.WithTag(trimmed, tag)
if err != nil {
return "", err
}
name = nt.String()
} else {
name = reference.WithDefaultTag(trimmed).String()
}
} else {
name = ref.String()
}
} else {
localRef, err := reference.ParseNamed(name)
if err != nil {
return "", err
}
if _, ok := localRef.(reference.Canonical); ok {
return "", errors.New("cannot use digest in plugin tag")
}
if distreference.IsNameOnly(localRef) {
// TODO: log change in name to out stream
name = reference.WithDefaultTag(localRef).String()
}
}
return name, nil
}
func (pr *pluginRouter) createPlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := httputils.ParseForm(r); err != nil {
return err
@ -51,16 +221,37 @@ func (pr *pluginRouter) createPlugin(ctx context.Context, w http.ResponseWriter,
if err := pr.backend.CreateFromContext(ctx, r.Body, options); err != nil {
return err
}
//TODO: send progress bar
w.WriteHeader(http.StatusNoContent)
return nil
}
func (pr *pluginRouter) enablePlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
return pr.backend.Enable(vars["name"])
if err := httputils.ParseForm(r); err != nil {
return err
}
name := vars["name"]
timeout, err := strconv.Atoi(r.Form.Get("timeout"))
if err != nil {
return err
}
config := &types.PluginEnableConfig{Timeout: timeout}
return pr.backend.Enable(name, config)
}
func (pr *pluginRouter) disablePlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
return pr.backend.Disable(vars["name"])
if err := httputils.ParseForm(r); err != nil {
return err
}
name := vars["name"]
config := &types.PluginDisableConfig{
ForceDisable: httputils.BoolValue(r, "force"),
}
return pr.backend.Disable(name, config)
}
func (pr *pluginRouter) removePlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
@ -77,26 +268,21 @@ func (pr *pluginRouter) removePlugin(ctx context.Context, w http.ResponseWriter,
func (pr *pluginRouter) pushPlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := httputils.ParseForm(r); err != nil {
return err
return errors.Wrap(err, "failed to parse form")
}
metaHeaders := map[string][]string{}
for k, v := range r.Header {
if strings.HasPrefix(k, "X-Meta-") {
metaHeaders[k] = v
}
}
metaHeaders, authConfig := parseHeaders(r.Header)
// Get X-Registry-Auth
authEncoded := r.Header.Get("X-Registry-Auth")
authConfig := &types.AuthConfig{}
if authEncoded != "" {
authJSON := base64.NewDecoder(base64.URLEncoding, strings.NewReader(authEncoded))
if err := json.NewDecoder(authJSON).Decode(authConfig); err != nil {
authConfig = &types.AuthConfig{}
w.Header().Set("Content-Type", "application/json")
output := ioutils.NewWriteFlusher(w)
if err := pr.backend.Push(ctx, vars["name"], metaHeaders, authConfig, output); err != nil {
if !output.Flushed() {
return err
}
output.Write(streamformatter.NewJSONStreamFormatter().FormatError(err))
}
return pr.backend.Push(vars["name"], metaHeaders, authConfig)
return nil
}
func (pr *pluginRouter) setPlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -18,8 +18,8 @@ type Backend interface {
UnlockSwarm(req types.UnlockRequest) error
GetServices(basictypes.ServiceListOptions) ([]types.Service, error)
GetService(string) (types.Service, error)
CreateService(types.ServiceSpec, string) (string, error)
UpdateService(string, uint64, types.ServiceSpec, string, string) error
CreateService(types.ServiceSpec, string) (*basictypes.ServiceCreateResponse, error)
UpdateService(string, uint64, types.ServiceSpec, string, string) (*basictypes.ServiceUpdateResponse, error)
RemoveService(string) error
ServiceLogs(context.Context, string, *backend.ContainerLogsConfig, chan struct{}) error
GetNodes(basictypes.NodeListOptions) ([]types.Node, error)

View file

@ -1,9 +1,6 @@
package swarm
import (
"github.com/docker/docker/api/server/router"
"github.com/docker/docker/daemon"
)
import "github.com/docker/docker/api/server/router"
// swarmRouter is a router to talk with the build controller
type swarmRouter struct {
@ -12,14 +9,11 @@ type swarmRouter struct {
}
// NewRouter initializes a new build router
func NewRouter(d *daemon.Daemon, b Backend) router.Router {
func NewRouter(b Backend) router.Router {
r := &swarmRouter{
backend: b,
}
r.initRoutes()
if d.HasExperimental() {
r.addExperimentalRoutes()
}
return r
}
@ -28,12 +22,6 @@ func (sr *swarmRouter) Routes() []router.Route {
return sr.routes
}
func (sr *swarmRouter) addExperimentalRoutes() {
sr.routes = append(sr.routes,
router.Cancellable(router.NewGetRoute("/services/{id}/logs", sr.getServiceLogs)),
)
}
func (sr *swarmRouter) initRoutes() {
sr.routes = []router.Route{
router.NewPostRoute("/swarm/init", sr.initCluster),
@ -48,6 +36,7 @@ func (sr *swarmRouter) initRoutes() {
router.NewPostRoute("/services/create", sr.createService),
router.NewPostRoute("/services/{id}/update", sr.updateService),
router.NewDeleteRoute("/services/{id}", sr.removeService),
router.Experimental(router.Cancellable(router.NewGetRoute("/services/{id}/logs", sr.getServiceLogs))),
router.NewGetRoute("/nodes", sr.getNodes),
router.NewGetRoute("/nodes/{id}", sr.getNode),
router.NewDeleteRoute("/nodes/{id}", sr.removeNode),
@ -55,7 +44,7 @@ func (sr *swarmRouter) initRoutes() {
router.NewGetRoute("/tasks", sr.getTasks),
router.NewGetRoute("/tasks/{id}", sr.getTask),
router.NewGetRoute("/secrets", sr.getSecrets),
router.NewPostRoute("/secrets", sr.createSecret),
router.NewPostRoute("/secrets/create", sr.createSecret),
router.NewDeleteRoute("/secrets/{id}", sr.removeSecret),
router.NewGetRoute("/secrets/{id}", sr.getSecret),
router.NewPostRoute("/secrets/{id}/update", sr.updateSecret),

View file

@ -65,7 +65,8 @@ func (sr *swarmRouter) updateCluster(ctx context.Context, w http.ResponseWriter,
rawVersion := r.URL.Query().Get("version")
version, err := strconv.ParseUint(rawVersion, 10, 64)
if err != nil {
return fmt.Errorf("Invalid swarm version '%s': %s", rawVersion, err.Error())
err := fmt.Errorf("invalid swarm version '%s': %v", rawVersion, err)
return errors.NewBadRequestError(err)
}
var flags types.UpdateFlags
@ -73,7 +74,8 @@ func (sr *swarmRouter) updateCluster(ctx context.Context, w http.ResponseWriter,
if value := r.URL.Query().Get("rotateWorkerToken"); value != "" {
rot, err := strconv.ParseBool(value)
if err != nil {
return fmt.Errorf("invalid value for rotateWorkerToken: %s", value)
err := fmt.Errorf("invalid value for rotateWorkerToken: %s", value)
return errors.NewBadRequestError(err)
}
flags.RotateWorkerToken = rot
@ -82,7 +84,8 @@ func (sr *swarmRouter) updateCluster(ctx context.Context, w http.ResponseWriter,
if value := r.URL.Query().Get("rotateManagerToken"); value != "" {
rot, err := strconv.ParseBool(value)
if err != nil {
return fmt.Errorf("invalid value for rotateManagerToken: %s", value)
err := fmt.Errorf("invalid value for rotateManagerToken: %s", value)
return errors.NewBadRequestError(err)
}
flags.RotateManagerToken = rot
@ -91,7 +94,7 @@ func (sr *swarmRouter) updateCluster(ctx context.Context, w http.ResponseWriter,
if value := r.URL.Query().Get("rotateManagerUnlockKey"); value != "" {
rot, err := strconv.ParseBool(value)
if err != nil {
return fmt.Errorf("invalid value for rotateManagerUnlockKey: %s", value)
return errors.NewBadRequestError(fmt.Errorf("invalid value for rotateManagerUnlockKey: %s", value))
}
flags.RotateManagerUnlockKey = rot
@ -166,15 +169,13 @@ func (sr *swarmRouter) createService(ctx context.Context, w http.ResponseWriter,
// Get returns "" if the header does not exist
encodedAuth := r.Header.Get("X-Registry-Auth")
id, err := sr.backend.CreateService(service, encodedAuth)
resp, err := sr.backend.CreateService(service, encodedAuth)
if err != nil {
logrus.Errorf("Error creating service %s: %v", service.Name, err)
return err
}
return httputils.WriteJSON(w, http.StatusCreated, &basictypes.ServiceCreateResponse{
ID: id,
})
return httputils.WriteJSON(w, http.StatusCreated, resp)
}
func (sr *swarmRouter) updateService(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
@ -186,7 +187,8 @@ func (sr *swarmRouter) updateService(ctx context.Context, w http.ResponseWriter,
rawVersion := r.URL.Query().Get("version")
version, err := strconv.ParseUint(rawVersion, 10, 64)
if err != nil {
return fmt.Errorf("Invalid service version '%s': %s", rawVersion, err.Error())
err := fmt.Errorf("invalid service version '%s': %v", rawVersion, err)
return errors.NewBadRequestError(err)
}
// Get returns "" if the header does not exist
@ -194,11 +196,12 @@ func (sr *swarmRouter) updateService(ctx context.Context, w http.ResponseWriter,
registryAuthFrom := r.URL.Query().Get("registryAuthFrom")
if err := sr.backend.UpdateService(vars["id"], version, service, encodedAuth, registryAuthFrom); err != nil {
resp, err := sr.backend.UpdateService(vars["id"], version, service, encodedAuth, registryAuthFrom)
if err != nil {
logrus.Errorf("Error updating service %s: %v", vars["id"], err)
return err
}
return nil
return httputils.WriteJSON(w, http.StatusOK, resp)
}
func (sr *swarmRouter) removeService(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
@ -238,10 +241,6 @@ func (sr *swarmRouter) getServiceLogs(ctx context.Context, w http.ResponseWriter
OutStream: w,
}
if !logsConfig.Follow {
return fmt.Errorf("Bad parameters: Only follow mode is currently supported")
}
if logsConfig.Details {
return fmt.Errorf("Bad parameters: details is not currently supported")
}
@ -299,7 +298,8 @@ func (sr *swarmRouter) updateNode(ctx context.Context, w http.ResponseWriter, r
rawVersion := r.URL.Query().Get("version")
version, err := strconv.ParseUint(rawVersion, 10, 64)
if err != nil {
return fmt.Errorf("Invalid node version '%s': %s", rawVersion, err.Error())
err := fmt.Errorf("invalid node version '%s': %v", rawVersion, err)
return errors.NewBadRequestError(err)
}
if err := sr.backend.UpdateNode(vars["id"], version, node); err != nil {
@ -388,6 +388,7 @@ func (sr *swarmRouter) removeSecret(ctx context.Context, w http.ResponseWriter,
if err := sr.backend.RemoveSecret(vars["id"]); err != nil {
return err
}
w.WriteHeader(http.StatusNoContent)
return nil
}

View file

@ -16,7 +16,6 @@ import (
"github.com/docker/docker/api/types/registry"
timetypes "github.com/docker/docker/api/types/time"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/api/types/versions/v1p24"
"github.com/docker/docker/pkg/ioutils"
"golang.org/x/net/context"
)
@ -42,16 +41,24 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht
if versions.LessThan(httputils.VersionFromContext(ctx), "1.25") {
// TODO: handle this conversion in engine-api
oldInfo := &v1p24.Info{
InfoBase: info.InfoBase,
type oldInfo struct {
*types.Info
ExecutionDriver string
}
old := &oldInfo{
Info: info,
ExecutionDriver: "<not supported>",
}
for _, s := range info.SecurityOptions {
if s.Key == "Name" {
oldInfo.SecurityOptions = append(oldInfo.SecurityOptions, s.Value)
}
nameOnlySecurityOptions := []string{}
kvSecOpts, err := types.DecodeSecurityOptions(old.SecurityOptions)
if err != nil {
return err
}
return httputils.WriteJSON(w, http.StatusOK, oldInfo)
for _, s := range kvSecOpts {
nameOnlySecurityOptions = append(nameOnlySecurityOptions, s.Name)
}
old.SecurityOptions = nameOnlySecurityOptions
return httputils.WriteJSON(w, http.StatusOK, old)
}
return httputils.WriteJSON(w, http.StatusOK, info)
}

View file

@ -3,6 +3,7 @@ package volume
import (
// TODO return types need to be refactored into pkg
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
)
// Backend is the methods that need to be implemented to provide
@ -12,5 +13,5 @@ type Backend interface {
VolumeInspect(name string) (*types.Volume, error)
VolumeCreate(name, driverName string, opts, labels map[string]string) (*types.Volume, error)
VolumeRm(name string, force bool) error
VolumesPrune(config *types.VolumesPruneConfig) (*types.VolumesPruneReport, error)
VolumesPrune(pruneFilters filters.Args) (*types.VolumesPruneReport, error)
}

View file

@ -5,7 +5,7 @@ import (
"net/http"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
volumetypes "github.com/docker/docker/api/types/volume"
"golang.org/x/net/context"
)
@ -72,16 +72,7 @@ func (v *volumeRouter) postVolumesPrune(ctx context.Context, w http.ResponseWrit
return err
}
if err := httputils.CheckForJSON(r); err != nil {
return err
}
var cfg types.VolumesPruneConfig
if err := json.NewDecoder(r.Body).Decode(&cfg); err != nil {
return err
}
pruneReport, err := v.backend.VolumesPrune(&cfg)
pruneReport, err := v.backend.VolumesPrune(filters.Args{})
if err != nil {
return err
}

View file

@ -102,7 +102,7 @@ func (s *Server) serveAPI() error {
}
// HTTPServer contains an instance of http server and the listener.
// srv *http.Server, contains configuration to create a http server and a mux router with all api end points.
// srv *http.Server, contains configuration to create an http server and a mux router with all api end points.
// l net.Listener, is a TCP or Socket listener that dispatches incoming request to the router.
type HTTPServer struct {
srv *http.Server
@ -137,7 +137,12 @@ func (s *Server) makeHTTPHandler(handler httputils.APIFunc) http.HandlerFunc {
}
if err := handlerFunc(ctx, w, r, vars); err != nil {
logrus.Errorf("Handler for %s %s returned error: %v", r.Method, r.URL.Path, err)
statusCode := httputils.GetHTTPErrorStatusCode(err)
errFormat := "%v"
if statusCode == http.StatusInternalServerError {
errFormat = "%+v"
}
logrus.Errorf("Handler for %s %s returned error: "+errFormat, r.Method, r.URL.Path, err)
httputils.MakeErrorHandler(err)(w, r)
}
}

File diff suppressed because it is too large Load diff

View file

@ -160,10 +160,13 @@ type ImageBuildOptions struct {
ShmSize int64
Dockerfile string
Ulimits []*units.Ulimit
BuildArgs map[string]string
AuthConfigs map[string]AuthConfig
Context io.Reader
Labels map[string]string
// See the parsing of buildArgs in api/server/router/build/build_routes.go
// for an explaination of why BuildArgs needs to use *string instead of
// just a string
BuildArgs map[string]*string
AuthConfigs map[string]AuthConfig
Context io.Reader
Labels map[string]string
// squash the resulting image's layers to the parent
// preserves the original image and creates a new one from the parent with all
// the changes applied to a single layer
@ -285,10 +288,12 @@ type ServiceCreateOptions struct {
}
// ServiceCreateResponse contains the information returned to a client
// on the creation of a new service.
// on the creation of a new service.
type ServiceCreateResponse struct {
// ID is the ID of the created service.
ID string
// Warnings is a set of non-fatal warning messages to pass on to the user.
Warnings []string `json:",omitempty"`
}
// Values for RegistryAuthFrom in ServiceUpdateOptions
@ -330,11 +335,22 @@ type PluginRemoveOptions struct {
Force bool
}
// PluginEnableOptions holds parameters to enable plugins.
type PluginEnableOptions struct {
Timeout int
}
// PluginDisableOptions holds parameters to disable plugins.
type PluginDisableOptions struct {
Force bool
}
// PluginInstallOptions holds parameters to install a plugin.
type PluginInstallOptions struct {
Disabled bool
AcceptAllPermissions bool
RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
RemoteRef string // RemoteRef is the plugin name on the registry
PrivilegeFunc RequestPrivilegeFunc
AcceptPermissionsFunc func(PluginPrivileges) (bool, error)
Args []string
@ -349,7 +365,7 @@ type SecretRequestOption struct {
Mode os.FileMode
}
// SwarmUnlockKeyResponse contains the response for Remote API:
// SwarmUnlockKeyResponse contains the response for Engine API:
// GET /swarm/unlockkey
type SwarmUnlockKeyResponse struct {
// UnlockKey is the unlock key in ASCII-armored format.

View file

@ -53,9 +53,17 @@ type ExecConfig struct {
Cmd []string // Execution commands and args
}
// PluginRmConfig holds arguments for the plugin remove
// operation. This struct is used to tell the backend what operations
// to perform.
// PluginRmConfig holds arguments for plugin remove.
type PluginRmConfig struct {
ForceRemove bool
}
// PluginEnableConfig holds arguments for plugin enable
type PluginEnableConfig struct {
Timeout int
}
// PluginDisableConfig holds arguments for plugin disable.
type PluginDisableConfig struct {
ForceDisable bool
}

View file

@ -34,29 +34,29 @@ type HealthConfig struct {
// All fields added to this struct must be marked `omitempty` to keep getting
// predictable hashes from the old `v1Compatibility` configuration.
type Config struct {
Hostname string // Hostname
Domainname string // Domainname
User string // User that will run the command(s) inside the container, also support user:group
AttachStdin bool // Attach the standard input, makes possible user interaction
AttachStdout bool // Attach the standard output
AttachStderr bool // Attach the standard error
ExposedPorts map[nat.Port]struct{} `json:",omitempty"` // List of exposed ports
Tty bool // Attach standard streams to a tty, including stdin if it is not closed.
OpenStdin bool // Open stdin
StdinOnce bool // If true, close stdin after the 1 attached client disconnects.
Env []string // List of environment variable to set in the container
Cmd strslice.StrSlice // Command to run when starting the container
Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy
ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (Windows specific)
Image string // Name of the image as it was passed by the operator (e.g. could be symbolic)
Volumes map[string]struct{} // List of volumes (mounts) used for the container
WorkingDir string // Current directory (PWD) in the command will be launched
Entrypoint strslice.StrSlice // Entrypoint to run when starting the container
NetworkDisabled bool `json:",omitempty"` // Is network disabled
MacAddress string `json:",omitempty"` // Mac Address of the container
OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile
Labels map[string]string // List of labels set to this container
StopSignal string `json:",omitempty"` // Signal to stop a container
StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container
Shell strslice.StrSlice `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT
Hostname string // Hostname
Domainname string // Domainname
User string // User that will run the command(s) inside the container, also support user:group
AttachStdin bool // Attach the standard input, makes possible user interaction
AttachStdout bool // Attach the standard output
AttachStderr bool // Attach the standard error
ExposedPorts nat.PortSet `json:",omitempty"` // List of exposed ports
Tty bool // Attach standard streams to a tty, including stdin if it is not closed.
OpenStdin bool // Open stdin
StdinOnce bool // If true, close stdin after the 1 attached client disconnects.
Env []string // List of environment variable to set in the container
Cmd strslice.StrSlice // Command to run when starting the container
Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy
ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (Windows specific)
Image string // Name of the image as it was passed by the operator (e.g. could be symbolic)
Volumes map[string]struct{} // List of volumes (mounts) used for the container
WorkingDir string // Current directory (PWD) in the command will be launched
Entrypoint strslice.StrSlice // Entrypoint to run when starting the container
NetworkDisabled bool `json:",omitempty"` // Is network disabled
MacAddress string `json:",omitempty"` // Mac Address of the container
OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile
Labels map[string]string // List of labels set to this container
StopSignal string `json:",omitempty"` // Signal to stop a container
StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container
Shell strslice.StrSlice `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT
}

View file

@ -1,14 +0,0 @@
package container
import "os"
// ContainerSecret represents a secret in a container. This gets realized
// in the container tmpfs
type ContainerSecret struct {
Name string
Target string
Data []byte
UID string
GID string
Mode os.FileMode
}

View file

@ -144,6 +144,9 @@ func (filters Args) Add(name, value string) {
func (filters Args) Del(name, value string) {
if _, ok := filters.fields[name]; ok {
delete(filters.fields[name], value)
if len(filters.fields[name]) == 0 {
delete(filters.fields, name)
}
}
}

View file

@ -50,6 +50,16 @@ const (
PropagationSlave Propagation = "slave"
)
// Propagations is the list of all valid mount propagations
var Propagations = []Propagation{
PropagationRPrivate,
PropagationPrivate,
PropagationRShared,
PropagationShared,
PropagationRSlave,
PropagationSlave,
}
// BindOptions defines options specific to mounts of type "bind".
type BindOptions struct {
Propagation Propagation `json:",omitempty"`

View file

@ -3,7 +3,7 @@ package types
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// Plugin A plugin for the Remote API
// Plugin A plugin for the Engine API
// swagger:model Plugin
type Plugin struct {
@ -22,13 +22,12 @@ type Plugin struct {
// Required: true
Name string `json:"Name"`
// plugin remote reference used to push/pull the plugin
PluginReference string `json:"PluginReference,omitempty"`
// settings
// Required: true
Settings PluginSettings `json:"Settings"`
// tag
// Required: true
Tag string `json:"Tag"`
}
// PluginConfig The config of a plugin.
@ -39,18 +38,10 @@ type PluginConfig struct {
// Required: true
Args PluginConfigArgs `json:"Args"`
// capabilities
// Required: true
Capabilities []string `json:"Capabilities"`
// description
// Required: true
Description string `json:"Description"`
// devices
// Required: true
Devices []PluginDevice `json:"Devices"`
// documentation
// Required: true
Documentation string `json:"Documentation"`
@ -67,6 +58,10 @@ type PluginConfig struct {
// Required: true
Interface PluginConfigInterface `json:"Interface"`
// linux
// Required: true
Linux PluginConfigLinux `json:"Linux"`
// mounts
// Required: true
Mounts []PluginMount `json:"Mounts"`
@ -75,12 +70,19 @@ type PluginConfig struct {
// Required: true
Network PluginConfigNetwork `json:"Network"`
// propagated mount
// Required: true
PropagatedMount string `json:"PropagatedMount"`
// user
User PluginConfigUser `json:"User,omitempty"`
// workdir
// work dir
// Required: true
Workdir string `json:"Workdir"`
WorkDir string `json:"WorkDir"`
// rootfs
Rootfs *PluginConfigRootfs `json:"rootfs,omitempty"`
}
// PluginConfigArgs plugin config args
@ -117,6 +119,23 @@ type PluginConfigInterface struct {
Types []PluginInterfaceType `json:"Types"`
}
// PluginConfigLinux plugin config linux
// swagger:model PluginConfigLinux
type PluginConfigLinux struct {
// allow all devices
// Required: true
AllowAllDevices bool `json:"AllowAllDevices"`
// capabilities
// Required: true
Capabilities []string `json:"Capabilities"`
// devices
// Required: true
Devices []PluginDevice `json:"Devices"`
}
// PluginConfigNetwork plugin config network
// swagger:model PluginConfigNetwork
type PluginConfigNetwork struct {
@ -126,6 +145,17 @@ type PluginConfigNetwork struct {
Type string `json:"Type"`
}
// PluginConfigRootfs plugin config rootfs
// swagger:model PluginConfigRootfs
type PluginConfigRootfs struct {
// diff ids
DiffIds []string `json:"diff_ids"`
// type
Type string `json:"type,omitempty"`
}
// PluginConfigUser plugin config user
// swagger:model PluginConfigUser
type PluginConfigUser struct {

View file

@ -5,7 +5,7 @@ import (
"fmt"
)
// PluginsListResponse contains the response for the remote API
// PluginsListResponse contains the response for the Engine API
type PluginsListResponse []*Plugin
const (

View file

@ -0,0 +1,12 @@
package types
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// ServiceUpdateResponse service update response
// swagger:model ServiceUpdateResponse
type ServiceUpdateResponse struct {
// Optional warning messages
Warnings []string `json:"Warnings"`
}

View file

@ -47,6 +47,9 @@ type CPUStats struct {
// System Usage. Linux only.
SystemUsage uint64 `json:"system_cpu_usage,omitempty"`
// Online CPUs. Linux only.
OnlineCPUs uint32 `json:"online_cpus,omitempty"`
// Throttling Data. Linux only.
ThrottlingData ThrottlingData `json:"throttling_data,omitempty"`
}

View file

@ -19,3 +19,9 @@ type Annotations struct {
Name string `json:",omitempty"`
Labels map[string]string `json:",omitempty"`
}
// Driver represents a driver (network, logging).
type Driver struct {
Name string `json:",omitempty"`
Options map[string]string `json:",omitempty"`
}

View file

@ -109,9 +109,3 @@ type IPAMConfig struct {
Range string `json:",omitempty"`
Gateway string `json:",omitempty"`
}
// Driver represents a network driver.
type Driver struct {
Name string `json:",omitempty"`
Options map[string]string `json:",omitempty"`
}

View file

@ -6,9 +6,7 @@ import "os"
type Secret struct {
ID string
Meta
Spec SecretSpec
Digest string
SecretSize int64
Spec SecretSpec
}
// SecretSpec represents a secret specification from a secret in swarm
@ -27,7 +25,7 @@ type SecretReferenceFileTarget struct {
// SecretReference is a reference to a secret in swarm
type SecretReference struct {
File *SecretReferenceFileTarget
SecretID string
SecretName string
Target *SecretReferenceFileTarget
}

View file

@ -74,7 +74,7 @@ const (
type UpdateConfig struct {
// Maximum number of tasks to be updated in one iteration.
// 0 means unlimited parallelism.
Parallelism uint64 `json:",omitempty"`
Parallelism uint64
// Amount of time between updates.
Delay time.Duration `json:",omitempty"`

View file

@ -1,8 +1,11 @@
package types
import (
"errors"
"fmt"
"io"
"os"
"strings"
"time"
"github.com/docker/docker/api/types/container"
@ -14,14 +17,14 @@ import (
"github.com/docker/go-connections/nat"
)
// ContainerChange contains response of Remote API:
// ContainerChange contains response of Engine API:
// GET "/containers/{name:.*}/changes"
type ContainerChange struct {
Kind int
Path string
}
// ImageHistory contains response of Remote API:
// ImageHistory contains response of Engine API:
// GET "/images/{name:.*}/history"
type ImageHistory struct {
ID string `json:"Id"`
@ -32,7 +35,7 @@ type ImageHistory struct {
Comment string
}
// ImageDelete contains response of Remote API:
// ImageDelete contains response of Engine API:
// DELETE "/images/{name:.*}"
type ImageDelete struct {
Untagged string `json:",omitempty"`
@ -53,7 +56,7 @@ type RootFS struct {
BaseLayer string `json:",omitempty"`
}
// ImageInspect contains response of Remote API:
// ImageInspect contains response of Engine API:
// GET "/images/{name:.*}/json"
type ImageInspect struct {
ID string `json:"Id"`
@ -76,7 +79,7 @@ type ImageInspect struct {
RootFS RootFS
}
// Container contains response of Remote API:
// Container contains response of Engine API:
// GET "/containers/json"
type Container struct {
ID string `json:"Id"`
@ -98,7 +101,7 @@ type Container struct {
Mounts []MountPoint
}
// CopyConfig contains request body of Remote API:
// CopyConfig contains request body of Engine API:
// POST "/containers/"+containerID+"/copy"
type CopyConfig struct {
Resource string
@ -115,28 +118,28 @@ type ContainerPathStat struct {
LinkTarget string `json:"linkTarget"`
}
// ContainerStats contains response of Remote API:
// ContainerStats contains response of Engine API:
// GET "/stats"
type ContainerStats struct {
Body io.ReadCloser `json:"body"`
OSType string `json:"ostype"`
}
// ContainerProcessList contains response of Remote API:
// ContainerProcessList contains response of Engine API:
// GET "/containers/{name:.*}/top"
type ContainerProcessList struct {
Processes [][]string
Titles []string
}
// Ping contains response of Remote API:
// Ping contains response of Engine API:
// GET "/_ping"
type Ping struct {
APIVersion string
Experimental bool
}
// Version contains response of Remote API:
// Version contains response of Engine API:
// GET "/version"
type Version struct {
Version string
@ -158,9 +161,9 @@ type Commit struct {
Expected string
}
// InfoBase contains the base response of Remote API:
// Info contains response of Engine API:
// GET "/info"
type InfoBase struct {
type Info struct {
ID string
Containers int
ContainersRunning int
@ -219,18 +222,49 @@ type InfoBase struct {
ContainerdCommit Commit
RuncCommit Commit
InitCommit Commit
SecurityOptions []string
}
// SecurityOpt holds key/value pair about a security option
type SecurityOpt struct {
// KeyValue holds a key/value pair
type KeyValue struct {
Key, Value string
}
// Info contains response of Remote API:
// GET "/info"
type Info struct {
*InfoBase
SecurityOptions []SecurityOpt
// SecurityOpt contains the name and options of a security option
type SecurityOpt struct {
Name string
Options []KeyValue
}
// DecodeSecurityOptions decodes a security options string slice to a type safe
// SecurityOpt
func DecodeSecurityOptions(opts []string) ([]SecurityOpt, error) {
so := []SecurityOpt{}
for _, opt := range opts {
// support output from a < 1.13 docker daemon
if !strings.Contains(opt, "=") {
so = append(so, SecurityOpt{Name: opt})
continue
}
secopt := SecurityOpt{}
split := strings.Split(opt, ",")
for _, s := range split {
kv := strings.SplitN(s, "=", 2)
if len(kv) != 2 {
return nil, fmt.Errorf("invalid security option %q", s)
}
if kv[0] == "" || kv[1] == "" {
return nil, errors.New("invalid empty security option")
}
if kv[0] == "name" {
secopt.Name = kv[1]
continue
}
secopt.Options = append(secopt.Options, KeyValue{Key: kv[0], Value: kv[1]})
}
so = append(so, secopt)
}
return so, nil
}
// PluginsInfo is a temp struct holding Plugins name
@ -305,7 +339,7 @@ type ContainerNode struct {
Labels map[string]string
}
// ContainerJSONBase contains response of Remote API:
// ContainerJSONBase contains response of Engine API:
// GET "/containers/{name:.*}/json"
type ContainerJSONBase struct {
ID string `json:"Id"`
@ -466,7 +500,7 @@ type Runtime struct {
Args []string `json:"runtimeArgs,omitempty"`
}
// DiskUsage contains response of Remote API:
// DiskUsage contains response of Engine API:
// GET "/system/df"
type DiskUsage struct {
LayersSize int64
@ -475,49 +509,28 @@ type DiskUsage struct {
Volumes []*Volume
}
// ImagesPruneConfig contains the configuration for Remote API:
// POST "/images/prune"
type ImagesPruneConfig struct {
DanglingOnly bool
}
// ContainersPruneConfig contains the configuration for Remote API:
// POST "/images/prune"
type ContainersPruneConfig struct {
}
// VolumesPruneConfig contains the configuration for Remote API:
// POST "/images/prune"
type VolumesPruneConfig struct {
}
// NetworksPruneConfig contains the configuration for Remote API:
// POST "/networks/prune"
type NetworksPruneConfig struct {
}
// ContainersPruneReport contains the response for Remote API:
// ContainersPruneReport contains the response for Engine API:
// POST "/containers/prune"
type ContainersPruneReport struct {
ContainersDeleted []string
SpaceReclaimed uint64
}
// VolumesPruneReport contains the response for Remote API:
// VolumesPruneReport contains the response for Engine API:
// POST "/volumes/prune"
type VolumesPruneReport struct {
VolumesDeleted []string
SpaceReclaimed uint64
}
// ImagesPruneReport contains the response for Remote API:
// ImagesPruneReport contains the response for Engine API:
// POST "/images/prune"
type ImagesPruneReport struct {
ImagesDeleted []ImageDelete
SpaceReclaimed uint64
}
// NetworksPruneReport contains the response for Remote API:
// NetworksPruneReport contains the response for Engine API:
// POST "/networks/prune"
type NetworksPruneReport struct {
NetworksDeleted []string

View file

@ -1,10 +0,0 @@
// Package v1p24 provides specific API types for the API version 1, patch 24.
package v1p24
import "github.com/docker/docker/api/types"
type Info struct {
*types.InfoBase
ExecutionDriver string
SecurityOptions []string
}

View file

@ -11,7 +11,7 @@ type Volume struct {
// Required: true
Driver string `json:"Driver"`
// A mapping of abitrary key/value data set on this volume.
// User-defined key/value metadata.
// Required: true
Labels map[string]string `json:"Labels"`

View file

@ -19,7 +19,7 @@ type VolumesCreateBody struct {
// Required: true
DriverOpts map[string]string `json:"DriverOpts"`
// A mapping of arbitrary key/value data to set on the volume.
// User-defined key/value metadata.
// Required: true
Labels map[string]string `json:"Labels"`

View file

@ -116,7 +116,7 @@ type Backend interface {
// ContainerAttachRaw attaches to container.
ContainerAttachRaw(cID string, stdin io.ReadCloser, stdout, stderr io.Writer, stream bool) error
// ContainerCreate creates a new Docker container and returns potential warnings
ContainerCreate(config types.ContainerCreateConfig, validateHostname bool) (container.ContainerCreateCreatedBody, error)
ContainerCreate(config types.ContainerCreateConfig) (container.ContainerCreateCreatedBody, error)
// ContainerRm removes a container specified by `id`.
ContainerRm(name string, config *types.ContainerRmConfig) error
// Commit creates a new Docker image from an existing Docker container.
@ -124,11 +124,13 @@ type Backend interface {
// ContainerKill stops the container execution abruptly.
ContainerKill(containerID string, sig uint64) error
// ContainerStart starts a new container
ContainerStart(containerID string, hostConfig *container.HostConfig, validateHostname bool, checkpoint string, checkpointDir string) error
ContainerStart(containerID string, hostConfig *container.HostConfig, checkpoint string, checkpointDir string) error
// ContainerWait stops processing until the given container is stopped.
ContainerWait(containerID string, timeout time.Duration) (int, error)
// ContainerUpdateCmdOnBuild updates container.Path and container.Args
ContainerUpdateCmdOnBuild(containerID string, cmd []string) error
// ContainerCreateWorkdir creates the workdir (currently only used on Windows)
ContainerCreateWorkdir(containerID string) error
// ContainerCopy copies/extracts a source FileInfo to a destination path inside a container
// specified by a container object.

View file

@ -125,7 +125,7 @@ func NewBuilder(clientCtx context.Context, config *types.ImageBuildOptions, back
config = new(types.ImageBuildOptions)
}
if config.BuildArgs == nil {
config.BuildArgs = make(map[string]string)
config.BuildArgs = make(map[string]*string)
}
ctx, cancel := context.WithCancel(clientCtx)
b = &Builder{

View file

@ -18,6 +18,7 @@ import (
"github.com/Sirupsen/logrus"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/strslice"
"github.com/docker/docker/builder"
@ -70,14 +71,20 @@ func env(b *Builder, args []string, attributes map[string]bool, original string)
if len(args[j]) == 0 {
return errBlankCommandNames("ENV")
}
newVar := args[j] + "=" + args[j+1] + ""
commitStr += " " + newVar
gotOne := false
for i, envVar := range b.runConfig.Env {
envParts := strings.SplitN(envVar, "=", 2)
if envParts[0] == args[j] {
compareFrom := envParts[0]
compareTo := args[j]
if runtime.GOOS == "windows" {
// Case insensitive environment variables on Windows
compareFrom = strings.ToUpper(compareFrom)
compareTo = strings.ToUpper(compareTo)
}
if compareFrom == compareTo {
b.runConfig.Env[i] = newVar
gotOne = true
break
@ -279,12 +286,39 @@ func workdir(b *Builder, args []string, attributes map[string]bool, original str
return err
}
// NOTE: You won't find the "mkdir" for the directory in here. Rather we
// just set the value in the image's runConfig.WorkingDir property
// and container.SetupWorkingDirectory() will create it automatically
// for us the next time the image is used to create a container.
// For performance reasons, we explicitly do a create/mkdir now
// This avoids having an unnecessary expensive mount/unmount calls
// (on Windows in particular) during each container create.
// Prior to 1.13, the mkdir was deferred and not executed at this step.
if b.disableCommit {
// Don't call back into the daemon if we're going through docker commit --change "WORKDIR /foo".
// We've already updated the runConfig and that's enough.
return nil
}
b.runConfig.Image = b.image
return b.commit("", b.runConfig.Cmd, fmt.Sprintf("WORKDIR %v", b.runConfig.WorkingDir))
cmd := b.runConfig.Cmd
comment := "WORKDIR " + b.runConfig.WorkingDir
// reset the command for cache detection
b.runConfig.Cmd = strslice.StrSlice(append(getShell(b.runConfig), "#(nop) "+comment))
defer func(cmd strslice.StrSlice) { b.runConfig.Cmd = cmd }(cmd)
if hit, err := b.probeCache(); err != nil {
return err
} else if hit {
return nil
}
container, err := b.docker.ContainerCreate(types.ContainerCreateConfig{Config: b.runConfig})
if err != nil {
return err
}
b.tmpContainers[container.ID] = struct{}{}
if err := b.docker.ContainerCreateWorkdir(container.ID); err != nil {
return err
}
return b.commit(container.ID, cmd, comment)
}
// RUN some command yo
@ -352,8 +386,8 @@ func run(b *Builder, args []string, attributes map[string]bool, original string)
// the entire file (see 'leftoverArgs' processing in evaluator.go )
continue
}
if _, ok := configEnv[key]; !ok {
cmdBuildEnv = append(cmdBuildEnv, fmt.Sprintf("%s=%s", key, val))
if _, ok := configEnv[key]; !ok && val != nil {
cmdBuildEnv = append(cmdBuildEnv, fmt.Sprintf("%s=%s", key, *val))
}
}
@ -696,7 +730,7 @@ func arg(b *Builder, args []string, attributes map[string]bool, original string)
var (
name string
value string
newValue string
hasDefault bool
)
@ -713,7 +747,7 @@ func arg(b *Builder, args []string, attributes map[string]bool, original string)
}
name = parts[0]
value = parts[1]
newValue = parts[1]
hasDefault = true
} else {
name = arg
@ -724,9 +758,12 @@ func arg(b *Builder, args []string, attributes map[string]bool, original string)
// If there is a default value associated with this arg then add it to the
// b.buildArgs if one is not already passed to the builder. The args passed
// to builder override the default value of 'arg'.
if _, ok := b.options.BuildArgs[name]; !ok && hasDefault {
b.options.BuildArgs[name] = value
// to builder override the default value of 'arg'. Note that a 'nil' for
// a value means that the user specified "--build-arg FOO" and "FOO" wasn't
// defined as an env var - and in that case we DO want to use the default
// value specified in the ARG cmd.
if baValue, ok := b.options.BuildArgs[name]; (!ok || baValue == nil) && hasDefault {
b.options.BuildArgs[name] = &newValue
}
return b.commit("", b.runConfig.Cmd, fmt.Sprintf("ARG %s", arg))

View file

@ -460,7 +460,7 @@ func TestStopSignal(t *testing.T) {
}
func TestArg(t *testing.T) {
buildOptions := &types.ImageBuildOptions{BuildArgs: make(map[string]string)}
buildOptions := &types.ImageBuildOptions{BuildArgs: make(map[string]*string)}
b := &Builder{flags: &BFlags{}, runConfig: &container.Config{}, disableCommit: true, allowedBuildArgs: make(map[string]bool), options: buildOptions}
@ -488,7 +488,7 @@ func TestArg(t *testing.T) {
t.Fatalf("%s argument should be a build arg", argName)
}
if val != "bar" {
if *val != "bar" {
t.Fatalf("%s argument should have default value 'bar', got %s", argName, val)
}
}

View file

@ -1,112 +1,116 @@
hello | hello
he'll'o | hello
he'llo | hello
he\'llo | he'llo
he\\'llo | he\llo
abc\tdef | abctdef
"abc\tdef" | abc\tdef
'abc\tdef' | abc\tdef
hello\ | hello
hello\\ | hello\
"hello | hello
"hello\" | hello"
"hel'lo" | hel'lo
'hello | hello
'hello\' | hello\
"''" | ''
$. | $.
$1 |
he$1x | hex
he$.x | he$.x
he$pwd. | he.
he$PWD | he/home
he\$PWD | he$PWD
he\\$PWD | he\/home
he\${} | he${}
he\${}xx | he${}xx
he${} | he
he${}xx | hexx
he${hi} | he
he${hi}xx | hexx
he${PWD} | he/home
he${.} | error
he${XXX:-000}xx | he000xx
he${PWD:-000}xx | he/homexx
he${XXX:-$PWD}xx | he/homexx
he${XXX:-${PWD:-yyy}}xx | he/homexx
he${XXX:-${YYY:-yyy}}xx | heyyyxx
he${XXX:YYY} | error
he${XXX:+${PWD}}xx | hexx
he${PWD:+${XXX}}xx | hexx
he${PWD:+${SHELL}}xx | hebashxx
he${XXX:+000}xx | hexx
he${PWD:+000}xx | he000xx
'he${XX}' | he${XX}
"he${PWD}" | he/home
"he'$PWD'" | he'/home'
"$PWD" | /home
'$PWD' | $PWD
'\$PWD' | \$PWD
'"hello"' | "hello"
he\$PWD | he$PWD
"he\$PWD" | he$PWD
'he\$PWD' | he\$PWD
he${PWD | error
he${PWD:=000}xx | error
he${PWD:+${PWD}:}xx | he/home:xx
he${XXX:-\$PWD:}xx | he$PWD:xx
he${XXX:-\${PWD}z}xx | he${PWDz}xx
안녕하세요 | 안녕하세요
안'녕'하세요 | 안녕하세요
안'녕하세요 | 안녕하세요
안녕\'하세요 | 안녕'하세요
안\\'녕하세요 | 안\녕하세요
안녕\t하세요 | 안녕t하세요
"안녕\t하세요" | 안녕\t하세요
'안녕\t하세요 | 안녕\t하세요
안녕하세요\ | 안녕하세요
안녕하세요\\ | 안녕하세요\
"안녕하세요 | 안녕하세요
"안녕하세요\" | 안녕하세요"
"안녕'하세요" | 안녕'하세요
'안녕하세요 | 안녕하세요
'안녕하세요\' | 안녕하세요\
안녕$1x | 안녕x
안녕$.x | 안녕$.x
안녕$pwd. | 안녕.
안녕$PWD | 안녕/home
안녕\$PWD | 안녕$PWD
안녕\\$PWD | 안녕\/home
안녕\${} | 안녕${}
안녕\${}xx | 안녕${}xx
안녕${} | 안녕
안녕${}xx | 안녕xx
안녕${hi} | 안녕
안녕${hi}xx | 안녕xx
안녕${PWD} | 안녕/home
안녕${.} | error
안녕${XXX:-000}xx | 안녕000xx
안녕${PWD:-000}xx | 안녕/homexx
안녕${XXX:-$PWD}xx | 안녕/homexx
안녕${XXX:-${PWD:-yyy}}xx | 안녕/homexx
안녕${XXX:-${YYY:-yyy}}xx | 안녕yyyxx
안녕${XXX:YYY} | error
안녕${XXX:+${PWD}}xx | 안녕xx
안녕${PWD:+${XXX}}xx | 안녕xx
안녕${PWD:+${SHELL}}xx | 안녕bashxx
안녕${XXX:+000}xx | 안녕xx
안녕${PWD:+000}xx | 안녕000xx
'안녕${XX}' | 안녕${XX}
"안녕${PWD}" | 안녕/home
"안녕'$PWD'" | 안녕'/home'
'"안녕"' | "안녕"
안녕\$PWD | 안녕$PWD
"안녕\$PWD" | 안녕$PWD
'안녕\$PWD' | 안녕\$PWD
안녕${PWD | error
안녕${PWD:=000}xx | error
안녕${PWD:+${PWD}:}xx | 안녕/home:xx
안녕${XXX:-\$PWD:}xx | 안녕$PWD:xx
안녕${XXX:-\${PWD}z}xx | 안녕${PWDz}xx
$KOREAN | 한국어
안녕$KOREAN | 안녕한국어
A|hello | hello
A|he'll'o | hello
A|he'llo | hello
A|he\'llo | he'llo
A|he\\'llo | he\llo
A|abc\tdef | abctdef
A|"abc\tdef" | abc\tdef
A|'abc\tdef' | abc\tdef
A|hello\ | hello
A|hello\\ | hello\
A|"hello | hello
A|"hello\" | hello"
A|"hel'lo" | hel'lo
A|'hello | hello
A|'hello\' | hello\
A|"''" | ''
A|$. | $.
A|$1 |
A|he$1x | hex
A|he$.x | he$.x
# Next one is different on Windows as $pwd==$PWD
U|he$pwd. | he.
W|he$pwd. | he/home.
A|he$PWD | he/home
A|he\$PWD | he$PWD
A|he\\$PWD | he\/home
A|he\${} | he${}
A|he\${}xx | he${}xx
A|he${} | he
A|he${}xx | hexx
A|he${hi} | he
A|he${hi}xx | hexx
A|he${PWD} | he/home
A|he${.} | error
A|he${XXX:-000}xx | he000xx
A|he${PWD:-000}xx | he/homexx
A|he${XXX:-$PWD}xx | he/homexx
A|he${XXX:-${PWD:-yyy}}xx | he/homexx
A|he${XXX:-${YYY:-yyy}}xx | heyyyxx
A|he${XXX:YYY} | error
A|he${XXX:+${PWD}}xx | hexx
A|he${PWD:+${XXX}}xx | hexx
A|he${PWD:+${SHELL}}xx | hebashxx
A|he${XXX:+000}xx | hexx
A|he${PWD:+000}xx | he000xx
A|'he${XX}' | he${XX}
A|"he${PWD}" | he/home
A|"he'$PWD'" | he'/home'
A|"$PWD" | /home
A|'$PWD' | $PWD
A|'\$PWD' | \$PWD
A|'"hello"' | "hello"
A|he\$PWD | he$PWD
A|"he\$PWD" | he$PWD
A|'he\$PWD' | he\$PWD
A|he${PWD | error
A|he${PWD:=000}xx | error
A|he${PWD:+${PWD}:}xx | he/home:xx
A|he${XXX:-\$PWD:}xx | he$PWD:xx
A|he${XXX:-\${PWD}z}xx | he${PWDz}xx
A|안녕하세요 | 안녕하세요
A|안'녕'하세요 | 안녕하세요
A|안'녕하세요 | 안녕하세요
A|안녕\'하세요 | 안녕'하세요
A|안\\'녕하세요 | 안\녕하세요
A|안녕\t하세요 | 안녕t하세요
A|"안녕\t하세요" | 안녕\t하세요
A|'안녕\t하세요 | 안녕\t하세요
A|안녕하세요\ | 안녕하세요
A|안녕하세요\\ | 안녕하세요\
A|"안녕하세요 | 안녕하세요
A|"안녕하세요\" | 안녕하세요"
A|"안녕'하세요" | 안녕'하세요
A|'안녕하세요 | 안녕하세요
A|'안녕하세요\' | 안녕하세요\
A|안녕$1x | 안녕x
A|안녕$.x | 안녕$.x
# Next one is different on Windows as $pwd==$PWD
U|안녕$pwd. | 안녕.
W|안녕$pwd. | 안녕/home.
A|안녕$PWD | 안녕/home
A|안녕\$PWD | 안녕$PWD
A|안녕\\$PWD | 안녕\/home
A|안녕\${} | 안녕${}
A|안녕\${}xx | 안녕${}xx
A|안녕${} | 안녕
A|안녕${}xx | 안녕xx
A|안녕${hi} | 안녕
A|안녕${hi}xx | 안녕xx
A|안녕${PWD} | 안녕/home
A|안녕${.} | error
A|안녕${XXX:-000}xx | 안녕000xx
A|안녕${PWD:-000}xx | 안녕/homexx
A|안녕${XXX:-$PWD}xx | 안녕/homexx
A|안녕${XXX:-${PWD:-yyy}}xx | 안녕/homexx
A|안녕${XXX:-${YYY:-yyy}}xx | 안녕yyyxx
A|안녕${XXX:YYY} | error
A|안녕${XXX:+${PWD}}xx | 안녕xx
A|안녕${PWD:+${XXX}}xx | 안녕xx
A|안녕${PWD:+${SHELL}}xx | 안녕bashxx
A|안녕${XXX:+000}xx | 안녕xx
A|안녕${PWD:+000}xx | 안녕000xx
A|'안녕${XX}' | 안녕${XX}
A|"안녕${PWD}" | 안녕/home
A|"안녕'$PWD'" | 안녕'/home'
A|'"안녕"' | "안녕"
A|안녕\$PWD | 안녕$PWD
A|"안녕\$PWD" | 안녕$PWD
A|'안녕\$PWD' | 안녕\$PWD
A|안녕${PWD | error
A|안녕${PWD:=000}xx | error
A|안녕${PWD:+${PWD}:}xx | 안녕/home:xx
A|안녕${XXX:-\$PWD:}xx | 안녕$PWD:xx
A|안녕${XXX:-\${PWD}z}xx | 안녕${PWDz}xx
A|$KOREAN | 한국어
A|안녕$KOREAN | 안녕한국어

View file

@ -158,7 +158,7 @@ func (b *Builder) dispatch(stepN int, stepTotal int, ast *parser.Node) error {
// the entire file (see 'leftoverArgs' processing in evaluator.go )
continue
}
envs = append(envs, fmt.Sprintf("%s=%s", key, val))
envs = append(envs, fmt.Sprintf("%s=%s", key, *val))
}
for ast.Next != nil {
ast = ast.Next

View file

@ -6,7 +6,7 @@ import "fmt"
// a command not supported on the platform.
func platformSupports(command string) error {
switch command {
case "user", "stopsignal":
case "stopsignal":
return fmt.Errorf("The daemon on this platform does not support the command '%s'", command)
}
return nil

View file

@ -180,7 +180,7 @@ func (b *Builder) runContextCommand(args []string, allowRemote bool, allowLocalD
return nil
}
container, err := b.docker.ContainerCreate(types.ContainerCreateConfig{Config: b.runConfig}, true)
container, err := b.docker.ContainerCreate(types.ContainerCreateConfig{Config: b.runConfig})
if err != nil {
return err
}
@ -496,7 +496,7 @@ func (b *Builder) create() (string, error) {
c, err := b.docker.ContainerCreate(types.ContainerCreateConfig{
Config: b.runConfig,
HostConfig: hostConfig,
}, true)
})
if err != nil {
return "", err
}
@ -537,7 +537,7 @@ func (b *Builder) run(cID string) (err error) {
}
}()
if err := b.docker.ContainerStart(cID, nil, true, "", ""); err != nil {
if err := b.docker.ContainerStart(cID, nil, "", ""); err != nil {
close(finished)
if cancelErr := <-cancelErrCh; cancelErr != nil {
logrus.Debugf("Build cancelled (%v) and got an error from ContainerStart: %v",

View file

@ -61,7 +61,7 @@ func SetEscapeToken(s string, d *Directive) error {
return fmt.Errorf("invalid ESCAPE '%s'. Must be ` or \\", s)
}
d.EscapeToken = rune(s[0])
d.LineContinuationRegex = regexp.MustCompile(`\` + s + `$`)
d.LineContinuationRegex = regexp.MustCompile(`\` + s + `[ \t]*$`)
return nil
}
@ -176,17 +176,10 @@ func Parse(rwc io.Reader, d *Directive) (*Node, error) {
newline := scanner.Text()
currentLine++
// If escape followed by a comment line then stop
// Note here that comment line starts with `#` at
// the first pos of the line
if stripComments(newline) == "" {
break
if stripComments(strings.TrimSpace(newline)) == "" {
continue
}
// If escape followed by an empty line then stop
if strings.TrimSpace(newline) == "" {
break
}
line, child, err = ParseLine(line+newline, d, false)
if err != nil {
return nil, err

View file

@ -150,8 +150,8 @@ func TestLineInformation(t *testing.T) {
t.Fatalf("Error parsing dockerfile %s: %v", testFileLineInfo, err)
}
if ast.StartLine != 5 || ast.EndLine != 27 {
fmt.Fprintf(os.Stderr, "Wrong root line information: expected(%d-%d), actual(%d-%d)\n", 5, 27, ast.StartLine, ast.EndLine)
if ast.StartLine != 5 || ast.EndLine != 31 {
fmt.Fprintf(os.Stderr, "Wrong root line information: expected(%d-%d), actual(%d-%d)\n", 5, 31, ast.StartLine, ast.EndLine)
t.Fatalf("Root line information doesn't match result.")
}
if len(ast.Children) != 3 {
@ -161,7 +161,7 @@ func TestLineInformation(t *testing.T) {
expected := [][]int{
{5, 5},
{11, 12},
{17, 27},
{17, 31},
}
for i, child := range ast.Children {
if child.StartLine != expected[i][0] || child.EndLine != expected[i][1] {

View file

@ -16,11 +16,15 @@ ENV GOPATH \
# Install the packages we need, clean up after them and us
RUN apt-get update \
&& dpkg -l | awk '/^ii/ {print $2}' > /tmp/dpkg.clean \
&& apt-get install -y --no-install-recommends git golang ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists \
&& go get -v github.com/brimstone/consuldock \
&& mv $GOPATH/bin/consuldock /usr/local/bin/consuldock \
&& dpkg -l | awk '/^ii/ {print $2}' > /tmp/dpkg.dirty \
&& apt-get remove --purge -y $(diff /tmp/dpkg.clean /tmp/dpkg.dirty | awk '/^>/ {print $2}') \
&& rm /tmp/dpkg.* \

View file

@ -16,8 +16,10 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends git golang ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists \
&& go get -v github.com/brimstone/consuldock \
&& mv $GOPATH/bin/consuldock /usr/local/bin/consuldock \
&& dpkg -l | awk '/^ii/ {print $2}' > /tmp/dpkg.dirty \
&& apt-get remove --purge -y $(diff /tmp/dpkg.clean /tmp/dpkg.dirty | awk '/^>/ {print $2}') \
&& rm /tmp/dpkg.* \

View file

@ -23,12 +23,14 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists \
&& cd /tmp \
&& wget https://dl.bintray.com/mitchellh/consul/0.3.1_web_ui.zip \
-O web_ui.zip \
&& unzip web_ui.zip \
&& mv dist /webui \
&& rm web_ui.zip \
&& dpkg -l | awk '/^ii/ {print $2}' > /tmp/dpkg.dirty \
&& apt-get remove --purge -y $(diff /tmp/dpkg.clean /tmp/dpkg.dirty | awk '/^>/ {print $2}') \
&& rm /tmp/dpkg.*
@ -40,8 +42,10 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends git golang ca-certificates build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists \
&& go get -v github.com/hashicorp/consul \
&& mv $GOPATH/bin/consul /usr/bin/consul \
&& dpkg -l | awk '/^ii/ {print $2}' > /tmp/dpkg.dirty \
&& apt-get remove --purge -y $(diff /tmp/dpkg.clean /tmp/dpkg.dirty | awk '/^>/ {print $2}') \
&& rm /tmp/dpkg.* \

View file

@ -13,6 +13,8 @@ world
RUN echo hello \
goodbye\
frog
RUN echo hello \
world
RUN echo hi \
\
world \
@ -27,5 +29,8 @@ bye\
frog
RUN echo hello \
# this is a comment that breaks escape continuation
RUN echo this is some more useful stuff
# this is a comment
# this is a comment with a blank line surrounding it
this is some more useful stuff

View file

@ -3,8 +3,8 @@
(run "echo hello world")
(run "echo hello world")
(run "echo hello goodbyefrog")
(run "echo hello world")
(run "echo hi world goodnight")
(run "echo goodbyefrog")
(run "echo goodbyefrog")
(run "echo hello")
(run "echo this is some more useful stuff")
(run "echo hello this is some more useful stuff")

View file

@ -1,15 +0,0 @@
FROM busybox
# The following will create two instructions
# `Run foo`
# `bar`
# because empty line will break the escape.
# The parser will generate the following:
# (from "busybox")
# (run "foo")
# (bar "")
# And `bar` will return an error instruction later
# Note: Parse() will not immediately error out.
RUN foo \
bar

View file

@ -1,3 +0,0 @@
(from "busybox")
(run "foo")
(bar "")

View file

@ -6,7 +6,9 @@ RUN apt-get \update && \
ADD \conf\\" /.znc
RUN foo \
bar \
baz
CMD [ "\/usr\\\"/bin/znc", "-f", "-r" ]

View file

@ -8,6 +8,7 @@ package dockerfile
import (
"fmt"
"runtime"
"strings"
"text/scanner"
"unicode"
@ -298,9 +299,16 @@ func (sw *shellWord) processName() string {
}
func (sw *shellWord) getEnv(name string) string {
if runtime.GOOS == "windows" {
// Case-insensitive environment variables on Windows
name = strings.ToUpper(name)
}
for _, env := range sw.envs {
i := strings.Index(env, "=")
if i < 0 {
if runtime.GOOS == "windows" {
env = strings.ToUpper(env)
}
if name == env {
// Should probably never get here, but just in case treat
// it like "var" and "var=" are the same
@ -308,7 +316,11 @@ func (sw *shellWord) getEnv(name string) string {
}
continue
}
if name != env[:i] {
compareName := env[:i]
if runtime.GOOS == "windows" {
compareName = strings.ToUpper(compareName)
}
if name != compareName {
continue
}
return env[i+1:]

View file

@ -3,12 +3,14 @@ package dockerfile
import (
"bufio"
"os"
"runtime"
"strings"
"testing"
)
func TestShellParser4EnvVars(t *testing.T) {
fn := "envVarTest"
lineCount := 0
file, err := os.Open(fn)
if err != nil {
@ -20,6 +22,7 @@ func TestShellParser4EnvVars(t *testing.T) {
envs := []string{"PWD=/home", "SHELL=bash", "KOREAN=한국어"}
for scanner.Scan() {
line := scanner.Text()
lineCount++
// Trim comments and blank lines
i := strings.Index(line, "#")
@ -33,21 +36,30 @@ func TestShellParser4EnvVars(t *testing.T) {
}
words := strings.Split(line, "|")
if len(words) != 2 {
if len(words) != 3 {
t.Fatalf("Error in '%s' - should be exactly one | in:%q", fn, line)
}
words[0] = strings.TrimSpace(words[0])
words[1] = strings.TrimSpace(words[1])
words[2] = strings.TrimSpace(words[2])
newWord, err := ProcessWord(words[0], envs, '\\')
if err != nil {
newWord = "error"
// Key W=Windows; A=All; U=Unix
if (words[0] != "W") && (words[0] != "A") && (words[0] != "U") {
t.Fatalf("Invalid tag %s at line %d of %s. Must be W, A or U", words[0], lineCount, fn)
}
if newWord != words[1] {
t.Fatalf("Error. Src: %s Calc: %s Expected: %s", words[0], newWord, words[1])
if ((words[0] == "W" || words[0] == "A") && runtime.GOOS == "windows") ||
((words[0] == "U" || words[0] == "A") && runtime.GOOS != "windows") {
newWord, err := ProcessWord(words[1], envs, '\\')
if err != nil {
newWord = "error"
}
if newWord != words[2] {
t.Fatalf("Error. Src: %s Calc: %s Expected: %s at line %d", words[1], newWord, words[2], lineCount)
}
}
}
}

View file

@ -104,7 +104,8 @@ func MakeTarSumContext(tarStream io.Reader) (ModifiableContext, error) {
return nil, err
}
if err := chrootarchive.Untar(sum, root, nil); err != nil {
err = chrootarchive.Untar(sum, root, nil)
if err != nil {
return nil, err
}

View file

@ -2,6 +2,7 @@ package cli
import (
"fmt"
"strings"
"github.com/spf13/cobra"
)
@ -17,6 +18,7 @@ func SetupRootCommand(rootCmd *cobra.Command) {
rootCmd.SetUsageTemplate(usageTemplate)
rootCmd.SetHelpTemplate(helpTemplate)
rootCmd.SetFlagErrorFunc(FlagErrorFunc)
rootCmd.SetHelpCommand(helpCommand)
rootCmd.PersistentFlags().BoolP("help", "h", false, "Print usage")
rootCmd.PersistentFlags().MarkShorthandDeprecated("help", "please use --help")
@ -39,6 +41,23 @@ func FlagErrorFunc(cmd *cobra.Command, err error) error {
}
}
var helpCommand = &cobra.Command{
Use: "help [command]",
Short: "Help about the command",
PersistentPreRun: func(cmd *cobra.Command, args []string) {},
PersistentPostRun: func(cmd *cobra.Command, args []string) {},
RunE: func(c *cobra.Command, args []string) error {
cmd, args, e := c.Root().Find(args)
if cmd == nil || e != nil || len(args) > 0 {
return fmt.Errorf("unknown help topic: %v", strings.Join(args, " "))
}
helpFunc := cmd.HelpFunc()
helpFunc(cmd, args)
return nil
},
}
func hasSubCommands(cmd *cobra.Command) bool {
return len(operationSubCommands(cmd)) > 0
}

View file

@ -12,11 +12,8 @@ func NewCheckpointCommand(dockerCli *command.DockerCli) *cobra.Command {
Use: "checkpoint",
Short: "Manage checkpoints",
Args: cli.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
cmd.SetOutput(dockerCli.Err())
cmd.HelpFunc()(cmd, args)
},
Tags: map[string]string{"experimental": "", "version": "1.25"},
RunE: dockerCli.ShowHelp,
Tags: map[string]string{"experimental": "", "version": "1.25"},
}
cmd.AddCommand(
newCreateCommand(dockerCli),

View file

@ -1,6 +1,8 @@
package checkpoint
import (
"fmt"
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
@ -51,5 +53,6 @@ func runCreate(dockerCli *command.DockerCli, opts createOptions) error {
return err
}
fmt.Fprintf(dockerCli.Out(), "%s\n", opts.checkpoint)
return nil
}

View file

@ -10,6 +10,7 @@ import (
"runtime"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/versions"
cliflags "github.com/docker/docker/cli/flags"
"github.com/docker/docker/cliconfig"
@ -20,6 +21,7 @@ import (
dopts "github.com/docker/docker/opts"
"github.com/docker/go-connections/sockets"
"github.com/docker/go-connections/tlsconfig"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
@ -73,20 +75,67 @@ func (cli *DockerCli) In() *InStream {
return cli.in
}
// ShowHelp shows the command help.
func (cli *DockerCli) ShowHelp(cmd *cobra.Command, args []string) error {
cmd.SetOutput(cli.err)
cmd.HelpFunc()(cmd, args)
return nil
}
// ConfigFile returns the ConfigFile
func (cli *DockerCli) ConfigFile() *configfile.ConfigFile {
return cli.configFile
}
// GetAllCredentials returns all of the credentials stored in all of the
// configured credential stores.
func (cli *DockerCli) GetAllCredentials() (map[string]types.AuthConfig, error) {
auths := make(map[string]types.AuthConfig)
for registry := range cli.configFile.CredentialHelpers {
helper := cli.CredentialsStore(registry)
newAuths, err := helper.GetAll()
if err != nil {
return nil, err
}
addAll(auths, newAuths)
}
defaultStore := cli.CredentialsStore("")
newAuths, err := defaultStore.GetAll()
if err != nil {
return nil, err
}
addAll(auths, newAuths)
return auths, nil
}
func addAll(to, from map[string]types.AuthConfig) {
for reg, ac := range from {
to[reg] = ac
}
}
// CredentialsStore returns a new credentials store based
// on the settings provided in the configuration file.
func (cli *DockerCli) CredentialsStore() credentials.Store {
if cli.configFile.CredentialsStore != "" {
return credentials.NewNativeStore(cli.configFile)
// on the settings provided in the configuration file. Empty string returns
// the default credential store.
func (cli *DockerCli) CredentialsStore(serverAddress string) credentials.Store {
if helper := getConfiguredCredentialStore(cli.configFile, serverAddress); helper != "" {
return credentials.NewNativeStore(cli.configFile, helper)
}
return credentials.NewFileStore(cli.configFile)
}
// getConfiguredCredentialStore returns the credential helper configured for the
// given registry, the default credsStore, or the empty string if neither are
// configured.
func getConfiguredCredentialStore(c *configfile.ConfigFile, serverAddress string) string {
if c.CredentialHelpers != nil && serverAddress != "" {
if helper, exists := c.CredentialHelpers[serverAddress]; exists {
return helper
}
}
return c.CredentialsStore
}
// Initialize the dockerCli runs initialization that must happen after command
// line flags are parsed.
func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions) error {

View file

@ -118,7 +118,7 @@ func runAttach(dockerCli *command.DockerCli, opts *attachOptions) error {
return errAttach
}
_, status, err := getExitCode(dockerCli, ctx, opts.container)
_, status, err := getExitCode(ctx, dockerCli, opts.container)
if err != nil {
return err
}

View file

@ -13,10 +13,7 @@ func NewContainerCommand(dockerCli *command.DockerCli) *cobra.Command {
Use: "container",
Short: "Manage containers",
Args: cli.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
cmd.SetOutput(dockerCli.Err())
cmd.HelpFunc()(cmd, args)
},
RunE: dockerCli.ShowHelp,
}
cmd.AddCommand(
NewAttachCommand(dockerCli),

View file

@ -170,7 +170,7 @@ func createContainer(ctx context.Context, dockerCli *command.DockerCli, config *
if ref, ok := ref.(reference.NamedTagged); ok && command.IsTrusted() {
var err error
trustedRef, err = image.TrustedReference(ctx, dockerCli, ref)
trustedRef, err = image.TrustedReference(ctx, dockerCli, ref, nil)
if err != nil {
return nil, err
}

View file

@ -21,7 +21,7 @@ func NewDiffCommand(dockerCli *command.DockerCli) *cobra.Command {
return &cobra.Command{
Use: "diff CONTAINER",
Short: "Inspect changes on a container's filesystem",
Short: "Inspect changes to files or directories on a container's filesystem",
Args: cli.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
opts.container = args[0]

View file

@ -170,7 +170,7 @@ func getExecExitCode(ctx context.Context, client apiclient.ContainerAPIClient, e
resp, err := client.ContainerExecInspect(ctx, execID)
if err != nil {
// If we can't connect, then the daemon probably died.
if err != apiclient.ErrConnectionFailed {
if !apiclient.IsErrConnectionFailed(err) {
return false, -1, err
}
return false, -1, nil

View file

@ -59,22 +59,25 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
return &cmd
}
type preProcessor struct {
types.Container
opts *types.ContainerListOptions
}
// listOptionsProcessor is used to set any container list options which may only
// be embedded in the format template.
// This is passed directly into tmpl.Execute in order to allow the preprocessor
// to set any list options that were not provided by flags (e.g. `.Size`).
// It is using a `map[string]bool` so that unknown fields passed into the
// template format do not cause errors. These errors will get picked up when
// running through the actual template processor.
type listOptionsProcessor map[string]bool
// Size sets the size option when called by a template execution.
func (p *preProcessor) Size() bool {
p.opts.Size = true
// Size sets the size of the map when called by a template execution.
func (o listOptionsProcessor) Size() bool {
o["size"] = true
return true
}
// Networks does nothing but return true.
// It is needed to avoid the template check to fail as this field
// doesn't exist in `types.Container`
func (p *preProcessor) Networks() bool {
return true
// Label is needed here as it allows the correct pre-processing
// because Label() is a method with arguments
func (o listOptionsProcessor) Label(name string) string {
return ""
}
func buildContainerListOptions(opts *psOptions) (*types.ContainerListOptions, error) {
@ -89,20 +92,20 @@ func buildContainerListOptions(opts *psOptions) (*types.ContainerListOptions, er
options.Limit = 1
}
// Currently only used with Size, so we can determine if the user
// put {{.Size}} in their format.
pre := &preProcessor{opts: options}
tmpl, err := templates.Parse(opts.format)
if err != nil {
return nil, err
}
optionsProcessor := listOptionsProcessor{}
// This shouldn't error out but swallowing the error makes it harder
// to track down if preProcessor issues come up. Ref #24696
if err := tmpl.Execute(ioutil.Discard, pre); err != nil {
if err := tmpl.Execute(ioutil.Discard, optionsProcessor); err != nil {
return nil, err
}
// At the moment all we need is to capture .Size for preprocessor
options.Size = opts.size || optionsProcessor["size"]
return options, nil
}

View file

@ -5,7 +5,7 @@ import (
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/cli"
"github.com/docker/docker/cli/command"
units "github.com/docker/go-units"
@ -52,7 +52,7 @@ func runPrune(dockerCli *command.DockerCli, opts pruneOptions) (spaceReclaimed u
return
}
report, err := dockerCli.Client().ContainersPrune(context.Background(), types.ContainersPruneConfig{})
report, err := dockerCli.Client().ContainersPrune(context.Background(), filters.Args{})
if err != nil {
return
}

View file

@ -46,6 +46,57 @@ func TestBuildContainerListOptions(t *testing.T) {
expectedLimit: 1,
expectedFilters: make(map[string]string),
},
{
psOpts: &psOptions{
all: true,
size: false,
last: 5,
filter: filters,
// With .Size, size should be true
format: "{{.Size}}",
},
expectedAll: true,
expectedSize: true,
expectedLimit: 5,
expectedFilters: map[string]string{
"foo": "bar",
"baz": "foo",
},
},
{
psOpts: &psOptions{
all: true,
size: false,
last: 5,
filter: filters,
// With .Size, size should be true
format: "{{.Size}} {{.CreatedAt}} {{.Networks}}",
},
expectedAll: true,
expectedSize: true,
expectedLimit: 5,
expectedFilters: map[string]string{
"foo": "bar",
"baz": "foo",
},
},
{
psOpts: &psOptions{
all: true,
size: false,
last: 5,
filter: filters,
// Without .Size, size should be false
format: "{{.CreatedAt}} {{.Networks}}",
},
expectedAll: true,
expectedSize: false,
expectedLimit: 5,
expectedFilters: map[string]string{
"foo": "bar",
"baz": "foo",
},
},
}
for _, c := range contexts {

View file

@ -74,9 +74,8 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
cmdPath := "run"
var (
flAttach *opttypes.ListOpts
ErrConflictAttachDetach = fmt.Errorf("Conflicting options: -a and -d")
ErrConflictRestartPolicyAndAutoRemove = fmt.Errorf("Conflicting options: --restart and --rm")
flAttach *opttypes.ListOpts
ErrConflictAttachDetach = fmt.Errorf("Conflicting options: -a and -d")
)
config, hostConfig, networkingConfig, err := runconfigopts.Parse(flags, copts)
@ -87,9 +86,6 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
return cli.StatusError{StatusCode: 125}
}
if hostConfig.AutoRemove && !hostConfig.RestartPolicy.IsNone() {
return ErrConflictRestartPolicyAndAutoRemove
}
if hostConfig.OomKillDisable != nil && *hostConfig.OomKillDisable && hostConfig.Memory == 0 {
fmt.Fprintf(stderr, "WARNING: Disabling the OOM killer on containers without setting a '-m/--memory' limit may be dangerous.\n")
}
@ -140,6 +136,9 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
ctx, cancelFun := context.WithCancel(context.Background())
// preserve AutoRemove state. createContainer() / ContainerCreate() disables daemon-side auto-remove on API < 1.25
autoRemove := hostConfig.AutoRemove
createResponse, err := createContainer(ctx, dockerCli, config, hostConfig, networkingConfig, hostConfig.ContainerIDFile, opts.name)
if err != nil {
reportError(stderr, cmdPath, err.Error(), true)
@ -211,7 +210,7 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
})
}
statusChan := waitExitOrRemoved(dockerCli, ctx, createResponse.ID, hostConfig.AutoRemove)
statusChan := waitExitOrRemoved(ctx, dockerCli, createResponse.ID, autoRemove)
//start the container
if err := client.ContainerStart(ctx, createResponse.ID, types.ContainerStartOptions{}); err != nil {
@ -224,7 +223,7 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
}
reportError(stderr, cmdPath, err.Error(), false)
if hostConfig.AutoRemove {
if autoRemove {
// wait container to be removed
<-statusChan
}

View file

@ -111,7 +111,7 @@ func runStart(dockerCli *command.DockerCli, opts *startOptions) error {
// 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.
statusChan := waitExitOrRemoved(dockerCli, ctx, c.ID, c.HostConfig.AutoRemove)
statusChan := waitExitOrRemoved(ctx, dockerCli, c.ID, c.HostConfig.AutoRemove)
startOptions := types.ContainerStartOptions{
CheckpointID: opts.checkpoint,
CheckpointDir: opts.checkpointDir,

View file

@ -108,7 +108,7 @@ func runStats(dockerCli *command.DockerCli, opts *statsOptions) error {
s := formatter.NewContainerStats(container.ID[:12], daemonOSType)
if cStats.add(s) {
waitFirst.Add(1)
go collect(s, ctx, dockerCli.Client(), !opts.noStream, waitFirst)
go collect(ctx, s, dockerCli.Client(), !opts.noStream, waitFirst)
}
}
}
@ -125,7 +125,7 @@ func runStats(dockerCli *command.DockerCli, opts *statsOptions) error {
s := formatter.NewContainerStats(e.ID[:12], daemonOSType)
if cStats.add(s) {
waitFirst.Add(1)
go collect(s, ctx, dockerCli.Client(), !opts.noStream, waitFirst)
go collect(ctx, s, dockerCli.Client(), !opts.noStream, waitFirst)
}
}
})
@ -134,7 +134,7 @@ func runStats(dockerCli *command.DockerCli, opts *statsOptions) error {
s := formatter.NewContainerStats(e.ID[:12], daemonOSType)
if cStats.add(s) {
waitFirst.Add(1)
go collect(s, ctx, dockerCli.Client(), !opts.noStream, waitFirst)
go collect(ctx, s, dockerCli.Client(), !opts.noStream, waitFirst)
}
})
@ -160,7 +160,7 @@ func runStats(dockerCli *command.DockerCli, opts *statsOptions) error {
s := formatter.NewContainerStats(name, daemonOSType)
if cStats.add(s) {
waitFirst.Add(1)
go collect(s, ctx, dockerCli.Client(), !opts.noStream, waitFirst)
go collect(ctx, s, dockerCli.Client(), !opts.noStream, waitFirst)
}
}

View file

@ -53,7 +53,7 @@ func (s *stats) isKnownContainer(cid string) (int, bool) {
return -1, false
}
func collect(s *formatter.ContainerStats, ctx context.Context, cli client.APIClient, streamStats bool, waitFirst *sync.WaitGroup) {
func collect(ctx context.Context, s *formatter.ContainerStats, cli client.APIClient, streamStats bool, waitFirst *sync.WaitGroup) {
logrus.Debugf("collecting stats for %s", s.Container)
var (
getFirst bool
@ -179,10 +179,14 @@ func calculateCPUPercentUnix(previousCPU, previousSystem uint64, v *types.StatsJ
cpuDelta = float64(v.CPUStats.CPUUsage.TotalUsage) - float64(previousCPU)
// calculate the change for the entire system between readings
systemDelta = float64(v.CPUStats.SystemUsage) - float64(previousSystem)
onlineCPUs = float64(v.CPUStats.OnlineCPUs)
)
if onlineCPUs == 0.0 {
onlineCPUs = float64(len(v.CPUStats.CPUUsage.PercpuUsage))
}
if systemDelta > 0.0 && cpuDelta > 0.0 {
cpuPercent = (cpuDelta / systemDelta) * float64(len(v.CPUStats.CPUUsage.PercpuUsage)) * 100.0
cpuPercent = (cpuDelta / systemDelta) * onlineCPUs * 100.0
}
return cpuPercent
}

View file

@ -9,21 +9,32 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/cli/command"
clientapi "github.com/docker/docker/client"
)
func waitExitOrRemoved(dockerCli *command.DockerCli, ctx context.Context, containerID string, waitRemove bool) chan int {
func waitExitOrRemoved(ctx context.Context, dockerCli *command.DockerCli, containerID string, waitRemove bool) chan int {
if len(containerID) == 0 {
// containerID can never be empty
panic("Internal Error: waitExitOrRemoved needs a containerID as parameter")
}
var removeErr error
statusChan := make(chan int)
exitCode := 125
eventProcessor := func(e events.Message) bool {
// Get events via Events API
f := filters.NewArgs()
f.Add("type", "container")
f.Add("container", containerID)
options := types.EventsOptions{
Filters: f,
}
eventCtx, cancel := context.WithCancel(ctx)
eventq, errq := dockerCli.Client().Events(eventCtx, options)
eventProcessor := func(e events.Message) bool {
stopProcessing := false
switch e.Status {
case "die":
@ -37,6 +48,18 @@ func waitExitOrRemoved(dockerCli *command.DockerCli, ctx context.Context, contai
}
if !waitRemove {
stopProcessing = true
} else {
// If we are talking to an older daemon, `AutoRemove` is not supported.
// We need to fall back to the old behavior, which is client-side removal
if versions.LessThan(dockerCli.Client().ClientVersion(), "1.25") {
go func() {
removeErr = dockerCli.Client().ContainerRemove(ctx, containerID, types.ContainerRemoveOptions{RemoveVolumes: true})
if removeErr != nil {
logrus.Errorf("error removing container: %v", removeErr)
cancel() // cancel the event Q
}
}()
}
}
case "detach":
exitCode = 0
@ -44,39 +67,27 @@ func waitExitOrRemoved(dockerCli *command.DockerCli, ctx context.Context, contai
case "destroy":
stopProcessing = true
}
if stopProcessing {
statusChan <- exitCode
return true
}
return false
return stopProcessing
}
// Get events via Events API
f := filters.NewArgs()
f.Add("type", "container")
f.Add("container", containerID)
options := types.EventsOptions{
Filters: f,
}
eventCtx, cancel := context.WithCancel(ctx)
eventq, errq := dockerCli.Client().Events(eventCtx, options)
go func() {
defer cancel()
defer func() {
statusChan <- exitCode // must always send an exit code or the caller will block
cancel()
}()
for {
select {
case <-eventCtx.Done():
if removeErr != nil {
return
}
case evt := <-eventq:
if eventProcessor(evt) {
return
}
case err := <-errq:
logrus.Errorf("error getting events from daemon: %v", err)
statusChan <- exitCode
return
}
}
@ -87,11 +98,11 @@ func waitExitOrRemoved(dockerCli *command.DockerCli, ctx context.Context, contai
// getExitCode performs an inspect on the container. It returns
// the running state and the exit code.
func getExitCode(dockerCli *command.DockerCli, ctx context.Context, containerID string) (bool, int, error) {
func getExitCode(ctx context.Context, dockerCli *command.DockerCli, containerID string) (bool, int, error) {
c, err := dockerCli.Client().ContainerInspect(ctx, containerID)
if err != nil {
// If we can't connect, then the daemon probably died.
if err != clientapi.ErrConnectionFailed {
if !clientapi.IsErrConnectionFailed(err) {
return false, -1, err
}
return false, -1, nil

View file

@ -370,3 +370,29 @@ func TestContainerContextWriteJSONField(t *testing.T) {
assert.Equal(t, s, containers[i].ID)
}
}
func TestContainerBackCompat(t *testing.T) {
containers := []types.Container{{ID: "brewhaha"}}
cases := []string{
"ID",
"Names",
"Image",
"Command",
"CreatedAt",
"RunningFor",
"Ports",
"Status",
"Size",
"Labels",
"Mounts",
}
buf := bytes.NewBuffer(nil)
for _, c := range cases {
ctx := Context{Format: Format(fmt.Sprintf("{{ .%s }}", c)), Output: buf}
if err := ContainerWrite(ctx, containers); err != nil {
t.Logf("could not render template for field '%s': %v", c, err)
t.Fail()
}
buf.Reset()
}
}

View file

@ -192,7 +192,10 @@ func (c *diskUsageImagesContext) Reclaimable() string {
c.AddHeader(reclaimableHeader)
for _, i := range c.images {
if i.Containers != 0 {
used += i.Size
if i.VirtualSize == -1 || i.SharedSize == -1 {
continue
}
used += i.VirtualSize - i.SharedSize
}
}

View file

@ -226,8 +226,7 @@ func (c *imageContext) CreatedAt() string {
func (c *imageContext) Size() string {
c.AddHeader(sizeHeader)
//NOTE: For backward compatibility we need to return VirtualSize
return units.HumanSizeWithPrecision(float64(c.i.VirtualSize), 3)
return units.HumanSizeWithPrecision(float64(c.i.Size), 3)
}
func (c *imageContext) Containers() string {
@ -253,8 +252,8 @@ func (c *imageContext) SharedSize() string {
func (c *imageContext) UniqueSize() string {
c.AddHeader(uniqueSizeHeader)
if c.i.Size == -1 {
if c.i.VirtualSize == -1 || c.i.SharedSize == -1 {
return "N/A"
}
return units.HumanSize(float64(c.i.Size))
return units.HumanSize(float64(c.i.VirtualSize - c.i.SharedSize))
}

View file

@ -263,6 +263,9 @@ func (ctx *serviceInspectContext) HasResources() bool {
}
func (ctx *serviceInspectContext) HasResourceReservations() bool {
if ctx.Service.Spec.TaskTemplate.Resources == nil || ctx.Service.Spec.TaskTemplate.Resources.Reservations == nil {
return false
}
return ctx.Service.Spec.TaskTemplate.Resources.Reservations.NanoCPUs > 0 || ctx.Service.Spec.TaskTemplate.Resources.Reservations.MemoryBytes > 0
}
@ -281,6 +284,9 @@ func (ctx *serviceInspectContext) ResourceReservationMemory() string {
}
func (ctx *serviceInspectContext) HasResourceLimits() bool {
if ctx.Service.Spec.TaskTemplate.Resources == nil || ctx.Service.Spec.TaskTemplate.Resources.Limits == nil {
return false
}
return ctx.Service.Spec.TaskTemplate.Resources.Limits.NanoCPUs > 0 || ctx.Service.Spec.TaskTemplate.Resources.Limits.MemoryBytes > 0
}

View file

@ -145,8 +145,10 @@ func (c *containerStatsContext) Container() string {
func (c *containerStatsContext) Name() string {
c.AddHeader(nameHeader)
name := c.s.Name[1:]
return name
if len(c.s.Name) > 1 {
return c.s.Name[1:]
}
return "--"
}
func (c *containerStatsContext) ID() string {

View file

@ -69,6 +69,12 @@ func TestContainerStatsContextWrite(t *testing.T) {
`MEM USAGE / LIMIT
20 B / 20 B
-- / --
`,
},
{
Context{Format: "{{.Container}} {{.ID}} {{.Name}}"},
`container1 abcdef foo
container2 --
`,
},
{
@ -83,6 +89,8 @@ container2 --
stats := []StatsEntry{
{
Container: "container1",
ID: "abcdef",
Name: "/foo",
CPUPercentage: 20,
Memory: 20,
MemoryLimit: 20,

View file

@ -67,7 +67,7 @@ func NewBuildCommand(dockerCli *command.DockerCli) *cobra.Command {
ulimits := make(map[string]*units.Ulimit)
options := buildOptions{
tags: opts.NewListOpts(validateTag),
buildArgs: opts.NewListOpts(runconfigopts.ValidateArg),
buildArgs: opts.NewListOpts(runconfigopts.ValidateEnv),
ulimits: runconfigopts.NewUlimitOpt(&ulimits),
labels: opts.NewListOpts(runconfigopts.ValidateEnv),
}
@ -107,7 +107,7 @@ func NewBuildCommand(dockerCli *command.DockerCli) *cobra.Command {
flags.StringSliceVar(&options.cacheFrom, "cache-from", []string{}, "Images to consider as cache sources")
flags.BoolVar(&options.compress, "compress", false, "Compress the build context using gzip")
flags.StringSliceVar(&options.securityOpt, "security-opt", []string{}, "Security options")
flags.StringVar(&options.networkMode, "network", "default", "Connect a container to a network")
flags.StringVar(&options.networkMode, "network", "default", "Set the networking mode for the RUN instructions during build")
command.AddTrustedFlags(flags, true)
@ -235,7 +235,7 @@ func runBuild(dockerCli *command.DockerCli, options buildOptions) error {
var resolvedTags []*resolvedTag
if command.IsTrusted() {
translator := func(ctx context.Context, ref reference.NamedTagged) (reference.Canonical, error) {
return TrustedReference(ctx, dockerCli, ref)
return TrustedReference(ctx, dockerCli, ref, nil)
}
// Wrap the tar archive to replace the Dockerfile entry with the rewritten
// Dockerfile which uses trusted pulls.
@ -280,7 +280,7 @@ func runBuild(dockerCli *command.DockerCli, options buildOptions) error {
}
}
authConfig, _ := dockerCli.CredentialsStore().GetAll()
authConfigs, _ := dockerCli.GetAllCredentials()
buildOptions := types.ImageBuildOptions{
Memory: memory,
MemorySwap: memorySwap,
@ -300,8 +300,8 @@ func runBuild(dockerCli *command.DockerCli, options buildOptions) error {
Dockerfile: relDockerfile,
ShmSize: shmSize,
Ulimits: options.ulimits.GetList(),
BuildArgs: runconfigopts.ConvertKVStringsToMap(options.buildArgs.GetAll()),
AuthConfigs: authConfig,
BuildArgs: runconfigopts.ConvertKVStringsToMapWithNil(options.buildArgs.GetAll()),
AuthConfigs: authConfigs,
Labels: runconfigopts.ConvertKVStringsToMap(options.labels.GetAll()),
CacheFrom: options.cacheFrom,
SecurityOpt: options.securityOpt,

Some files were not shown because too many files have changed in this diff Show more