5039eee77f
vendor: github.com/moby/moby/api master, moby/client master
...
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-11-06 17:02:53 -06:00
4a608069a7
vendor: github.com/moby/moby/api, moby/moby/client master
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-27 20:26:27 +01:00
056e314645
vendor: github.com/moby/moby/api, moby/moby/client master
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-25 00:48:49 +02:00
4f7c07cfc2
update local code for updated modules
...
Some tests had to be skipped as there's some issues to address, and
some of the result-types cannot be mocked / stubbed.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-24 10:28:54 +02:00
c5cbb3e648
vendor: github.com/moby/moby/api, github.com/moby/moby/client master
...
full diffs:
- https://github.com/moby/moby/compare/api/v1.52.0-beta.1...e98849831fc4e35bdc09ed31b85f91caa87a0103
- https://github.com/moby/moby/compare/client/v0.1.0-beta.0...e98849831fc4e35bdc09ed31b85f91caa87a0103
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-09-23 21:11:17 +02:00
9fd71c8347
cli/command: rename vars for consistency and prevent shadowing
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-23 03:04:36 +02:00
38595fecb6
Unexport container commands
...
This patch deprecates exported container commands and moves the
implementation details to an unexported function.
Commands that are affected include:
- container.NewRunCommand
- container.NewExecCommand
- container.NewPsCommand
- container.NewContainerCommand
- container.NewAttachCommand
- container.NewCommitCommand
- container.NewCopyCommand
- container.NewCreateCommand
- container.NewDiffCommand
- container.NewExportCommand
- container.NewKillCommand
- container.NewLogsCommand
- container.NewPauseCommand
- container.NewPortCommand
- container.NewRenameCommand
- container.NewRestartCommand
- container.NewRmCommand
- container.NewStartCommand
- container.NewStatsCommand
- container.NewStopCommand
- container.NewTopCommand
- container.NewUnpauseCommand
- container.NewUpdateCommand
- container.NewWaitCommand
- container.NewPruneCommand
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com >
2025-08-19 11:12:19 +02:00
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
50da0ad9df
cli/command/container: remove use of ExecOptions.Detach as intermediate
...
This field was added in [moby@5130fe5d38837302e], which
added it for use as intermediate struct when parsing CLI flags (through
`runconfig.ParseExec`) in [moby@c786a8ee5e9db8f5f].
Commit [moby@9d9dff3d0d9e92adf] rewrote the CLI to use
Cobra, and as part of this introduced a separate `execOptions` type in
`api/client/container`, however the ExecOptions.Detach field was still
used as intermediate field to store the flag's value.
Given that the client doesn't use this field, let's remove its use to
prevent giving the impression that it's used anywhere.
[moby@5130fe5d38837302e]: 5130fe5d38
[moby@c786a8ee5e9db8f5f]: c786a8ee5e
[moby@9d9dff3d0d9e92adf]: 9d9dff3d0d
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-06-17 12:53:44 +02:00
c6a7f9a646
vendor: github.com/docker/docker b570831cc3a3 (master, v28.0.0-rc.2)
...
full diff: https://github.com/docker/docker/compare/v28.0.0-rc.1...b570831cc3a3fcfe4edc96af4c249199b019c7dd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-11 18:06:55 +01:00
5a99ea9ad4
cli/command/container: remove uses of pkg/errors in tests
...
While there may be reasons to keep pkg/errors in production code,
we don't need them for these tests.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-01 15:59:57 +01:00
b194274beb
replace uses of deprecated API types
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-07-04 15:22:18 +02:00
d1cb7d41c2
cli/command: Don't copy fakeClient
...
The embedded `client.Client` has mutexes and it shouldn't be copied.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2024-06-20 14:59:38 +02:00
43b840ed93
vendor: github.com/docker/docker a736d0701c41 (master, v27.0.0-dev)
...
full diff: 59996a493c...a736d0701c
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-06-10 17:41:09 +02:00
5400a48aaf
Plumb contexts through commands
...
This is to prepare for otel support.
Signed-off-by: Brian Goff <cpuguy83@gmail.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-12-12 22:30:16 +01:00
8e9aec6904
golangci-lint: revive: enable import-shadowing
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-11-20 19:52:41 +01:00
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
a2ec50a461
make container an explicit, required parameter
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com >
2023-11-08 14:32:55 +01:00
a4abe42cbd
make runAttach public and allow passing context
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com >
2023-11-08 14:24:58 +01:00
1da95ff6aa
format code with gofumpt
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2022-09-30 11:59:11 +02:00
e946bf0804
cli/command/container: remove deprecated io/ioutil
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2022-02-25 15:36:23 +01:00
2d268392d1
publish RunExec for use by docker/compose
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com >
2022-02-24 16:31:24 +01:00
dfb39e9e5f
Fix Typos
...
This commit fixes spelling mistakes (typos) at a few places in the codebase.
Signed-off-by: Amey Shrivastava <72866602+AmeyShrivastava@users.noreply.github.com >
2021-12-20 01:49:19 +05:30
a6cfbd2351
Added env-file flag to docker exec
...
Signed-off-by: Brian Wieder <brian@4wieders.com >
2020-06-29 18:32:44 -04:00
719169db63
Replace deprecated Cobra command.SetOutput() with command.SetOut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2020-05-07 14:25:59 +02:00
2c0e93063b
bump gotest.tools v3.0.1 for compatibility with Go 1.14
...
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2020-02-23 00:28:55 +01:00
2c4de4fb5e
Update tests to use gotest.tools 👼
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
2018-06-08 18:24:26 +02:00
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
681c921528
Remove testutil
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2018-03-06 14:38:35 -05:00
5155cda716
Post migration fixes
...
Fix tests that failed when using cmp.Compare()
internal/test/testutil/assert
InDelta
Fix DeepEqual with kube metav1.Time
Convert some ErrorContains to assert
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2018-03-05 19:41:17 -05:00
39c2ca57c1
Automated migration
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2018-03-05 19:41:17 -05:00
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
846a31aa50
Use new internal testutil.ErrorContains()
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-08-22 10:14:25 -04:00
b3f843afe2
Move internal/test package out of cli.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-08-22 10:14:25 -04:00
3da0cbfdd1
Remove unnecessary use of SetConfigfile
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-11 14:49:30 -04:00
69b142b52a
Update FakeCli to remove duplication in tests.
...
Use byte buffers by default, since that is what is done most of the time.
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-11 14:49:30 -04:00
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
e3f677794a
Add gometalinter to CI
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-05-02 17:15:56 -04:00
1630fc40f8
Import docker/docker/cli
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2017-04-17 17:40:59 -04:00