Commit Graph

10455 Commits

Author SHA1 Message Date
eb5c507cd1 docs: dockerd: --oom-score-adj flag
This flag was deprecated in docker v24.0, and no longer functional
since v25.0; fully removed in v26.0, so we can remove the docs
for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-03 20:20:47 +01:00
5be685e647 Merge pull request #5718 from thaJeztah/remove_isolation_hint
docs, man: remove confusing example for "--isolation"
2025-01-03 14:48:51 +01:00
d1c76538e9 Merge pull request #5719 from dmcgowan/build-context-io-copy
Use io.copy for build context compression
2025-01-03 13:51:50 +01:00
7b37f30da2 Use io.copy for build context compression
The use of pools here is unnecessary and creates a code dependency on
moby library which will move to internal.

The pool does not provide any value here since it is only done for a
single operation and unlikely performed in alongside other operations
which are re-using the buffers many times between garbage collections.

Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-03 13:45:38 +01:00
7138107e87 Merge pull request #5716 from thaJeztah/vendor_moby_master
vendor: github.com/docker/docker 6f6c3b921180 (master, v28.0.0-dev)
2025-01-02 12:32:32 +01:00
7b7a4c020e docs, man: remove confusing example for "--isolation"
This snippet was added in [docker@38ec5d8][1]. The intent was to indicate
that an empty value is equivalent to passing "default" as value. However,
passing the `--isolation` flag _without a value_ (i.e., no `=` specified)
will fail in many cases, as any string after it will be parsed as value
(e.g. `docker run --isolation busybox` would consider `busybox` as value).

This patch removes these lines as they add more confusion than addressing.

[1]: 38ec5d86a3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-02 12:15:08 +01:00
25f02bc044 vendor: github.com/docker/docker 6f6c3b921180 (master, v28.0.0-dev)
full diff: a72026acbb...6f6c3b9211

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-01 16:24:28 +01:00
07aca45f5e Merge pull request #5715 from dmcgowan/fix-container-cp-test
Fix container cp test to separate source and destination
2024-12-27 15:33:39 +01:00
8c0cb30515 Fix cp test to separate source and destination
Currently the cp will tar from the same directory it will untar into
simultaneously. There is a race between reading the file and truncating
the file for write, however, the race will not show up with a large
enough buffer on the tar side if buffered before the copy begins.

Also removes the unnecessary deferred removal, the removal is handled by
cleanup and respects the no cleanup env.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-12-26 16:30:45 -08:00
3b49deb8fc Merge pull request #5711 from thaJeztah/bump_engine_step1
vendor: github.com/docker/docker a72026acbbdf (master, v28.0.0-dev)
2024-12-23 14:05:49 +01:00
c8c47b1dd5 golangci-lint: depguard: prevent uses of pkg/system
We no longer use this package; add a linter rule to prevent
accidentally importing it again.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-23 13:51:16 +01:00
76ec0ea2eb vendor: github.com/docker/docker a72026acbbdf (master, v28.0.0-dev)
removes uses of pkg/system

full diff: ad6929339a...a72026acbb

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-23 13:50:59 +01:00
1a9d19131d Merge pull request #5710 from thaJeztah/TestRunCopyFromContainerToFilesystem_simplify
TestRunCopyFromContainerToFilesystem: use Tar without options
2024-12-23 12:30:37 +00:00
a8f83d5d99 TestRunCopyFromContainerToFilesystem: use Tar without options
Just a minor cleanup; use archive.Tar as we're not using other
options here.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-23 13:23:39 +01:00
7e73609bb6 Merge pull request #5709 from thaJeztah/sync_depguard
golangci-lint: sync some depguard settings with moby/moby
2024-12-23 12:07:29 +00:00
0c04dc05ba golangci-lint: sync some depguard settings with moby/moby
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-21 15:08:23 +01:00
45648e8e0e Merge pull request #5703 from thaJeztah/bump_engine
vendor: github.com/docker/docker ad6929339acd (master, v28.0.0-dev)
2024-12-20 18:48:35 +01:00
cc65127cb0 vendor: github.com/docker/docker ad6929339acd (master, v28.0.0-dev)
full diff: b249c5ebd2...ad6929339a

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-20 17:58:34 +01:00
46cf6661c9 Merge pull request #5705 from thaJeztah/bump_x_net
vendor: golang.org/x/net v0.33.0
2024-12-20 17:58:02 +01:00
6f47bce41c vendor: golang.org/x/net v0.33.0
contains a fix for CVE-2024-45338 / https://go.dev/issue/70906,
but it doesn't affect our codebase:

    govulncheck -show=verbose ./...
    Scanning your code and 1260 packages across 211 dependent modules for known vulnerabilities...
    ...
    Vulnerability #1: GO-2024-3333
        Non-linear parsing of case-insensitive content in golang.org/x/net/html
      More info: https://pkg.go.dev/vuln/GO-2024-3333
      Module: golang.org/x/net
        Found in: golang.org/x/net@v0.32.0
        Fixed in: golang.org/x/net@v0.33.0

    Your code is affected by 0 vulnerabilities.
    This scan also found 0 vulnerabilities in packages you import and 1
    vulnerability in modules you require, but your code doesn't appear to call these
    vulnerabilities.

