Commit Graph

9712 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 0b7aff333b
Dockerfile: update compose to v2.27.1
release notes: https://github.com/docker/compose/releases/tag/v2.27.1

full diff: https://github.com/docker/compose/compare/v2.24.3...v2.27.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-26 11:26:36 +02:00
Sebastiaan van Stijn f0e7e07b8b
Dockerfile: update buildx to v0.14.1
- 0.14.1 release notes: https://github.com/docker/buildx/releases/tag/v0.14.1
- 0.14.0 release notes: https://github.com/docker/buildx/releases/tag/v0.14.0
- 0.13.1 release notes: https://github.com/docker/buildx/releases/tag/v0.13.1
- 0.13.0 release notes: https://github.com/docker/buildx/releases/tag/v0.13.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-26 11:16:57 +02:00
Sebastiaan van Stijn 05905bd922
vendor: github.com/docker/docker-credential-helpers v0.8.2
no changes to vendored code

full diff: https://github.com/docker/docker-credential-helpers/compare/v0.8.1...v0.8.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-23 19:13:17 +02:00
Sebastiaan van Stijn 421e3b5e91
Merge pull request #5077 from thaJeztah/config_error_handling
cli/config: improve handling of errors
2024-05-22 14:39:50 +02:00
Sebastiaan van Stijn dc75e9ed6c
cli/config: do not discard permission errors when loading config-file
When attempting to load a config-file that exists, but is not accessible for
the current user, we should not discard the error.

This patch makes sure that the error is returned by Load(), but does not yet
change LoadDefaultConfigFile, as this requires a change in signature.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-22 10:31:59 +02:00
Sebastiaan van Stijn c80adf4e87
cli/config: TestLoadDefaultConfigFile: check that no warnings are printed
Loading the config should print no warnings on a successful load.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-22 10:31:59 +02:00
Sebastiaan van Stijn de91207b87
cli/config: add test for dangling symlink for config-file
This may need further discussion, but we currently handle dangling
symlinks gracefully, so let's add a test for this, and verify that
we don't replace symlinks with a file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-22 10:31:58 +02:00
Sebastiaan van Stijn 426fb2fd81
cli/config: Load(), LoadDefaultConfigFile(): improve GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-22 10:31:47 +02:00
Sebastiaan van Stijn 57a1180c52
Merge pull request #5084 from thaJeztah/improve_rm_flag_description
run, create: update "--rm" flag description to mention anonymous volumes
2024-05-21 16:26:12 +02:00
Bjorn Neergaard 997cfa699b
Merge pull request #4996 from vvoland/cli-bin-darwin
bake/bin-image-cross: Add darwin
2024-05-21 06:25:30 -06:00
Sebastiaan van Stijn 6d21372dbb
run, create: update "--rm" flag description to mention anonymous volumes
The "--rm" flag deletes both the container and any anonymous volumes
associated with the container when the container exits.

