From a0e1fb20baddccf294258e8bfd61d1ab52d2aec1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:20:34 +0000 Subject: [PATCH] chore(deps): bump github.com/docker/docker Bumps [github.com/docker/docker](https://github.com/docker/docker) from 27.0.3+incompatible to 27.1.0+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v27.0.3...v27.1.0) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../github.com/docker/docker/api/swagger.yaml | 4 +- .../docker/docker/api/types/system/info.go | 7 -- .../docker/builder/dockerfile/builder.go | 4 +- .../docker/builder/dockerfile/dispatchers.go | 6 +- .../docker/builder/dockerfile/evaluator.go | 2 +- .../docker/builder/dockerfile/imagecontext.go | 2 +- .../docker/builder/dockerfile/internals.go | 2 +- .../builder/dockerfile/internals_windows.go | 2 +- .../docker/docker/container/container.go | 15 +++- .../docker/pkg/containerfs/containerfs.go | 15 ---- .../docker/docker/pkg/containerfs/rm.go | 78 ------------------- .../docker/pkg/containerfs/rm_windows.go | 6 -- vendor/modules.txt | 3 +- 15 files changed, 28 insertions(+), 124 deletions(-) delete mode 100644 vendor/github.com/docker/docker/pkg/containerfs/containerfs.go delete mode 100644 vendor/github.com/docker/docker/pkg/containerfs/rm.go delete mode 100644 vendor/github.com/docker/docker/pkg/containerfs/rm_windows.go diff --git a/go.mod b/go.mod index d38d66d997..55145f58f7 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44 github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 github.com/containerd/cgroups v1.1.0 // indirect - github.com/docker/docker v27.0.3+incompatible + github.com/docker/docker v27.1.0+incompatible github.com/go-git/go-billy/v5 v5.5.0 github.com/go-git/go-git/v5 v5.12.0 github.com/golang/mock v1.6.0 diff --git a/go.sum b/go.sum index 8755d68981..62b89feeab 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwen github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= -github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.1.0+incompatible h1:rEHVQc4GZ0MIQKifQPHSFGV/dVgaZafgRf8fCPtDYBs= +github.com/docker/docker v27.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo= github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= diff --git a/vendor/github.com/docker/docker/api/swagger.yaml b/vendor/github.com/docker/docker/api/swagger.yaml index cc754bf1fd..78f0ce1f22 100644 --- a/vendor/github.com/docker/docker/api/swagger.yaml +++ b/vendor/github.com/docker/docker/api/swagger.yaml @@ -5334,7 +5334,7 @@ definitions: The version Go used to compile the daemon, and the version of the Go runtime in use. type: "string" - example: "go1.21.11" + example: "go1.21.12" Os: description: | The operating system that the daemon is running on ("linux" or "windows") @@ -9563,7 +9563,7 @@ paths: Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` - Images report these events: `create, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` + Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` diff --git a/vendor/github.com/docker/docker/api/types/system/info.go b/vendor/github.com/docker/docker/api/types/system/info.go index 6791cf3284..c66a2afb8b 100644 --- a/vendor/github.com/docker/docker/api/types/system/info.go +++ b/vendor/github.com/docker/docker/api/types/system/info.go @@ -77,9 +77,6 @@ type Info struct { Containerd *ContainerdInfo `json:",omitempty"` - // Legacy API fields for older API versions. - legacyFields - // Warnings contains a slice of warnings that occurred while collecting // system information. These warnings are intended to be informational // messages for the user, and are not intended to be parsed / used for @@ -124,10 +121,6 @@ type ContainerdNamespaces struct { Plugins string } -type legacyFields struct { - ExecutionDriver string `json:",omitempty"` // Deprecated: deprecated since API v1.25, but returned for older versions. -} - // PluginsInfo is a temp struct holding Plugins name // registered with docker daemon. It is used by [Info] struct type PluginsInfo struct { diff --git a/vendor/github.com/docker/docker/builder/dockerfile/builder.go b/vendor/github.com/docker/docker/builder/dockerfile/builder.go index be03511a3f..9ad139b1f2 100644 --- a/vendor/github.com/docker/docker/builder/dockerfile/builder.go +++ b/vendor/github.com/docker/docker/builder/dockerfile/builder.go @@ -8,8 +8,8 @@ import ( "sort" "strings" - "github.com/containerd/containerd/platforms" "github.com/containerd/log" + "github.com/containerd/platforms" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/container" @@ -228,7 +228,7 @@ func emitImageID(aux *streamformatter.AuxFormatter, state *dispatchState) error func processMetaArg(meta instructions.ArgCommand, shlex *shell.Lex, args *BuildArgs) error { // shell.Lex currently only support the concatenated string format - envs := convertMapToEnvList(args.GetAllAllowed()) + envs := shell.EnvsFromSlice(convertMapToEnvList(args.GetAllAllowed())) if err := meta.Expand(func(word string) (string, error) { newword, _, err := shlex.ProcessWord(word, envs) return newword, err diff --git a/vendor/github.com/docker/docker/builder/dockerfile/dispatchers.go b/vendor/github.com/docker/docker/builder/dockerfile/dispatchers.go index c302eeebd5..fe35dd206a 100644 --- a/vendor/github.com/docker/docker/builder/dockerfile/dispatchers.go +++ b/vendor/github.com/docker/docker/builder/dockerfile/dispatchers.go @@ -15,7 +15,7 @@ import ( "sort" "strings" - "github.com/containerd/containerd/platforms" + "github.com/containerd/platforms" "github.com/docker/docker/api" "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/builder" @@ -224,7 +224,7 @@ func (d *dispatchRequest) getExpandedString(shlex *shell.Lex, str string) (strin substitutionArgs = append(substitutionArgs, key+"="+value) } - name, _, err := shlex.ProcessWord(str, substitutionArgs) + name, _, err := shlex.ProcessWord(str, shell.EnvsFromSlice(substitutionArgs)) if err != nil { return "", err } @@ -508,7 +508,7 @@ func dispatchEntrypoint(ctx context.Context, d dispatchRequest, c *instructions. // // Expose ports for links and port mappings. This all ends up in // req.runConfig.ExposedPorts for runconfig. -func dispatchExpose(ctx context.Context, d dispatchRequest, c *instructions.ExposeCommand, envs []string) error { +func dispatchExpose(ctx context.Context, d dispatchRequest, c *instructions.ExposeCommand, envs shell.EnvGetter) error { // custom multi word expansion // expose $FOO with FOO="80 443" is expanded as EXPOSE [80,443]. This is the only command supporting word to words expansion // so the word processing has been de-generalized diff --git a/vendor/github.com/docker/docker/builder/dockerfile/evaluator.go b/vendor/github.com/docker/docker/builder/dockerfile/evaluator.go index 2bf74ed07f..cc23bf0a52 100644 --- a/vendor/github.com/docker/docker/builder/dockerfile/evaluator.go +++ b/vendor/github.com/docker/docker/builder/dockerfile/evaluator.go @@ -43,7 +43,7 @@ func dispatch(ctx context.Context, d dispatchRequest, cmd instructions.Command) } } runConfigEnv := d.state.runConfig.Env - envs := append(runConfigEnv, d.state.buildArgs.FilterAllowed(runConfigEnv)...) + envs := shell.EnvsFromSlice(append(runConfigEnv, d.state.buildArgs.FilterAllowed(runConfigEnv)...)) if ex, ok := cmd.(instructions.SupportsSingleWordExpansion); ok { err := ex.Expand(func(word string) (string, error) { diff --git a/vendor/github.com/docker/docker/builder/dockerfile/imagecontext.go b/vendor/github.com/docker/docker/builder/dockerfile/imagecontext.go index e943c22951..97e1146a7a 100644 --- a/vendor/github.com/docker/docker/builder/dockerfile/imagecontext.go +++ b/vendor/github.com/docker/docker/builder/dockerfile/imagecontext.go @@ -4,8 +4,8 @@ import ( "context" "runtime" - "github.com/containerd/containerd/platforms" "github.com/containerd/log" + "github.com/containerd/platforms" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/builder" dockerimage "github.com/docker/docker/image" diff --git a/vendor/github.com/docker/docker/builder/dockerfile/internals.go b/vendor/github.com/docker/docker/builder/dockerfile/internals.go index 2439efe37b..fada8a65f2 100644 --- a/vendor/github.com/docker/docker/builder/dockerfile/internals.go +++ b/vendor/github.com/docker/docker/builder/dockerfile/internals.go @@ -10,8 +10,8 @@ import ( "fmt" "strings" - "github.com/containerd/containerd/platforms" "github.com/containerd/log" + "github.com/containerd/platforms" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/container" diff --git a/vendor/github.com/docker/docker/builder/dockerfile/internals_windows.go b/vendor/github.com/docker/docker/builder/dockerfile/internals_windows.go index f79f8e16e1..9be0868312 100644 --- a/vendor/github.com/docker/docker/builder/dockerfile/internals_windows.go +++ b/vendor/github.com/docker/docker/builder/dockerfile/internals_windows.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/containerd/containerd/platforms" + "github.com/containerd/platforms" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/errdefs" diff --git a/vendor/github.com/docker/docker/container/container.go b/vendor/github.com/docker/docker/container/container.go index dfc056a427..25907e1202 100644 --- a/vendor/github.com/docker/docker/container/container.go +++ b/vendor/github.com/docker/docker/container/container.go @@ -30,7 +30,6 @@ import ( "github.com/docker/docker/layer" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/oci" - "github.com/docker/docker/pkg/containerfs" "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/restartmanager" @@ -345,7 +344,7 @@ func (container *Container) GetResourcePath(path string) (string, error) { } // IMPORTANT - These are paths on the OS where the daemon is running, hence // any filepath operations must be done in an OS-agnostic way. - r, e := symlink.FollowSymlinkInScope(filepath.Join(container.BaseFS, containerfs.CleanScopedPath(path)), container.BaseFS) + r, e := symlink.FollowSymlinkInScope(filepath.Join(container.BaseFS, cleanScopedPath(path)), container.BaseFS) // Log this here on the daemon side as there's otherwise no indication apart // from the error being propagated all the way back to the client. This makes @@ -356,6 +355,18 @@ func (container *Container) GetResourcePath(path string) (string, error) { return r, e } +// cleanScopedPath prepares the given path to be combined with a mount path or +// a drive-letter. On Windows, it removes any existing driveletter (e.g. "C:"). +// The returned path is always prefixed with a [filepath.Separator]. +func cleanScopedPath(path string) string { + if len(path) >= 2 { + if v := filepath.VolumeName(path); len(v) > 0 { + path = path[len(v):] + } + } + return filepath.Join(string(filepath.Separator), path) +} + // GetRootResourcePath evaluates `path` in the scope of the container's root, with proper path // sanitisation. Symlinks are all scoped to the root of the container, as // though the container's root was `/`. diff --git a/vendor/github.com/docker/docker/pkg/containerfs/containerfs.go b/vendor/github.com/docker/docker/pkg/containerfs/containerfs.go deleted file mode 100644 index 3b7fd80f28..0000000000 --- a/vendor/github.com/docker/docker/pkg/containerfs/containerfs.go +++ /dev/null @@ -1,15 +0,0 @@ -package containerfs // import "github.com/docker/docker/pkg/containerfs" - -import "path/filepath" - -// CleanScopedPath prepares the given path to be combined with a mount path or -// a drive-letter. On Windows, it removes any existing driveletter (e.g. "C:"). -// The returned path is always prefixed with a [filepath.Separator]. -func CleanScopedPath(path string) string { - if len(path) >= 2 { - if v := filepath.VolumeName(path); len(v) > 0 { - path = path[len(v):] - } - } - return filepath.Join(string(filepath.Separator), path) -} diff --git a/vendor/github.com/docker/docker/pkg/containerfs/rm.go b/vendor/github.com/docker/docker/pkg/containerfs/rm.go deleted file mode 100644 index 303714a180..0000000000 --- a/vendor/github.com/docker/docker/pkg/containerfs/rm.go +++ /dev/null @@ -1,78 +0,0 @@ -//go:build !darwin && !windows - -package containerfs // import "github.com/docker/docker/pkg/containerfs" - -import ( - "os" - "syscall" - "time" - - "github.com/moby/sys/mount" - "github.com/pkg/errors" -) - -// EnsureRemoveAll wraps `os.RemoveAll` to check for specific errors that can -// often be remedied. -// Only use `EnsureRemoveAll` if you really want to make every effort to remove -// a directory. -// -// Because of the way `os.Remove` (and by extension `os.RemoveAll`) works, there -// can be a race between reading directory entries and then actually attempting -// to remove everything in the directory. -// These types of errors do not need to be returned since it's ok for the dir to -// be gone we can just retry the remove operation. -// -// This should not return a `os.ErrNotExist` kind of error under any circumstances -func EnsureRemoveAll(dir string) error { - notExistErr := make(map[string]bool) - - // track retries - exitOnErr := make(map[string]int) - maxRetry := 50 - - // Attempt to unmount anything beneath this dir first - mount.RecursiveUnmount(dir) - - for { - err := os.RemoveAll(dir) - if err == nil { - return nil - } - - pe, ok := err.(*os.PathError) - if !ok { - return err - } - - if os.IsNotExist(err) { - if notExistErr[pe.Path] { - return err - } - notExistErr[pe.Path] = true - - // There is a race where some subdir can be removed but after the parent - // dir entries have been read. - // So the path could be from `os.Remove(subdir)` - // If the reported non-existent path is not the passed in `dir` we - // should just retry, but otherwise return with no error. - if pe.Path == dir { - return nil - } - continue - } - - if pe.Err != syscall.EBUSY { - return err - } - - if e := mount.Unmount(pe.Path); e != nil { - return errors.Wrapf(e, "error while removing %s", dir) - } - - if exitOnErr[pe.Path] == maxRetry { - return err - } - exitOnErr[pe.Path]++ - time.Sleep(100 * time.Millisecond) - } -} diff --git a/vendor/github.com/docker/docker/pkg/containerfs/rm_windows.go b/vendor/github.com/docker/docker/pkg/containerfs/rm_windows.go deleted file mode 100644 index 779979ed3d..0000000000 --- a/vendor/github.com/docker/docker/pkg/containerfs/rm_windows.go +++ /dev/null @@ -1,6 +0,0 @@ -package containerfs // import "github.com/docker/docker/pkg/containerfs" - -import "os" - -// EnsureRemoveAll is an alias to os.RemoveAll on Windows -var EnsureRemoveAll = os.RemoveAll diff --git a/vendor/modules.txt b/vendor/modules.txt index 1f3ab8ce7a..71671a205e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -503,7 +503,7 @@ github.com/docker/distribution github.com/docker/distribution/digestset github.com/docker/distribution/reference github.com/docker/distribution/registry/client/auth/challenge -# github.com/docker/docker v27.0.3+incompatible +# github.com/docker/docker v27.1.0+incompatible ## explicit github.com/docker/docker/api github.com/docker/docker/api/types @@ -561,7 +561,6 @@ github.com/docker/docker/oci/caps github.com/docker/docker/pkg/archive github.com/docker/docker/pkg/broadcaster github.com/docker/docker/pkg/chrootarchive -github.com/docker/docker/pkg/containerfs github.com/docker/docker/pkg/homedir github.com/docker/docker/pkg/idtools github.com/docker/docker/pkg/ioutils