full diff: https://github.com/golang/net/compare/v0.32.0...v0.33.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-20 17:12:38 +01:00
2f67b2f3ff Merge pull request #5684 from thaJeztah/gofumpt_go_version
Makefile: use go1.22 semantics for gofumpt
2024-12-18 13:41:08 +01:00
3723f0bde7 Merge pull request #5682 from thaJeztah/bump_golangci_lint
update golangci-lint to v1.62.2
2024-12-18 10:23:34 +00:00
ecd162228f Merge pull request #5695 from thaJeztah/fix_TestEventsFormat
cli/command/system: TestEventsFormat: set cmd.Args to prevent test-failures
2024-12-17 13:02:53 +01:00
0dd6aa8cc3 Merge pull request #5702 from thaJeztah/bump_x_deps
vendor: update golang.org/x/ dependencies for docker/docker
2024-12-17 13:02:23 +01:00
83156e6627 vendor: golang.org/x/net v0.32.0
go maintainers annnounced a security release for this module; this patch
already brings it up to the current version in case the security issue
affects us.

full diff: https://github.com/golang/net/compare/v0.31.0...v0.32.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 23:01:20 +01:00
450f6b9955 vendor: golang.org/x/crypto v0.31.0
update to the latest version of this dependency, which has a fix for a
authorization bypass in the ssh package. We don't use this functionality,
so there's no need to backport this change (other than de-noising false positives).

This is CVE-2024-45337 and Go issue https://go.dev/issue/70779.

full diff: https://github.com/golang/crypto/compare/v0.29.0...v0.31.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 22:59:33 +01:00
b74302eb50 vendor: golang.org/x/text v0.21.0
no changes in vendored code

full diff: https://github.com/golang/text/compare/v0.20.0...v0.21.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 22:58:24 +01:00
cb2e35286c vendor: golang.org/x/sync v0.10.0
no changes in vendored code

full diff: https://github.com/golang/sync/compare/v0.9.0...v0.10.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 22:57:35 +01:00
e56b665d81 vendor: golang.org/x/sys v0.28.0
full diff: https://github.com/golang/sys/compare/v0.27.0...v0.28.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 22:56:51 +01:00
8454e012ca Merge pull request #5697 from thaJeztah/remove_system_isabs
cli/command/container: use local copy of pkg/system.IsAbs
2024-12-16 17:46:27 +01:00
7dd31686e9 Merge pull request #5696 from thaJeztah/remove_use_of_netfilter_fields
cli/command/system: remove BridgeNfIptables, BridgeNfIp6tables in tests
2024-12-16 16:25:01 +01:00
1eda498786 cli/command/container: use local copy of pkg/system.IsAbs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 10:22:35 +01:00
ffe0354c2c cli/command/system: remove BridgeNfIptables, BridgeNfIp6tables in tests
This is a follow-up to 55e404e7a8, which
removed some warnings related to these fields.

These fields in the /info response were used to warn users if netfiltering
was not enabled on the host when the daemon started.  Starting with
[moby@db25b0d], detecting whether netfiltering  is enabled now
[happens when needed][1], making the state that's detected at startup
irrelevant.

These fields will therefore be deprecated in future, but we can start
removing their use in tests.

