1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00
Commit Graph

10669 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
f79193c22c opts: fix "unused-receiver", line-length-limit linting
opts/port.go:124:7: unused-receiver: method receiver 'p' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (p *PortOpt) Type() string {
          ^
    opts/mount.go:218:7: unused-receiver: method receiver 'm' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (m *MountOpt) Type() string {
          ^
    opts/quotedstring.go:16:7: unused-receiver: method receiver 's' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (s *QuotedString) Type() string {
          ^
    opts/secret.go:82:7: unused-receiver: method receiver 'o' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (o *SecretOpt) Type() string {
          ^
    opts/opts_test.go:235: line-length-limit: line is 283 characters, out of limit 200 (revive)
            `foo.bar.baz.this.should.fail.on.long.name.because.it.is.longer.thanisshouldbethis.should.fail.on.long.name.because.it.is.longer.thanisshouldbethis.should.fail.on.long.name.because.it.is.longer.thanisshouldbethis.should.fail.on.long.name.because.it.is.longer.thanisshouldbe`,
    opts/ulimit.go:61:7: unused-receiver: method receiver 'o' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (o *UlimitOpt) Type() string {
          ^
    opts/weightdevice.go:82:7: unused-receiver: method receiver 'opt' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (opt *WeightdeviceOpt) Type() string {
          ^
    opts/throttledevice.go:103:7: unused-receiver: method receiver 'opt' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (opt *ThrottledeviceOpt) Type() string {
          ^
    opts/duration.go:49:7: unused-receiver: method receiver 'd' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (d *DurationOpt) Type() string {
          ^
    opts/network.go:109:7: unused-receiver: method receiver 'n' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (n *NetworkOpt) Type() string {
          ^
    opts/network.go:119:7: unused-receiver: method receiver 'n' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (n *NetworkOpt) String() string {
          ^
    opts/opts.go:113:7: unused-receiver: method receiver 'opts' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (opts *ListOpts) Type() string {
          ^
    opts/pull_behavior.go:13:7: unused-receiver: method receiver 'p' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (p *PullOpt) Type() string {
          ^
    opts/config.go:83:7: unused-receiver: method receiver 'o' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (o *ConfigOpt) Type() string {
          ^
    opts/gpus.go:95:7: unused-receiver: method receiver 'o' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (o *GpuOpts) Type() string {
          ^
    opts/pull_behavior.go:23:7: unused-receiver: method receiver 'p' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (p *PullOpt) IsBoolFlag() bool {
          ^
    opts/opts.go:183:7: unused-receiver: method receiver 'opts' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (opts *MapOpts) Type() string {
          ^
    opts/opts.go:361:7: unused-receiver: method receiver 'o' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (o *FilterOpt) Type() string {
          ^
    opts/opts.go:389:7: unused-receiver: method receiver 'c' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (c *NanoCPUs) Type() string {
          ^
    opts/opts.go:466:7: unused-receiver: method receiver 'm' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (m *MemBytes) Type() string {
          ^
    opts/opts.go:501:7: unused-receiver: method receiver 'm' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (m *MemSwapBytes) Type() string {
          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:53 +01:00
Sebastiaan van Stijn
d0c3380ce4 cli/connhelper/commandconn: fix "unused-receiver" linting
cli/connhelper/commandconn/commandconn.go:256:7: unused-receiver: method receiver 'c' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (c *commandConn) SetDeadline(t time.Time) error {
          ^
    cli/connhelper/commandconn/commandconn.go:261:7: unused-receiver: method receiver 'c' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (c *commandConn) SetReadDeadline(t time.Time) error {
          ^
    cli/connhelper/commandconn/commandconn.go:266:7: unused-receiver: method receiver 'c' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (c *commandConn) SetWriteDeadline(t time.Time) error {
          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:53 +01:00
Sebastiaan van Stijn
fdc665820c cli/config/credentials: fix "unused-receiver" linting
cli/config/credentials/file_store_test.go:29:7: unused-receiver: method receiver 'f' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (f *fakeStore) GetFilename() string {
          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:53 +01:00
Sebastiaan van Stijn
88b2e78e02 internal/tui: fix "unused-receiver" linting
internal/tui/colors.go:27:7: unused-receiver: method receiver 'a' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (a noColor) Apply(s string) string {
          ^
    internal/tui/colors.go:31:7: unused-receiver: method receiver 'a' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (a noColor) String() string {
          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:53 +01:00
Sebastiaan van Stijn
20c15cee99 cli/compose/loader: shorten skip-comment to please the linters
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:53 +01:00
Sebastiaan van Stijn
cac88ca34c cli/command: wrap some long lines (revive)
cli/command/cli_options.go:180: line-length-limit: line is 205 characters, out of limit 200 (revive)
      			return errdefs.InvalidParameter(errors.Errorf("failed to parse custom headers from %s environment variable: value must be formatted as comma-separated key=value pairs", envOverrideHTTPHeaders))
      cli/command/cli_options.go:194: line-length-limit: line is 208 characters, out of limit 200 (revive)
      				return errdefs.InvalidParameter(errors.Errorf(`failed to set custom headers from %s environment variable: value contains a key=value pair with an empty key: '%s'`, envOverrideHTTPHeaders, kv))

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:52 +01:00
Sebastiaan van Stijn
eef4127de9 cli/internal/oauth/manager: ignore line-length-limit
cli/internal/oauth/manager/manager_test.go:18: line-length-limit: line is 857 characters, out of limit 200 (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:52 +01:00
Sebastiaan van Stijn
d8e76bc33f cli: define const for magic value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:52 +01:00
Sebastiaan van Stijn
9fda9134a9 cli/command/service/progress: define const for magic value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:52 +01:00
Sebastiaan van Stijn
3825d37923 cli/command: define some consts for repeated values
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 15:24:44 +01:00
Sebastiaan van Stijn
2f65cf7d1a cli/command: fix some unused-receiver linting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 14:53:51 +01:00
Sebastiaan van Stijn
a368e3eb58 cmd/docker: fix unused-receiver (revive)
cmd/docker/builder_test.go:130:7: unused-receiver: method receiver 'c' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (c *fakeClient) Ping(_ context.Context) (types.Ping, error) {
          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 13:15:50 +01:00
Sebastiaan van Stijn
88a019a9bb Merge pull request #5833 from vvoland/subpath-swarm-fix
cli/compose: Handle Volume Subpath
v28.0.0-rc.2
2025-02-17 12:54:24 +01:00
Sebastiaan van Stijn
b73653ef41 Merge pull request #5832 from vvoland/swarm-fix-image-subpath
cli/compose: Fix Image Subpath
2025-02-17 12:53:34 +01:00
Paweł Gronowski
add32e4b51 cli/compose: Handle Volume Subpath
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-17 12:39:23 +01:00
Paweł Gronowski
4cc2dce807 cli/compose: Fix Image Subpath
handleImageToMount was an exact copy of handleBindToMount instead of
populating the ImageOptions.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-17 12:37:24 +01:00
Sebastiaan van Stijn
c542ad7443 Merge pull request #5830 from lalyos/fix-entrypoint-option-test
Fix entrypoint parsing logic
2025-02-17 12:18:51 +01:00
Lajos Papp
e868f0f580 cli/command/container/opts_test: Fix entrypoint parsing logic
Right now the test passes even if you change the expected value.
It passes if the array has 1 element.

Signed-off-by: Lajos Papp <lalyos@yahoo.com>
2025-02-17 11:10:50 +00:00
Sebastiaan van Stijn
ca295779cf Merge pull request #5831 from thaJeztah/bump_engine
vendor: github.com/docker/docker 57d4d23825f4 (master, v28.0.0-rc.2)
2025-02-17 12:04:40 +01:00
Sebastiaan van Stijn
c2ba77de49 vendor: github.com/docker/docker 57d4d23825f4 (master, v28.0.0-rc.2)
no changes in vendored code

full diff: 5cc3f1dab8...57d4d23825

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-17 11:57:23 +01:00
Sebastiaan van Stijn
f488a75d6d Merge pull request #5825 from thaJeztah/bump_engine
vendor: github.com/docker/docker 5cc3f1dab895 (master, v28.0.0-rc.2)
2025-02-14 19:40:38 +01:00
Sebastiaan van Stijn
1d3eb6f95b vendor: github.com/docker/docker 5cc3f1dab895 (master, v28.0.0-rc.2)
full diff: b570831cc3...5cc3f1dab8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-14 19:22:53 +01:00
Sebastiaan van Stijn
591fcb273a vendor: golang.org/x/sys v0.29.0
full diff: https://github.com/golang/sys/compare/v0.28.0...v0.29.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-14 17:29:51 +01:00
Paweł Gronowski
c9e7daec81 Merge pull request #5755 from LaurentGoderre/image-mount-subpath
Add image mount options
2025-02-13 13:09:12 +00:00
Sebastiaan van Stijn
b2ac898781 Merge pull request #5822 from vvoland/pr-changelog-desc
gha: Mirror PR template and validate PR workflow from moby
2025-02-13 13:55:00 +01:00
Sebastiaan van Stijn
0eda4c51d7 Merge pull request #5818 from mohammedfuta2000/5814-limit-completion
Restrict completion to one suggestion on run, history, push, tag
2025-02-13 13:54:08 +01:00
Paweł Gronowski
1edc4e07d4 gha: Mirror PR template and validate PR workflow from moby
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-12 14:54:10 +01:00
Mohammed Aminu Futa
a656dfd409 Restrict completion for some commands with a limit paramter for ImageNames
Previously, multiple suggestions were provided when completing
commands like `run`, `history` and `push`. This change
limits completion to a single suggestion for the above and 2 suggestions for `tag`

Signed-off-by: Mohammed Aminu Futa <mohammedfuta2000@gmail.com>
2025-02-12 12:42:19 +00:00
Paweł Gronowski
a3f758fc13 Merge pull request #5820 from thaJeztah/bump_engine
vendor: github.com/docker/docker b570831cc3a3  (master, v28.0.0-rc.2)
2025-02-12 10:53:30 +00:00
Laurent Goderre
04b1b4e08a Add image mount options
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
2025-02-11 12:19:12 -05:00
Sebastiaan van Stijn
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
Sebastiaan van Stijn
1e3e1bd5f4 Merge pull request #5812 from thaJeztah/bump_gofumpt
Dockerfile.dev: bump mvdan.cc/gofumpt to v0.7.0
2025-02-11 16:07:46 +01:00
Sebastiaan van Stijn
235e657b25 Merge pull request #5813 from thaJeztah/bump_goversioninfo
Dockerfile.dev: bump github.com/josephspurrier/goversioninfo to v1.4.1
2025-02-11 16:06:48 +01:00
Sebastiaan van Stijn
b7e4fac496 Merge pull request #5819 from thaJeztah/bump_grpc
vendor: google.golang.org/grpc v1.69.4
2025-02-11 16:06:16 +01:00
Sebastiaan van Stijn
018bf1b237 vendor: google.golang.org/grpc v1.69.4
full diff: https://github.com/grpc/grpc-go/compare/v1.68.1...v1.69.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-11 15:55:27 +01:00
Sebastiaan van Stijn
516e822d4c Merge pull request #5817 from thaJeztah/bump_pflag
vendor: github.com/spf13/pflag v1.0.6, remove local IPNetSliceVar fork
2025-02-11 12:50:51 +01:00
Sebastiaan van Stijn
558ebd5922 vendor: github.com/spf13/pflag v1.0.6, remove local IPNetSliceVar fork
- Add exported functions to preserve pkg/flag compatibility
- Add IPNetSlice and unit tests
- Revert the local fork added in 80a2256478,
  which was pending the upstream feature to be shipped in a release.

full diff: https://github.com/spf13/pflag/compare/v1.0.5...v1.0.6

Revert "Swarm init: use local IPNetSliceValue"

This reverts commit 80a2256478.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-11 12:19:51 +01:00
Paweł Gronowski
0af65dc566 Merge pull request #5816 from thaJeztah/connhelper_context
cli/connhelper/commandcon.New: pass context with WithoutCancel
2025-02-11 11:00:40 +00:00
Sebastiaan van Stijn
2c17edf804 cli/connhelper/commandcon.New: pass context with WithoutCancel
Passing the context to the constructor, but explicitly making it
non-cancelable and add a comment describing why context-cancelation
should not be propagated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-10 21:41:48 +01:00
Sebastiaan van Stijn
e6ee7ea94b Merge pull request #5730 from thelovekesh/update/help-template
Remove preceding white space from cobra help template
2025-02-10 19:02:55 +01:00
Paweł Gronowski
f7c3d1c796 Merge pull request #5815 from thaJeztah/bump_buildx
Dockerfile: dev-container: update buildx v0.20.1
2025-02-10 10:36:10 +00:00
Paweł Gronowski
661d079b1e Merge pull request #5805 from thaJeztah/vendor_28.0.0-rc.1
vendor: github.com/docker/docker/v28.0.0-rc.1
2025-02-10 10:32:17 +00:00
thelovekesh
61a3b4bd50 Remove preceding white space from cobra help template
Signed-off-by: thelovekesh <lovekesh.kumar@rtcamp.com>
Signed-off-by: Lovekesh Kumar <lovekesh.kumar@rtcamp.com>
2025-02-10 10:51:25 +01:00
Sebastiaan van Stijn
bca1f17da8 Merge pull request #5808 from thaJeztah/bump_gotest_tools
vendor: gotest.tools/v3 v3.5.2
2025-02-10 10:49:09 +01:00
Sebastiaan van Stijn
3560bdded9 Merge pull request #5809 from thaJeztah/bump_golangci_lint
Dockerfile: update golangci-lint to v1.63.4
2025-02-10 10:47:35 +01:00
Sebastiaan van Stijn
1acf32cdc6 Dockerfile: dev-container: update buildx v0.20.1
Also align versions in the Dockerfile.dev Dockerfile

full diff: https://github.com/docker/buildx/compare/v0.20.0...v0.20.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-10 10:09:42 +01:00
Sebastiaan van Stijn
7a72f38947 Merge pull request #5810 from thaJeztah/bump_gotestsum
Dockerfile: bump gotest.tools/gotestsum v1.12.0
2025-02-10 09:37:21 +01:00
Sebastiaan van Stijn
bb74513ef3 Dockerfile.dev: bump github.com/josephspurrier/goversioninfo to v1.4.1
Re-align the version with the main Dockerfile, which was missed when
I updated the version in 93a931920b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-09 17:07:52 +01:00
Sebastiaan van Stijn
7b3f264a69 Dockerfile.dev: bump mvdan.cc/gofumpt to v0.7.0
- full diff: https://github.com/mvdan/gofumpt/compare/v0.6.0...v0.7.0
- release notes: https://github.com/mvdan/gofumpt/releases/tag/v0.7.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-09 17:04:33 +01:00
Sebastiaan van Stijn
aecc31039d Dockerfile: bump gotest.tools/gotestsum v1.12.0
full diff: https://github.com/gotestyourself/gotestsum/compare/v1.10.0...v1.12.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-09 16:36:17 +01:00