Rob Murray
6a2cde6c75
Add option '--ipv4'
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-12-10 15:51:21 +00:00
Rob Murray
5c896c95d0
Docs: emphasise that some options that are for docker0
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-12-10 15:51:21 +00:00
Rob Murray
a5353e55da
Docs: include --fixed-cidr-v6 and --bip6 docker0 options
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-12-10 09:44:59 +00:00
Sebastiaan van Stijn
e554bfef6c
Merge pull request #5662 from laurazard/consistent-attach-check
...
run: correctly handle only STDIN attached
2024-12-09 18:01:45 +01:00
Sebastiaan van Stijn
619ea8e134
Merge pull request #5673 from thaJeztah/bump_engine
...
vendor: github.com/docker/docker 5d72419486fe (master, v28.0.0-dev)
2024-12-09 17:43:27 +01:00
Laura Brehm
7dab597e6d
tests: cleanup comment
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com >
2024-12-09 15:49:21 +00:00
Laura Brehm
30c4637f03
run: don't hang if only attaching STDIN
...
If STDOUT or STDERR are attached and the container exits, the streams
will be closed by the daemon while the container is exiting, causing
the streamer to return an error
https://github.com/docker/cli/blob/61b02e636d2afed778f2e871c3ec1c6adee69ca4/cli/command/container/hijack.go#L53
that gets sent
https://github.com/docker/cli/blob/61b02e636d2afed778f2e871c3ec1c6adee69ca4/cli/command/container/run.go#L278
and received
https://github.com/docker/cli/blob/61b02e636d2afed778f2e871c3ec1c6adee69ca4/cli/command/container/run.go#L225
on `errCh`.
However, if only STDIN is attached, it's not closed (since this is
attached to the user's TTY) when the container exits, so the streamer
doesn't exit and nothing gets sent on `errCh`, meaning the CLI execution
hangs receiving on `errCh` on L231.
Change the logic to receive on both `errCh` and `statusChan` – this way,
if the container exits, we get notified on `statusChan` (even if only
STDIN is attached), and can cancel the streamer and exit.
Signed-off-by: Laura Brehm <laurabrehm@hey.com >
2024-12-09 15:49:20 +00:00
Sebastiaan van Stijn
2eb77f4ede
vendor: github.com/docker/docker 5d72419486fe (master, v28.0.0-dev)
...
full diff: https://github.com/docker/docker/compare/87fbd9cd3b37...5d72419486fef6db1c8765beae6f83a38571b307
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-09 12:41:45 +01:00
Sebastiaan van Stijn
9dfdffa015
Merge pull request #5672 from thaJeztah/bump_protobuf
...
vendor: google.golang.org/protobuf v1.35.2
2024-12-09 12:11:31 +01:00
Sebastiaan van Stijn
395716be3f
Merge pull request #5679 from thaJeztah/remove_use_of_nondistributable_artifacts
...
cli/command/system: don't use "non-distributable-artifacts" fields in tests
2024-12-09 12:05:53 +01:00
Laura Brehm
be6ddae56d
Merge pull request #5671 from thaJeztah/bump_x_deps
2024-12-09 11:49:04 +01:00
Sebastiaan van Stijn
b51a71148f
cli/command/system: don't use "non-distributable-artifacts" fields in tests
...
Nondistributable artifacts are deprecated, and no longer used; we'll be
deprecating these fields, so let's already skip their use.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-07 12:24:59 +01:00
Sebastiaan van Stijn
f50dea6c40
vendor: google.golang.org/protobuf v1.35.2
...
full diff: https://github.com/protocolbuffers/protobuf-go/compare/v1.35.1...v1.35.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-06 22:45:30 +01:00
Sebastiaan van Stijn
9399483f7a
vendor: golang.org/x/net v0.31.0
...
full diff: https://github.com/golang/net/compare/v0.30.0...v0.31.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-06 22:40:39 +01:00
Sebastiaan van Stijn
6751bcc972
vendor: golang.org/x/crypto v0.29.0
...
no changes in vendored code
full diff: https://github.com/golang/crypto/compare/v0.28.0...v0.29.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-06 22:39:54 +01:00
Sebastiaan van Stijn
d41ab7703a
vendor: golang.org/x/term v0.26.0
...
full diff: https://github.com/golang/term/compare/v0.25.0...v0.26.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-06 22:38:55 +01:00
Sebastiaan van Stijn
5972025fae
vendor: golang.org/x/text v0.20.0
...
no changes in vendored code
full diff: https://github.com/golang/text/compare/v0.19.0...v0.20.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-06 22:35:41 +01:00
Sebastiaan van Stijn
feb1e2a34c
vendor: golang.org/x/sync v0.9.0
...
no changes in vendored code
full diff: https://github.com/golang/sync/compare/v0.8.0...v0.9.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-06 22:34:43 +01:00
Sebastiaan van Stijn
4c27c895f2
vendor: golang.org/x/sys v0.27.0
...
full diff: https://github.com/golang/sys/compare/v0.26.0...v0.27.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-06 22:33:47 +01:00
Sebastiaan van Stijn
66dfe6d428
Merge pull request #5664 from akerouanton/gw-priority
...
run, create, connect: add support for gw-priority
2024-12-06 22:20:57 +01:00
Sebastiaan van Stijn
97010d13f3
Merge pull request #5667 from thaJeztah/login_clean
...
cli/command/registry: assorted refactor and test changes
2024-12-06 14:42:22 +01:00
Sebastiaan van Stijn
e7078bf20c
Merge pull request #5668 from thaJeztah/update_go_1.23.4
...
update to go1.23.4
2024-12-04 13:14:52 +01:00
Sebastiaan van Stijn
a1e57ac72d
update to go1.23.4
...
go1.23.4 (released 2024-12-03) includes fixes to the compiler, the runtime,
the trace command, and the syscall package. See the Go 1.23.4 milestone on
our issue tracker for details:
- https://github.com/golang/go/issues?q=milestone%3AGo1.23.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.3...go1.23.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-04 10:33:14 +01:00
Sebastiaan van Stijn
e398d16c04
cli/command/registry: return status only instead of whole response
...
Various functions were passing through the API response as a whole, but
effectively only needed it for a status message (if any). Reduce what's
returned to only the message.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-03 19:04:24 +01:00
Sebastiaan van Stijn
297afb2a2b
cli/command/registry: TestLoginWithCredStoreCreds slight refactor
...
- also check errors that were previously not handled
- use the fakeCLI's buffer instead of creating one manually
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-03 18:42:40 +01:00
Sebastiaan van Stijn
575e373669
cli/command/registry: rename some vars that collided with imports
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-03 18:37:35 +01:00
Albin Kerouanton
d4db289eb5
run, create, connect: add support for gw-priority
...
Signed-off-by: Albin Kerouanton <albinker@gmail.com >
2024-12-03 15:13:08 +01:00
Sebastiaan van Stijn
cf89afb32b
cli/command/registry: storeCredentials: accept configfile as arg
...
This function only needs access to the configfile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-03 13:00:59 +01:00
Sebastiaan van Stijn
b5a00d0b0f
cli/command/registry: loginWithRegistry: use shallower interface
...
This function only needs the API client, not all of the CLI.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-03 12:50:12 +01:00
Sebastiaan van Stijn
13f0d46411
cli/command/registry: don't return creds on error
...
Be more explicit on not returning a response if there was an error;
change some non-exported functions to return a pointer, and return
nil instead.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-12-03 12:48:12 +01:00
Laura Brehm
a3d9fc4941
run: cleanup – remove errCh nil check
...
Now, if running in "detached" mode, we early exit at L222.
Similarly, if `attachContainer` errors out, it returns an error that
gets handled on L190.
As such, `errCh` can never be nil on L231. Remove the nil check.
Signed-off-by: Laura Brehm <laurabrehm@hey.com >
2024-12-02 14:35:30 +00:00
Laura Brehm
446f36ce58
run: cleanup – move "detached" early exit earlier
...
Since everything else after the `apiClient.ContainerStart` block is
under an `if attach` conditional, we can move the "detached" early exit
up.
Signed-off-by: Laura Brehm <laurabrehm@hey.com >
2024-12-02 14:35:29 +00:00
Laura Brehm
8431298824
run: cleanup – use attached where applicable
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com >
2024-12-02 14:34:28 +00:00
Laura Brehm
aee9eebf34
run: return error code when only STDIN attached
...
During a `docker run`, the CLI has some different behavior/output
depending on whether the run is "detached" or not.
In some cases, the CLI is checking whether either `stdin`, `stdout` or
`stderr` are attached, but in other cases we're only checking `stdout`
and `stderr`, which leads to some inconsistencies:
```
$ docker run -a stdout --rm --name test alpine top
[docker kill test]
exit status 137
$ docker run -a stderr --rm --name test alpine top
[docker kill test]
exit status 137
$ docker run -a stdin --rm --name test alpine top
56820d94a89b96889478241ae68920323332c6d4cf9b51ba9340cba01e9e0565
[docker kill test]
[no exit code]
```
Since we're not checking for whether `stdin` is attached when deciding
whether to early exit without receiving on `statusChan`, the `docker run
-a stdin` is falling into the "detached mode" logic, which simply prints
the container ID and doesn't print/return the exit code.
This patch makes the "attached" checks consistent.
Signed-off-by: Laura Brehm <laurabrehm@hey.com >
2024-12-02 14:31:26 +00:00
Laura Brehm
5afa739692
Merge pull request #5660 from thaJeztah/remove_repoinfo_class
2024-12-02 13:51:47 +01:00
Sebastiaan van Stijn
ed9fcf31e6
cli/trust: GetNotaryRepository: remove uses of RepositoryInfo.Class
...
The Class field was added because Docker Hub registry required a special
scope to be set for pulling plugins;
HTTP/1.1 401 Unauthorized
...
Www-Authenticate: Bearer realm="https://auth.docker.io/token ",service="registry.docker.io",scope="repository(plugin):vieux/sshfs:pull",error="insufficient_scope"
This is no longer a requirement, and the field is no longer set.
updates 0ba820ed0b
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2024-11-30 14:44:34 +01:00
Sebastiaan van Stijn
61b02e636d
Merge pull request #5607 from robmry/v6only/host_gateway_ip
...
Docs: host-gateway-ip daemon option IPv4+IPv6
2024-11-29 23:03:48 +01:00
Rob Murray
c629eca890
Put --help before --host in the dockerd manpage
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-11-29 17:10:09 +00:00
Rob Murray
ea84e8f94b
Add --host-gateway to the dockerd manpage
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-11-29 17:10:09 +00:00
Rob Murray
cf88ab074a
Docs: host-gateway-ip daemon option IPv4+IPv6
...
The host-gateway-ip daemon option now accepts two addresses, one
IPv4 and one IPv6.
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-11-29 17:10:09 +00:00
Sebastiaan van Stijn
3be8b8c151
Merge pull request #5651 from vvoland/fix-plugin-paths
...
cli-plugins: Fix searching inaccessible directories
2024-11-29 15:24:54 +01:00
Sebastiaan van Stijn
083495c847
Merge pull request #5598 from robmry/dockerd-cmd-ref-ipffd
...
Add --ip-forward-no-drop to dockerd cmdline ref
2024-11-29 13:40:24 +01:00
Sebastiaan van Stijn
c0a5c68dc7
Merge pull request #5655 from robmry/dockerd-manpage-bip6
...
Add --bip6 to the dockerd manpage
2024-11-29 13:39:02 +01:00
Rob Murray
ae54c9d97f
Add --bip6 to the dockerd manpage
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-11-29 12:23:45 +00:00
Rob Murray
1911dedcf2
Add --ip-filter-forward-drop
...
Added to the dockerd cmdline ref and its manpage.
Signed-off-by: Rob Murray <rob.murray@docker.com >
2024-11-29 12:17:18 +00:00
Laura Brehm
2369935bdb
Merge pull request #5645 from Benehiko/fix-run-ctx
2024-11-29 12:08:51 +01:00
Sebastiaan van Stijn
41fba28661
Merge pull request #5653 from dvdksn/docs-fix-screwy-dockerd-rendering
...
docs: fix janky rendering of toc on docs.docker.com
2024-11-28 17:16:10 +01:00
David Karlsson
0f058041c4
docs: fix janky rendering of toc on docs.docker.com
...
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com >
2024-11-28 15:01:09 +01:00
Paweł Gronowski
fcd94feefb
cli-plugins: Simplify addPluginCandidatesFromDir
...
The returned error is always nil now, so just remove it.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2024-11-28 14:33:49 +01:00
Paweł Gronowski
6de3d71ab6
cli-plugins: Fix searching inaccessible directories
...
Fix a case where one inaccessible plugin search path stops the whole
search and prevents latter paths from being scanned.
Remove a preliminary `Stat` call that verifies whether path is an actual
directory and is accessible.
It's unneeded and doesn't actually check whether the directory can be
listed or not.
`os.ReadDir` will fail in such case anyway, so just attempt to do that
and ignore any encountered error, instead of erroring out the whole
plugin candidate listing.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2024-11-28 14:17:11 +01:00