[moby@db25b0d]: db25b0dcd0
[1]: 944e403502/libnetwork/drivers/bridge/setup_bridgenetfiltering.go (L16-L77)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-14 15:29:33 +01:00
73ff81b651 cli/command/system: TestEventsFormat: set cmd.Args to prevent test-failures
When running the tests with options set, such as `-update` for updating
"golden" files, this test would pick up test arguments because no arguments
were set to invoke the command;

    go test . -update
    Error: unknown shorthand flag: 'u' in -update
    Usage:
      events [OPTIONS] [flags]

    Flags:
      -f, --filter filter   Filter output based on conditions provided
          --format string   Format output using a custom template:
                            'json':             Print in JSON format
                            'TEMPLATE':         Print output using the given Go template.
                            Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
      -h, --help            help for events
          --since string    Show all events created since timestamp
          --until string    Stream events until this timestamp

    --- FAIL: TestEventsFormat (0.00s)
        --- FAIL: TestEventsFormat/default (0.00s)
            events_test.go:75: assertion failed: error is not nil: unknown shorthand flag: 'u' in -update
        --- FAIL: TestEventsFormat/json (0.00s)
            events_test.go:75: assertion failed: error is not nil: unknown shorthand flag: 'u' in -update
        --- FAIL: TestEventsFormat/json_template (0.00s)
            events_test.go:75: assertion failed: error is not nil: unknown shorthand flag: 'u' in -update
        --- FAIL: TestEventsFormat/json_action (0.00s)
            events_test.go:75: assertion failed: error is not nil: unknown shorthand flag: 'u' in -update

This patch:

- changes the test to use command-arguments instead of manually setting the
  flag options; this also adds test-coverage for parsing actual command arguments.
- discards stdout/stderr of the command to prevent noise in test output

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-14 13:46:53 +01:00
91d097e70b Merge pull request #5683 from thaJeztah/bump_xx
update xx to v1.6.1 for compatibility with alpine 3.21
2024-12-13 14:38:36 +01:00
5b36e1b34a Merge pull request #5691 from thaJeztah/remove_netfilter_warnings
cli/command/system: remove netfilter warnings from tests
2024-12-13 13:11:14 +01:00
55e404e7a8 cli/command/system: remove netfilter warnings from tests
These warnings will no longer be returned by the daemon, so remove
them from the tests as well to make them more representative of
reality.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-13 10:29:01 +01:00
4c2a184aaf Merge pull request #5689 from thaJeztah/bump_gomd2man
update go-md2man to v2.0.5
2024-12-13 02:01:07 +01:00
eaa8b5716d update go-md2man to v2.0.5
full diff: https://github.com/cpuguy83/go-md2man/compare/v2.0.4...v2.0.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-13 01:21:51 +01:00
2080e09905 Merge pull request #5599 from robmry/option_ipv4
Add option --ipv4
2024-12-12 15:10:48 +00:00
b8fd205178 Makefile: use go1.22 semantics for gofumpt
gofumpt defaults to using the go version from go.mod, but as we don't
have one, we need to set it explicitly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 12:16:56 +01:00
6a2cde6c75 Add option '--ipv4'
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-12-10 15:51:21 +00:00
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
26526f9970 Merge pull request #5674 from thaJeztah/registry_trimname
registry/client: remove uses of APIEndpoint.TrimHostName
2024-12-10 12:28:12 +01:00
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
1e51ae7af2 update xx to v1.6.1 for compatibility with alpine 3.21
This fixes compatibility with alpine 3.21

- Fix additional possible `xx-cc`/`xx-cargo` compatibility issue with Alpine 3.21
- Support for Alpine 3.21
- Fix `xx-verify` with `file` 5.46+
- Fix possible error taking lock in `xx-apk` in latest Alpine without `coreutils`

full diff: https://github.com/tonistiigi/xx/compare/v1.5.0...v1.6.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-10 10:12:58 +01:00
b39f482874 update golangci-lint to v1.62.2
full diff: https://github.com/golangci/golangci-lint/compare/v1.62.0...v1.62.2
changelog: https://golangci-lint.run/product/changelog/#v1622

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-09 22:36:45 +01:00
2a5ac8f5ab vendor: github.com/docker/docker b249c5ebd214 (master, v28.0.0-dev)
full diff: 5d72419486...b249c5ebd2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-09 21:56:05 +01:00
afab765014 registry/client: remove uses of APIEndpoint.TrimHostName
This field was added in 19515a7ad8,
but looks to be always set for endpoints used, so we can trim remote names
unconditionally.

This option was added for possible future expansion, allowing registry-
mirrors to get the full reference of the image (including domain-name),
for them to host a mirror for multiple upstreams on the same registry.

That approach will unlikely be implemented, and containerd has a different
approach for this, where the reference to the original registry is passed
through a query parameter instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-09 21:51:02 +01:00
e554bfef6c Merge pull request #5662 from laurazard/consistent-attach-check
run: correctly handle only STDIN attached
2024-12-09 18:01:45 +01:00