Sebastiaan van Stijn
053aa376ea
vendor: github.com/moby/moby/api, moby/moby/client master
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-29 23:17:29 +01:00
Sebastiaan van Stijn
63c5254201
remove support for AutoRemove (--rm) on API < 1.30
...
Support for daemon-side auto-remove was added in API v1.25; on older
versions of the daemon, the client was responsible for removing the
container after it exited (see [moby@6dd8e10])
On API versions < 1.30, it used the events API for this purpose, and
would wait for a "die", "detach" or "detroy" events to know the container
exited, and could be removed or (when attached, but without a TTY) to
get the container's exit-status. (see [cli@38591f2]).
API version 1.24 (docker 1.12) is 9 Years old (July 29, 2016), and API
1.30 (docker 17.06) is 8 Years old (Jun 20, 2017), and long EOL. While
technically, a CLI could negotiate API 1.30 or older, this would only
be in cases where either API version negotiation failed, or the version
was explicitly overridden through `DOCKER_API_VERSION` for testing.
Either of those cases would be rare, and not worth the technical complexity
to support. This patch removes support for AutoRemove on API < 1.30.
[moby@6dd8e10]: https://github.com/moby/moby/commit/6dd8e10d6ed7a7371c5c1824ad58c4403a7b3bfd
[cli@38591f2]: https://github.com/docker/cli/commit/38591f20d07795aaef45d400df89ca12f29c603b
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-09-30 18:16:57 +02:00
Sebastiaan van Stijn
b55fed5ef6
vendor: github.com/moby/moby/api v1.52.0-beta.1, client v0.1.0-beta.0
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
Co-authored-by: Austin Vazquez <austin.vazquez@docker.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-09-05 22:41:03 +02:00
Sebastiaan van Stijn
7118f1fb4b
vendor: github.com/moby/moby/api, moby/moby/client 7145e7666b8f (master)
...
full diff:
- https://github.com/docker/docker/compare/api/v1.52.0-alpha.1...7145e7666b8f
- https://github.com/docker/docker/compare/client/v0.1.0-alpha.0...7145e7666b8f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
WIP latest
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-26 20:02:30 +02:00
Sebastiaan van Stijn
644dc16b16
vendor: github.com/docker/docker master (v29.0-dev)
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-07-21 23:04:50 +02:00
Sebastiaan van Stijn
99d4d1f386
cli/command/container: replace uses of deprecated event.Status field
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-06-13 18:18:28 +02:00
Sebastiaan van Stijn
43b840ed93
vendor: github.com/docker/docker a736d0701c41 (master, v27.0.0-dev)
...
full diff: https://github.com/docker/docker/compare/59996a493cfc...a736d0701c418ca262a299c2f59603677d1366b0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-06-10 17:41:09 +02:00
Sebastiaan van Stijn
1a83595c7c
cli/command/container: legacyWaitExitOrRemoved rm intermediate var
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-06-10 16:59:20 +02:00
Laura Brehm
31644d5ea7
Fix hang when container fails to start
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com >
2024-05-07 11:22:17 +01:00
Paweł Gronowski
840016ea05
waitExitOrRemoved: Handle context cancellation
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2024-04-29 16:46:11 +02:00
Sebastiaan van Stijn
8e9aec6904
golangci-lint: revive: enable import-shadowing
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-11-20 19:52:41 +01:00
Sebastiaan van Stijn
a2c9f3c6ce
linting: address else/if/elseif statements found by gocritic
...
cli/command/formatter/tabwriter/tabwriter.go:579:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/connhelper/connhelper.go:43:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch scheme := u.Scheme; scheme {
^
cli/compose/loader/loader.go:666:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
opts/hosts_test.go:173:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli-plugins/manager/candidate_test.go:78:4: ifElseChain: rewrite if-else to switch statement (gocritic)
if tc.err != "" {
^
cli/command/checkpoint/formatter.go:15:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch source {
^
cli/command/image/formatter_history.go:25:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch source {
^
cli/command/service/scale.go:107:2: ifElseChain: rewrite if-else to switch statement (gocritic)
if serviceMode.Replicated != nil {
^
cli/command/service/update.go:804:9: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/service/update.go:222:2: ifElseChain: rewrite if-else to switch statement (gocritic)
if sendAuth {
^
cli/command/container/formatter_diff.go:17:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch source {
^
cli/command/container/start.go:79:2: ifElseChain: rewrite if-else to switch statement (gocritic)
if opts.Attach || opts.OpenStdin {
^
cli/command/container/utils.go:84:11: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/container/exec_test.go:200:11: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/container/logs_test.go:52:11: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/container/opts_test.go:1014:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/system/info.go:297:7: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch o.Key {
^
cli/command/system/version.go:164:4: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch component.Name {
^
cli/command/system/info_test.go:478:4: ifElseChain: rewrite if-else to switch statement (gocritic)
if tc.expectedOut != "" {
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-11-20 16:02:16 +01:00
Sebastiaan van Stijn
46d0ba20f1
vendor: github.com/docker/docker cdb3f9fb8dca (v25.0.0-dev)
...
full diff: https://github.com/docker/docker/compare/d3afa80b96bf...cdb3f9fb8dca613a06643090dd9659a0ae46f144
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-10-13 22:09:04 +02:00
Sebastiaan van Stijn
7a89e897ea
cli/command/container: waitExitOrRemoved: take APIClient as argument
...
It only needs the API client, not the whole DockerCLI.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-07-24 09:54:11 +02:00
Kir Kolyshkin
6f8070deb2
Switch from x/net/context to context
...
Since go 1.7, "context" is a standard package. Since go 1.9,
x/net/context merely provides some types aliased to those in
the standard context package.
The changes were performed by the following script:
for f in $(git ls-files \*.go | grep -v ^vendor/); do
sed -i 's|golang.org/x/net/context|context|' $f
goimports -w $f
for i in 1 2; do
awk '/^$/ {e=1; next;}
/\t"context"$/ {e=0;}
{if (e) {print ""; e=0}; print;}' < $f > $f.new && \
mv $f.new $f
goimports -w $f
done
done
[v2: do awk/goimports fixup twice]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com >
2018-05-11 16:49:43 -07:00
Kir Kolyshkin
8471742a8a
Show container wait error
...
If container wait has failed, show an error from the engine
and return an appropriate exit code.
This requires engine changes from https://github.com/moby/moby/pull/34999
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com >
2017-12-15 14:15:30 -08:00
Daniel Nephin
c0d004f7cf
Update gometalinter
...
and enable the new WarnUnmatchedDirective to warn if a nolint is unnecessary.
remove some unnecessary nolint
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-10-26 12:21:02 -04:00
Simon Ferquel
a0113c3a44
updated vendoring
...
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com >
2017-09-01 19:41:06 -04:00
Daniel Nephin
e7f90b6b38
Reduce complexity in cli/command/container
...
Add tests for exec and cleanup existing tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-08-29 19:25:50 -04:00
Shukui Yang
e8cc2cf760
Replace command.DockerCli to command.Cli in docker attach/exec command
...
Signed-off-by: Shukui Yang <yangshukui@huawei.com >
2017-06-08 07:03:52 +08:00
Josh Hawn
38591f20d0
Update CLI package with containerWait changes
...
The docker/client package was updated to support the updated Container
Wait API functionality. The run and start commands have been updated to
use the new wait features.
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com > (github: jlhawn)
2017-05-17 11:44:54 -07:00
Gaetan de Villele
295140edf2
cli: gofmt + goimports
...
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com >
2017-05-08 10:51:30 -07:00
Tibor Vass
57230a7212
rm client and vendor it instead
...
Signed-off-by: Tibor Vass <tibor@docker.com >
2017-05-08 10:33:56 -07:00
Daniel Nephin
10641c2aae
Update imports.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-04-17 18:07:56 -04:00
Daniel Nephin
1630fc40f8
Import docker/docker/cli
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2017-04-17 17:40:59 -04:00