This patch updates the flag description to also mention volumes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-21 13:52:56 +02:00
Paweł Gronowski 49c0e1996a
Merge pull request #5078 from vvoland/hint-no-empty
plugins/hooks: Don't show empty hook messages
2024-05-20 17:57:51 +02:00
Paweł Gronowski 803b980e9d
Merge pull request #5080 from vvoland/vendor-master-adjust-ctx
vendor: github.com/docker/docker master (06e3a49d66fa)
2024-05-20 11:57:27 +02:00
Paweł Gronowski 296a6f5872
plugins/hooks: Don't show empty hooks
Don't show `Next steps:` with no messages at all when plugin returns an
unitialized value of `HookMessage` (zero-initialization sets its type to
NextSteps and empty template).

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-05-20 11:20:39 +02:00
Paweł Gronowski c5dd1d0951
Merge pull request #5079 from cncal/patch-1
docs: fix json syntax error
2024-05-17 15:22:49 +02:00
Sebastiaan van Stijn cbe9469364
Merge pull request #5021 from neersighted/cdi_typos
docs: tidy up CDI docs
2024-05-17 15:06:44 +02:00
Paweł Gronowski 1527d625f3
Plumb context to API callbacks
Signatures of these functions were changed in 80d92fd45007b6395dc2db5f93def3b159dacd7f

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-05-17 14:39:49 +02:00
Paweł Gronowski 3fdf377b66
vendor: github.com/docker/docker master (06e3a49d66fa)
full diff: https://github.com/docker/docker/compare/v26.1.0...06e3a49d66fa

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-05-17 14:31:01 +02:00
cncal 6a4d38c7f2 docs: fix json syntax error
Signed-off-by: cncal <flycalvin@qq.com>
2024-05-17 17:47:44 +08:00
Sebastiaan van Stijn 4445e77025
Merge pull request #5029 from racequite/master
chore: fix function names in comment
2024-05-17 10:11:20 +02:00
Sebastiaan van Stijn ad3bcf8f3d
Merge pull request #5018 from njucjc/remove_dualstack
chore: remove deprecated DualStack field
2024-05-16 15:02:40 +02:00
Christopher Petito 28c5652a09
Merge pull request #5076 from krissetto/update-e2e-engine-version
Updated engine versions used in e2e tests
2024-05-16 13:57:34 +02:00
Christopher Petito ffd57fac12 Updated engine versions in e2e text matrix
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
2024-05-16 11:04:30 +00:00
Sebastiaan van Stijn 0937c8b926
Merge pull request #5074 from vvoland/update-swarmkit
vendor: github.com/moby/swarmkit/v2 master (c1c857e2dca1)
2024-05-15 14:57:00 +02:00
Paweł Gronowski dbf8443668
vendor: github.com/moby/swarmkit/v2 master (c1c857e2dca1)
- full diff: 911c97650f...c1c857e2dc

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-05-15 14:49:56 +02:00
Laura Brehm db8b8099b4
Merge pull request #5051 from laurazard/add-plugin-command-metrics
Add OTel instrumentation to CLI plugins
2024-05-15 01:59:20 +01:00
Laura Brehm 5f4f4f64d3
OTel: implement missing MeterProvider `ForceFlush`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-05-15 00:05:31 +01:00
Laura Brehm f07834d185
OTel: add `command.time` metric to plugin commands
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-05-15 00:05:30 +01:00
Laura Brehm 61fe22f21a
Merge pull request #5067 from krissetto/adjust-otel-utils
Centralize init of Meter/TracerProviders
2024-05-14 16:28:55 +01:00
Christopher Petito 02537eac59 Use funcs on DockerCli to return Meter/TracerProviders, not initialize them. Initialize them during DockerCli struct init
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
2024-05-14 15:23:49 +00:00
Sebastiaan van Stijn 0ad1d55b02
Merge pull request #4997 from dvdksn/doc-vxlan-listen-addr
docs: clarify that --data-path-addr doesn't restrict access
2024-05-13 18:54:43 +02:00
Rob Murray 4758ed0b0d Document the extended '--network' syntax
Support for connecting more than one network using the container run
command was added in v25.0 for API > 1.44 - describe that in the docs.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-05-08 14:13:59 +01:00
Rob Murray e8bfedd266 Fix TestNetworkConnectWithFlags
The test didn't do anything useful...
- Despite its name it used newCreateCommand() instead of
  newConnectCommand() with create flags/options instead of connect.
- There was no fake networkCreateFunc(), so the result of the 'connect'
  wasn't checked.
- The fake networkConnectFunc() was never called, so didn't spot the
  problem.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-05-08 14:13:59 +01:00
Sebastiaan van Stijn 6c70360c79
Merge pull request #5054 from zipperer/master
docstring: typo: settings -> setting
2024-05-08 12:39:05 +02:00
Paweł Gronowski 4f1403bd0f
Merge pull request #5064 from vvoland/update-go
update to go1.21.10
2024-05-08 11:30:45 +02:00
Paweł Gronowski eb99994c75
update to go1.21.10
These minor releases include 2 security fixes following the security policy:

- cmd/go: arbitrary code execution during build on darwin
On Darwin, building a Go module which contains CGO can trigger arbitrary code execution when using the Apple version of ld, due to
usage of the -lto_library flag in a "#cgo LDFLAGS" directive.
Thanks to Juho Forsén of Mattermost for reporting this issue.
This is CVE-2024-24787 and Go issue https://go.dev/issue/67119.

