Commit graph

30331 commits

Author SHA1 Message Date
Sebastiaan van Stijn
bbbddeebba
Add version annotation to various flags added in 1.13
Pull request https://github.com/docker/docker/pull/27745 added support for the
client to talk to older versions of the daemon. Various flags were added to
docker 1.13 that are not compatible with older daemons.

This PR adds annotations to those flags, so that they are automatically hidden
if the daemon is older than docker 1.13 (API 1.25).

Not all new flags affect the API (some are client-side only). The following
PR's added new flags to docker 1.13 that affect the API;

- https://github.com/docker/docker/pull/23430 added `--cpu-rt-period`and `--cpu-rt-runtime`
- https://github.com/docker/docker/pull/27800 / https://github.com/docker/docker/pull/25317 added `--group` / `--group-add` / `--group-rm`
- https://github.com/docker/docker/pull/27702 added `--network` to `docker build`
- https://github.com/docker/docker/pull/25962 added `--attachable` to `docker network create`
- https://github.com/docker/docker/pull/27998 added `--compose-file` to `docker stack deploy`
- https://github.com/docker/docker/pull/22566 added `--stop-timeout` to `docker run` and `docker create`
- https://github.com/docker/docker/pull/26061 added `--init` to `docker run` and `docker create`
- https://github.com/docker/docker/pull/26941 added `--init-path` to `docker run` and `docker create`
- https://github.com/docker/docker/pull/27958 added `--cpus` on `docker run` / `docker create`
- https://github.com/docker/docker/pull/27567 added `--dns`, `--dns-opt`, and `--dns-search` to `docker service create`
- https://github.com/docker/docker/pull/27596 added `--force` to `docker service update`
- https://github.com/docker/docker/pull/27857 added `--hostname` to `docker service create`
- https://github.com/docker/docker/pull/28031 added `--hosts`, `--host-add` / `--host-rm` to `docker service create` and `docker service update`
- https://github.com/docker/docker/pull/28076 added `--tty` on `docker service create` / `docker service update`
- https://github.com/docker/docker/pull/26421 added `--update-max-failure-ratio`, `--update-monitor` and `--rollback` on `docker service update`
- https://github.com/docker/docker/pull/27369 added `--health-cmd`, `--health-interval`, `--health-retries`, `--health-timeout` and `--no-healthcheck` options to `docker service create` and `docker service update`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-16 18:21:20 +01:00
Brian Goff
e74623d283 Merge pull request #30113 from thaJeztah/fix-autoremove-on-older-api
Don't use AutoRemove on older daemons
2017-01-16 08:40:00 -05:00
Akihiro Suda
dcf1264f1c Merge pull request #30058 from vdemeester/integration-build-cmd-clean
[test-integration] clean docker_cli_build_test.go
2017-01-16 18:16:49 +09:00
Vincent Demeester
fd0ea76931 Merge pull request #30163 from albers/completion-fix-hide-legacy-commands
Fix treatment of DOCKER_HIDE_LEGACY_COMMANDS in bash completion
2017-01-16 10:01:44 +01:00
Vincent Demeester
ead8ce2431 Merge pull request #30151 from tonistiigi/fix-defunct
Avoid defunct registry/notary processes during tests
2017-01-16 08:55:16 +01:00
Sebastiaan van Stijn
582c5b7652 Merge pull request #30140 from mlaventure/remove-fifo-timeout
Remove timeout on fifos opening
2017-01-15 22:47:30 +01:00
Vincent Demeester
fa4f09194f Merge pull request #28690 from zteBill/volume-errorinfo-inexact
repeated volume create information
2017-01-15 17:10:27 +01:00
Vincent Demeester
c778f4b964
Refactor docker_cli_build_test.go
Use `testutil/cmd` for `buildCommand`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-15 16:48:08 +01:00
Sebastiaan van Stijn
96f7cf254b Merge pull request #30143 from tophj-ibm/multi-get-go-from-own-dockerfile
[multi-arch] get go version from arch dockerfile
2017-01-15 15:47:55 +01:00
Sebastiaan van Stijn
957a77f2e2 Merge pull request #30169 from runcom/fix-quoting
image: tarexport: do not quote integers in format string
2017-01-15 15:47:34 +01:00
Sebastiaan van Stijn
0ea7b143b0
Don't use AutoRemove on older daemons
Docker 1.13 moves the `--rm` flag to the daemon,
through an AutoRemove option in HostConfig.

When using API 1.24 and under, AutoRemove should not be
used, even if the daemon is version 1.13 or above and
"supports" this feature.

