mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
0ea7b143b0
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> |
||
---|---|---|
.. | ||
testdata | ||
attach.go | ||
cmd.go | ||
commit.go | ||
cp.go | ||
create.go | ||
diff.go | ||
exec.go | ||
exec_test.go | ||
export.go | ||
hijack.go | ||
inspect.go | ||
kill.go | ||
list.go | ||
logs.go | ||
opts.go | ||
opts_test.go | ||
pause.go | ||
port.go | ||
prune.go | ||
ps_test.go | ||
rename.go | ||
restart.go | ||
rm.go | ||
run.go | ||
start.go | ||
stats.go | ||
stats_helpers.go | ||
stats_unit_test.go | ||
stop.go | ||
top.go | ||
tty.go | ||
unpause.go | ||
update.go | ||
utils.go | ||
wait.go |