- net: malformed DNS message can cause infinite loop
A malformed DNS message in response to a query can cause the Lookup functions to get stuck in an infinite loop.
Thanks to long-name-let-people-remember-you on GitHub for reporting this issue, and to Mateusz Poliwczak for bringing the issue to
our attention.
This is CVE-2024-24788 and Go issue https://go.dev/issue/66754.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.22.3

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.10+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.9...go1.21.10

**- Description for the changelog**

```markdown changelog
Update Go runtime to 1.21.10
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-05-08 09:50:01 +02:00
Sebastiaan van Stijn 0bdc20ecbe
Merge pull request #5060 from laurazard/fix-hang-ctx
Fix hang when container fails to start
2024-05-07 12:51:30 +02:00
Laura Brehm 8d6e571c03
Add e2e tests for run w/ bad entrypoint
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-05-07 11:22:18 +01: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
Andrew-Zipperer b7e25a4b48 docstring: typo: settings -> setting
Signed-off-by: Andrew Zipperer <zipperer.andrew@gmail.com>
2024-05-06 09:09:28 -05:00
Sebastiaan van Stijn 647ccf3433
Merge pull request #5026 from krissetto/otel-test-stack
otel: simple OTEL collector/Prometheus stack for testing purposes
2024-05-02 10:28:47 +02:00
Sebastiaan van Stijn 2c8a5f7475
Merge pull request #5049 from thaJeztah/codeql_cache
Fix errors encountered by CodeQL
2024-05-01 09:35:47 +02:00
Sebastiaan van Stijn e3216ca64d
go.mod: use SemVer format for go version to assist CodeQL AutoBuild
CodeQL AutoBuild started to produce errors if the `go.mod` does not use
SemVer for the go version; 3a2b0a2feb/go/extractor/diagnostics/diagnostics.go (L512-L525)

Let's give it one.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-30 19:56:36 +02:00
Sebastiaan van Stijn 692c7ee7e8
gha: CodeQL: move go.mod/go.sum symlink earlier to help caching
actions/setup-go was trying to use caching, and produced a warning
because it expects a `go.mod` / `go.sum`;

    Run actions/setup-go@v5
      with:
        go-version: 1.21
        check-latest: false
        token: ***
        cache: true
      env:
        DISABLE_WARN_OUTSIDE_CONTAINER: 1
    Setup go version spec 1.21
    Found in cache @ /opt/hostedtoolcache/go/1.21.9/x64
    Added go to the path
    Successfully set up Go version 1.21
    /opt/hostedtoolcache/go/1.21.9/x64/bin/go env GOMODCACHE
    /opt/hostedtoolcache/go/1.21.9/x64/bin/go env GOCACHE
    /home/runner/go/pkg/mod
    /home/runner/.cache/go-build
    Warning: Restore cache failed: Dependencies file is not found in /home/runner/work/cli/cli. Supported file pattern: go.sum
    go version go1.21.9 linux/amd64

While our regular builds would use a containerised flow, CodeQL's autobuild
does not, and also doesn't seem to use our vendor directory (?) so for this
one it's probably fine to let it use some caching.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-30 19:52:09 +02:00
Christopher Petito e1dcc194e3 OTEL collector/prometheus/aspire-dashboard stack for testing purposes
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
2024-04-30 12:25:19 +00:00
Paweł Gronowski e81b8355b6
Merge pull request #5043 from vvoland/wait-cancel-noerror
waitExitOrRemoved: Handle context cancellation
2024-04-29 17:32:06 +02: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
Alano Terblanche 67aa271410
Merge pull request #5039 from Benehiko/hooks-ctx-wiring
feat: wire ctx into plugin hooks
2024-04-29 14:57:48 +02:00
Sebastiaan van Stijn 57386570a1
Merge pull request #5038 from thaJeztah/nos_environ
cli-plugins: PluginRunCommand: use cmd.Environ instead of os.Environ
2024-04-29 14:23:32 +02:00
Alano Terblanche 1d666b4105
feat: wire ctx into plugin hooks
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2024-04-26 13:03:56 +02:00