1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli/command
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
..
bundlefile Reinstate --bundle-file argument to 'docker deploy' 2016-11-10 11:28:18 -05:00
checkpoint Print checkpoint id when creating a checkpoint 2016-12-01 23:30:14 -05:00
commands Give a order to AddCommands, for easy read and maintenance. 2016-12-08 16:43:14 +08:00
container Don't use AutoRemove on older daemons 2017-01-15 01:59:57 +01:00
formatter Fix ImageSummary.Size value 2017-01-12 07:49:22 -08:00
idresolver service ps: Truncate Task IDs 2016-11-08 16:17:15 -08:00
image Merge pull request #29856 from Microsoft/jjh/warntoout 2017-01-14 16:37:31 -05:00
inspect Move templates to pkg/templates 2016-12-12 09:34:03 +01:00
network Merge pull request #29226 from yongtang/28535-prune-until-follow-up 2017-01-09 17:58:01 +01:00
node Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
plugin Fix usage message of plugin inspect 2016-12-31 09:55:04 -08:00
prune Add --filter until=<timestamp> for docker container/image prune 2017-01-04 14:16:42 -08:00
registry change minor mistake of spelling 2016-12-20 21:05:19 +08:00
secret remove -f on secret create and unify usage with other commands 2017-01-06 14:07:48 -08:00
service Add SecretUpdate method to client 2017-01-13 09:51:05 -08:00
stack Few stack deploy network fixes 2017-01-10 10:29:09 +01:00
swarm Allow swarm init with --availability=drain 2017-01-10 16:31:51 -08:00
system Add --filter until=<timestamp> for docker container/image prune 2017-01-04 14:16:42 -08:00
task Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
volume Merge pull request #26830 from dnephin/man-desc-in-files 2017-01-03 17:47:49 +01:00
cli.go Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
events_utils.go Add subcommand prune to the container, volume, image and system commands 2016-09-29 07:42:53 -07:00
in.go Fix the incorrect description for NewInStream 2016-10-13 22:33:09 +08:00
out.go Windows: OCI process struct convergence 2016-09-19 10:34:31 -07:00
registry.go Add registry-specific credential helper support 2016-12-01 10:29:00 -08:00
trust.go Move image trust related cli methods into the image package. 2016-09-09 10:50:16 -04:00
utils.go Windows: Prompt fix 2016-12-09 14:27:53 -08:00