Albin Kerouanton
539f6de682
Merge pull request #5887 from thaJeztah/gha_bump_ubuntu
...
gha: validate-pr: update to ubuntu 24.04
2025-03-04 17:39:16 +01:00
Sebastiaan van Stijn
cdc2cdc2a8
gha: validate-pr: update to ubuntu 24.04
...
Github is phasing out Ubuntu 20.04, and currently is doing
brownouts; https://github.com/actions/runner-images/issues/11101
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-04 17:00:14 +01:00
Sebastiaan van Stijn
d962a90517
Merge pull request #5882 from thaJeztah/regclient_cleanup
...
cli/registry/client: remove unused types, and deprecate RepoNameForReference
2025-03-04 14:00:55 +01:00
Sebastiaan van Stijn
6f46cd2f4b
cli/registry/client: deprecate RepoNameForReference
...
This function was added in 02719bdbb5 , and
used newDefaultRepositoryEndpoint to get repository info for the given
image-reference.
newDefaultRepositoryEndpoint uses registry.ParseRepositoryInfo under the
hood, but the only information used from the result was the Name field,
which is set using `reference.TrimNamed(name)`. The possible error returned
was based on the domain-name of the image, and only checked for the domain
to not start, or end with a hyphen ("-").
This patch removes the use of RepoNameForReference, deprecates it, and
inlines the code used by it.
There are no known consumers of this function, so we can consider removing
it in the first possible release after this (which can be a minor release).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-03 15:48:06 +01:00
Sebastiaan van Stijn
1a165fd535
cli/registry/client: un-export ErrHTTPProto
...
This type was added in 02719bdbb5 , but was
never used outside of the package itself. This patch un-exports it.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-03 15:32:58 +01:00
Sebastiaan van Stijn
293bbb44a0
cli/registry/client: remove unused PutManifestOptions
...
This type was added in 02719bdbb5 , but was
never used;
git rev-parse --verify HEAD
02719bdbb5
git grep 'PutManifestOptions'
cli/registry/client/client.go:// PutManifestOptions is the data sent to push a manifest
cli/registry/client/client.go:type PutManifestOptions struct {
This patch removes it, because it's not used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-03 15:22:42 +01:00
Sebastiaan van Stijn
43a2fcf5d7
Merge pull request #5880 from thaJeztah/registry_decouple_trust
...
cli/registry/client: remove dependency on trust / notary
2025-03-03 12:49:54 +01:00
Sebastiaan van Stijn
e3da0cc584
cli/registry/client: remove dependency on trust / notary
...
The client was only using the Actions consts, but the trust package
also has a dependency on notary. Remove the import to prevent Notary
becoming a dependency for uses of the cli code.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-03 12:19:20 +01:00
Sebastiaan van Stijn
076ec3b56e
Merge pull request #5878 from thaJeztah/trust_cleans
...
Assorted cleanups to reduce trust / notary imports
2025-03-03 12:18:47 +01:00
Sebastiaan van Stijn
124716ba6b
Merge pull request #5879 from thaJeztah/google_uuid
...
cli/command: remove dependency on distribution/uuid
2025-03-03 12:18:19 +01:00
Sebastiaan van Stijn
fda7da2303
cli/command: remove dependency on distribution/uuid
...
This uuid package was introduced in 89db01ef97 ,
but we want to reduce dependency on the old docker/distribution module.
Replace it with google/uuid, which is a commonly used module for this
and already a dependency.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-03 11:41:17 +01:00
Sebastiaan van Stijn
3f154adf70
Merge pull request #5877 from thaJeztah/remove_redundant_ParseRepositoryInfo
...
cli/command/manifest: remove redundant uses of ParseRepositoryInfo
2025-03-03 11:36:16 +01:00
Sebastiaan van Stijn
c7072a885d
cli/command/image: rename vars that shadowed type
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:38 +01:00
Sebastiaan van Stijn
7a6270d190
cli/command/image: move AddTargetToAllSignableRoles to cli/trust
...
This utility was shared between the "image" and "trust" packages, and a
shallow wrapper around features in the cli/trust package. Move it there
instead and rename it to `trust.AddToAllSignableRoles`.
There are no known external consumers of this utility, so skipping a
deprecation.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:38 +01:00
Sebastiaan van Stijn
d95385057f
cli/command/trust: use gotest.tools in tests
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:37 +01:00
Sebastiaan van Stijn
e6382db10e
cli/command/image: move trust unit-tests to trust package
...
These tests were not testing functionality that was implemented
in the image package. Move them to the trust package, where
they belong.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:37 +01:00
Sebastiaan van Stijn
55bc30a784
cli/command/image: use t.SetEnv in trust tests
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:37 +01:00
Sebastiaan van Stijn
049f84c94d
cli/command/image: remove TestAddTargetToAllSignableRolesError
...
This test was only testing trust.GetSignableRoles to return an error
if it's offline, which was duplicating the [TestGetSignableRolesError]
test in the cli/trust package.
[TestGetSignableRolesError]: https://github.com/docker/cli/blob/fe0a8d27912dc6fddc60cedcd35bbef27b776355/cli/trust/trust_test.go#L49-L55
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:37 +01:00
Sebastiaan van Stijn
791bdf7b3c
cli/command/trust: add testPassRetriever helper
...
Add a basic helper to provide the equivalent of passphrase.ConstantRetriever
with a fixed passphrase for testing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:32 +01:00
Sebastiaan van Stijn
1d8f87a2fb
cli/command/trust: remove TestGetSignableRolesForTargetAndRemoveError
...
This test was only testing trust.GetSignableRoles to return an error
if it's offline, which was duplicating the [TestGetSignableRolesError]
test.
[TestGetSignableRolesError]: https://github.com/docker/cli/blob/fe0a8d27912dc6fddc60cedcd35bbef27b776355/cli/trust/trust_test.go#L49-L55
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:04 +01:00
Sebastiaan van Stijn
d4217eb205
cli/command/trust: remove TestGetOrGenerateNotaryKeyAndInitRepo
...
This test was only testing trust.GetSignableRoles to return an error
if it's offline, which was duplicating the [TestGetSignableRolesError]
test.
[TestGetSignableRolesError]: https://github.com/docker/cli/blob/fe0a8d27912dc6fddc60cedcd35bbef27b776355/cli/trust/trust_test.go#L49-L55
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:04 +01:00
Sebastiaan van Stijn
dd617b1464
cli/command/trust: remove unused passphrase-retriever from test
...
The test only validates that an error is produced because the notary
server is offline, and does not sent a passphrase.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:16:04 +01:00
Sebastiaan van Stijn
eae4c38023
internal/test/notary: add testPassRetriever helper
...
Add a basic helper to provide the equivalent of passphrase.ConstantRetriever
with a fixed passphrase for testing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 14:15:57 +01:00
Sebastiaan van Stijn
eb82fe87a5
cli/trust: make NotaryServer a const
...
This var used to be vendored from github.com/docker/docker/registry, but was
removed there, and made a local var in a1cbaa827b .
It is (and should never be) modified, so let's change it into a const.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-02 12:42:13 +01:00
Sebastiaan van Stijn
55a83aff23
cli/command/manifest: remove redundant uses of ParseRepositoryInfo
...
[ParseRepositoryInfo] parses an image reference and returns information
about the Repository and the registry. As part of this, it validates if
the registry's hostname is considered valid using [ValidateIndexName],
as well as normalizing the image reference to strip tags and digests
using [reference.TrimNamed].
ValidateIndexName only provides very limited value; the only validation
happening is to check for the hostname to not start, or end with a hyphen.
The cli/command/manifest package used ParseRepositoryInfo in various
locations where only the repository name was used (i.e., the result
of `reference.TrimNamed` on the given reference), and in one location
only used it to validate the registry name.
For buildPushRequest, the call was fully redundant, as [RepoNameForReference]
was used on the result, calling [newDefaultRepositoryEndpoint], which
uses ParseRepositoryInfo internally, so we were only repeating that work.
This patch removes uses of ParseRepositoryInfo in those places, and instead
calling [reference.TrimNamed] directly.
[ParseRepositoryInfo]: https://github.com/moby/moby/blob/41f781fab3cae181cc9be3ec93cd91b99466fa84/registry/config.go#L375-L381
[ValidateIndexName]: https://github.com/moby/moby/blob/41f781fab3cae181cc9be3ec93cd91b99466fa84/registry/config.go#L288-L299
[reference.TrimNamed]: https://github.com/moby/moby/blob/41f781fab3cae181cc9be3ec93cd91b99466fa84/registry/config.go#L369
[RepoNameForReference]: https://github.com/docker/cli/blob/fe0a8d27912dc6fddc60cedcd35bbef27b776355/cli/registry/client/endpoint.go#L107-L110
[newDefaultRepositoryEndpoint]: https://github.com/docker/cli/blob/fe0a8d27912dc6fddc60cedcd35bbef27b776355/cli/registry/client/endpoint.go#L33-L38
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-03-01 15:40:29 +01:00
Sebastiaan van Stijn
fe0a8d2791
Merge pull request #5842 from jsternberg/otel-resource-attributes-merge
...
cli-plugins: merge OTEL_RESOURCE_ATTRIBUTES environment variable
2025-02-28 10:45:17 +01:00
Sebastiaan van Stijn
b414752ef8
Merge pull request #5851 from thaJeztah/err_handle_explicit
...
explicitly handle errors when wrapping them
2025-02-26 16:23:35 +01:00
Sebastiaan van Stijn
7b78eabcab
Merge pull request #5872 from vvoland/vendor-docker
...
vendor: github.com/docker/docker v28.0.1
2025-02-26 15:40:13 +01:00
Paweł Gronowski
9e997a57fa
vendor: github.com/docker/docker v28.0.1
...
full diff: https://github.com/docker/docker/compare/af898abe4466...v28.0.1
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-02-26 15:32:31 +01:00
Sebastiaan van Stijn
068a01ea94
Merge pull request #5870 from thaJeztah/carry_5855
...
build / prepare (push) Has been cancelled
build / build (push) Has been cancelled
build / bin-image (push) Has been cancelled
build / prepare-plugins (push) Has been cancelled
build / plugins (push) Has been cancelled
codeql / codeql (push) Has been cancelled
e2e / e2e (alpine, 23, connhelper-ssh) (push) Has been cancelled
e2e / e2e (alpine, 23, experimental) (push) Has been cancelled
e2e / e2e (alpine, 23, non-experimental) (push) Has been cancelled
e2e / e2e (alpine, 26, connhelper-ssh) (push) Has been cancelled
e2e / e2e (alpine, 26, experimental) (push) Has been cancelled
e2e / e2e (alpine, 26, non-experimental) (push) Has been cancelled
e2e / e2e (alpine, 27, connhelper-ssh) (push) Has been cancelled
e2e / e2e (alpine, 27, experimental) (push) Has been cancelled
e2e / e2e (alpine, 27, non-experimental) (push) Has been cancelled
e2e / e2e (alpine, 28, connhelper-ssh) (push) Has been cancelled
e2e / e2e (alpine, 28, experimental) (push) Has been cancelled
e2e / e2e (alpine, 28, non-experimental) (push) Has been cancelled
e2e / e2e (debian, 23, connhelper-ssh) (push) Has been cancelled
e2e / e2e (debian, 23, experimental) (push) Has been cancelled
e2e / e2e (debian, 23, non-experimental) (push) Has been cancelled
e2e / e2e (debian, 26, connhelper-ssh) (push) Has been cancelled
e2e / e2e (debian, 26, experimental) (push) Has been cancelled
e2e / e2e (debian, 26, non-experimental) (push) Has been cancelled
e2e / e2e (debian, 27, connhelper-ssh) (push) Has been cancelled
e2e / e2e (debian, 27, experimental) (push) Has been cancelled
e2e / e2e (debian, 27, non-experimental) (push) Has been cancelled
e2e / e2e (debian, 28, connhelper-ssh) (push) Has been cancelled
e2e / e2e (debian, 28, experimental) (push) Has been cancelled
e2e / e2e (debian, 28, non-experimental) (push) Has been cancelled
test / ctn (push) Has been cancelled
test / host (macos-13) (push) Has been cancelled
test / host (macos-14) (push) Has been cancelled
validate / validate (lint) (push) Has been cancelled
validate / validate (shellcheck) (push) Has been cancelled
validate / validate (update-authors) (push) Has been cancelled
validate / validate (validate-vendor) (push) Has been cancelled
validate / validate-md (push) Has been cancelled
validate / validate-make (manpages) (push) Has been cancelled
validate / validate-make (yamldocs) (push) Has been cancelled
Add detailed descriptions for --ulimit options in docker run documentation
v28.0.1
2025-02-25 18:52:55 +01:00
MHM0098
d75f8d83d3
Add detailed descriptions for --ulimit options in docker run documentation
...
Signed-off-by: MHM0098 <mhm98035@gmail.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-25 16:15:21 +01:00
Sebastiaan van Stijn
ffdfc5f94d
Merge pull request #5742 from mertssmnoglu/fix-dockerfile-exec-form
...
fix/dockerfiles: Update CMD instruction in 'Dockerfile.dev' to use exec form
2025-02-25 15:59:09 +01:00
Paweł Gronowski
6bd9908388
Merge pull request #5867 from thaJeztah/bump_go_jose
...
vendor: github.com/go-jose/go-jose/v4 v4.0.5
2025-02-25 13:03:21 +00:00
Sebastiaan van Stijn
75595836f2
vendor: github.com/go-jose/go-jose/v4 v4.0.5
...
- Don't allow unbounded amounts of splits.
Fixes GHSA-c6gw-w398-hv78 / CVE-2025-27144
- Various other dependency updates, small fixes, and documentation
updates in the full changelog
full diff: https://github.com/go-jose/go-jose/compare/v4.0.4...v4.0.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-25 11:55:06 +01:00
Rob Murray
41277f53d5
Merge pull request #5865 from robmry/doc_default_bridge
...
Update dockerd command line ref
2025-02-24 18:14:39 +00:00
Rob Murray
4e7497e9cf
Update dockerd command line ref, default bridge opts
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2025-02-24 18:07:06 +00:00
Rob Murray
be669099cb
Update dockerd command line ref, changes in 28.0
...
Signed-off-by: Rob Murray <rob.murray@docker.com >
2025-02-24 18:07:06 +00:00
Paweł Gronowski
111468ccd6
Merge pull request #5864 from thaJeztah/gha_bump_docker
...
gha: add docker 28 to test matrix
2025-02-24 16:39:27 +00:00
Sebastiaan van Stijn
427c1361c5
gha: add docker 28 to test matrix
...
- set default to 28
- remove minor version from matrix; docker:dind images also provide a
"docker:28-dind" which point to the latest minor version.
- remove TODO for 19.03, which is really out of scope now.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-24 15:14:53 +01:00
Sebastiaan van Stijn
656523e20d
Merge pull request #5859 from thaJeztah/fix_docs
...
docs: minor fixes and touch-ups for anchor links
2025-02-24 12:05:34 +01:00
Sebastiaan van Stijn
aad2ae50e8
docs: network ls add heading and anchor for "--no-trunc"
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-21 23:51:04 +01:00
Sebastiaan van Stijn
8a1b096e76
docs: fix missing anchors in swarm reference pages
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-21 23:46:07 +01:00
Sebastiaan van Stijn
c99d3312eb
docs: fix broken anchor-link in "container restart" reference
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-21 23:45:32 +01:00
Paweł Gronowski
77a8a8c6ca
Merge pull request #5854 from Benehiko/fix-exec-msg
...
cmd/docker: do not print error status on exec/run
2025-02-21 12:20:31 +00:00
Alano Terblanche and Fabio Pugliese Ornellas
0cff340983
cmd/docker: do not print error status on exec/run
...
Co-authored-by: Fabio Pugliese Ornellas <fabio.ornellas@gmail.com >
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com >
2025-02-21 12:55:57 +01:00
Bjorn Neergaard
eb48cad302
Merge pull request #5848 from thaJeztah/improve_swarm_completion
...
completion: fix / add completion for service names and node-names
2025-02-20 12:24:31 -07:00
Sebastiaan van Stijn
2493a96027
Merge pull request #5850 from thaJeztah/fix_context_err
...
cli/command/context: fix error-handling of skip-tls-verify
2025-02-20 18:37:04 +01:00
Sebastiaan van Stijn
8f55738579
completion: add completion for docker service flags
...
Not all flags have completions yet, and for those that don't have completion,
we disable completion to prevent it completing with filenames.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-20 18:33:17 +01:00
Sebastiaan van Stijn
768d10767f
completion: add completion for docker node flags
...
With this patch:
docker node update --role
manager worker
docker node update --availability
active drain pause
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-20 18:33:17 +01:00
Sebastiaan van Stijn
d5e6e2ec6e
completion: add completion for node names
...
Change completion for nodes to use names by default, and bring back
support for the `DOCKER_COMPLETION_SHOW_NODE_IDS` env-var
https://github.com/docker/cli/blob/f9ced58158d5e0b358052432244b483774a1983d/contrib/completion/bash/docker#L38
With this patch:
docker node ps <tab>
docker-desktop self
export DOCKER_COMPLETION_SHOW_NODE_IDS=yes
docker node ps <TAB>
docker-desktop qyeriqk20al6hy4y869d08ff5 self
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-20 18:33:09 +01:00