This patch fixes a situation where an 1.13 client,
talking to an 1.13 daemon, but using the 1.24 API
version, still set the AutoRemove property.

As a result, both the client _and_ the daemon
were attempting to remove the container, resulting
in an error:

    ERRO[0000] error removing container: Error response from daemon:
    removal of container ce0976ad22495c7cbe9487752ea32721a282164862db036b2f3377bd07461c3a
    is already in progress

In addition, the validation of conflicting options
is moved from `docker run` to `opts.parse()`, so
that conflicting options are also detected when
running `docker create` and `docker start` separately.

To resolve the issue, the `AutoRemove` option is now
always set to `false` both by the client and the
daemon, if API version 1.24 or under is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-15 01:59:57 +01:00
Brian Goff
24c4226dc7 Merge pull request #29831 from vdemeester/integration-small-cleanups
[test-integration] Small cleanups on integration cli
2017-01-14 16:43:39 -05:00
Brian Goff
0fcd55072b Merge pull request #29902 from caervs/add_autorestart
Add on-failure to default restart policy
2017-01-14 16:40:02 -05:00
Brian Goff
7d24cc7710 Merge pull request #29856 from Microsoft/jjh/warntoout
Windows to Linux build warning to stdout
2017-01-14 16:37:31 -05:00
Antonio Murdaca
675f4140e7
image: tarexport: do not quote integers in format string
Basically, prevents outputs like:
```
invalid manifest, layers length mismatch: expected '\x02', got '\x01'
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-14 20:03:11 +01:00
Sebastiaan van Stijn
a4bc730298 Merge pull request #30108 from thaJeztah/update-changelog-1.12.6
Update changelog on master with changes from 1.12.x
2017-01-14 18:11:45 +01:00
Brian Goff
60fb79e0dc Merge pull request #30150 from anusha-ragunathan/pluginv1_vol
Fix pluginv1 Windows volumes
2017-01-14 11:35:05 -05:00
Doug Davis
b65f7ea7ae Merge pull request #30164 from xulike666/fix-typo-5/36
fix typo in container/container.go
2017-01-14 09:14:52 -05:00
Brian Goff
1bbd75c743 Merge pull request #30125 from albers/completion-plugin-install--disable-content-trust
Add bash completion for `plugin install --disable-content-trust`
2017-01-14 09:04:51 -05:00
Brian Goff
78db6379a8 Merge pull request #30103 from TDAbboud/29961-add-error-checking
Add error checking for hostPort range
2017-01-14 08:43:27 -05:00
Brian Goff
728566c4ad Merge pull request #30161 from xulike666/fix-typo-4/36
fix typo in api/types/client.go
2017-01-14 08:24:49 -05:00
Brian Goff
1847f855b3 Merge pull request #30160 from xulike666/fix-boring-typo
fix typo in api/types/time/timestamp.go
2017-01-14 08:22:31 -05:00
Harald Albers
12952f537c Fix treatment of DOCKER_HIDE_LEGACY_COMMANDS in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
2017-01-14 04:48:41 -08:00
Aaron.L.Xu
32035ffea5 fix typo in container/container.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-14 15:23:33 +08:00
Aaron.L.Xu
c8fd28f12e fix typo in api/types/client.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-14 15:10:08 +08:00
Aaron.L.Xu
2859ce6a57 fix typo in api/types/time/timestamp.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-14 14:16:03 +08:00
Tonis Tiigi
09dbce5f5a Avoid defunct registry/notary processes during tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-13 17:45:14 -08:00
Anusha Ragunathan
0ef21eb0e3 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>
2017-01-13 17:01:48 -08:00
Tony Abboud
135f8f9674 Add error checking for hostPort range
This fix catches the case where there is a single container port
and a dynamic host port and will fail out gracefully
Example docker-compose.yml snippet:
    port:
        ports:
            - "8091-8093:8091"
            - "80:8080"

Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
2017-01-13 18:05:51 -05:00
Alexander Morozov
1eafa0f706 Merge pull request #30112 from Microsoft/jjh/graphdriver
Windows: Remove redundant 'GraphDriver() func
2017-01-13 13:59:12 -08:00
Christopher Jones
fa17ac2560
[multi-arch] get go version from arch dockerfile
Changes a couple of generate scripts so that the architecture
gets the go version from its own Dockerfile. This should cover a
rare case where the go version might have to be different from
the x86 Dockerfile.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-01-13 16:48:41 -05:00
Vincent Demeester
bd9361b810 Merge pull request #28720 from jlhawn/add_secret_update_method
Add SecretUpdate method to client
2017-01-13 21:28:43 +01:00
Kenfe-Mickael Laventure
c178700a04 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>
2017-01-13 11:46:48 -08:00
Sebastiaan van Stijn
ca00c18530 Merge pull request #30131 from xulike666/fix-typo
fix typo in mount.go
2017-01-13 20:40:34 +01:00
Josh Hawn
1cd5af59bf Add SecretUpdate docs to api/swagger.yaml
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2017-01-13 09:51:12 -08:00
Josh Hawn
77b8465d7e 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)
2017-01-13 09:51:05 -08:00
Kenfe-Mickaël Laventure
f858d49483 Merge pull request #30120 from thaJeztah/revert-argument-name-change
revert "virtualSize" name change
2017-01-13 08:54:27 -08:00
Sebastiaan van Stijn
2dd3aa608d Merge pull request #30132 from albers/completion_hide_legacy_commands
Honour $DOCKER_HIDE_LEGACY_COMMANDS in bash completion
2017-01-13 16:18:58 +01:00
Vincent Demeester
8b7ba17d33 Merge pull request #30130 from ijc25/clarify-cp-docs
Clarify `cp` documentation behaviour with trailing "/."
2017-01-13 16:16:03 +01:00
Harald Albers
aa006f1280 Honour $DOCKER_HIDE_LEGACY_COMMANDS in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
2017-01-13 15:43:52 +01:00
Aaron.L.Xu
e0621c53af fix typo in mount.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-13 22:36:32 +08:00
Ian Campbell
fca6cda4b0 Clarify cp documentation behaviour with trailing "/."
Issue #30082 demonstrated that their is possible confusion with the "/."
where the tailing "." can appear to be merely punctuation within the
document rather than a highly pertinent part of `SRC_PATH`.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-01-13 13:58:25 +00:00
Harald Albers
725a864a04 Add bash completion for plugin install --disable-content-trust
Signed-off-by: Harald Albers <github@albersweb.de>
2017-01-13 11:56:50 +01:00
Sebastiaan van Stijn
22c411517a
revert "virtualSize" name change
Commit b717de5153
changed the name of the "size" argument to
"virtualSize", as the "VirtualSize" field
was re-used for calculating the size of all
layers _not_ used by other images.

be20dc15af reverted
the change in calculation, but did not change
the argument name back to "size".

This changes the name back to its original
name, because since the introduction of the
content-addressable store in docker 1.10,
there no longer is a "virtual" size, so
"size" is a better name for this argument.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-13 10:25:03 +01:00
Sebastiaan van Stijn
0b09d6bfa7 Merge pull request #30061 from yongtang/30027-docker-images-v1.12
Fix `Size` in `docker images` for v1.12 client to v1.13 daemon
2017-01-13 02:11:48 +01:00
Brian Goff
597843e790 Merge pull request #30039 from ripcurld0/specify_line_no_dockerfile_err
Specify in which line the Dockerfile parser failed
2017-01-12 19:48:45 -05:00
John Howard
2cd8bcd7df Windows: Remove redundant 'GraphDriver() func
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-12 15:32:46 -08:00
Michael Crosby
f65212d5b9 Merge pull request #30106 from runcom/fix-upgrade-from-1.10
daemon: honor default runtime when starting containers
2017-01-12 14:44:37 -08:00
Antonio Murdaca
9391a822ea
daemon: honor default runtime when starting containers
If you created containers from pre-OCI docker (e.g. docker-1.10.x)
upgrade may fail when restarting containers if the new docker daemon
has `--default-runtime` set.

In Fedora, we ship docker 1.12.6 with:

```
--default-runtime=oci
--add-runtime oci=/usr/libexec/docker/docker-runc-current
```

That way we don't rely on `docker-runc` being in `$PATH`.

The issue is, on upgrade from docker 1.10.3 without this patch, the
default runtime in `daemon/start_linux.go` is unconditionally set to
`runc=docker-runc` without honoring the `--default-runtime` flag set in
the docker daemon.

Reproducer:

- (1.10.3) `docker run -d -p 5000:5000 --restart=always --name registry
registry:2`
- upgrade to docker 1.12.6 (1.11.x has likely the same issue)
- the registry container fails to restart on upgrade with the following
log message `error="exec: \"docker-runc\": executable file not
found in $PATH: \"\""`

That error comes from the fact that we're setting the runtime in the
container's HostConfig to `runc` where instead we should have honored
the `--default-runtime` flag (in our case that's set to `oci`).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-12 20:36:22 +01:00
Tõnis Tiigi
27695cd751 Merge pull request #27903 from kim0/master
zfs: expose mountpoint/dataset on inspection
2017-01-12 11:28:07 -08:00