From fcbbd35cc6d4c7bc507b1ee528bf9dbec63ccd76 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Jan 2026 12:51:14 +0100 Subject: [PATCH 1/5] cli/command/image/build: remove deprecated IsArchive utility It was deprecated in 64be664e858d6ebcf0a119e349f6667ef67e7a83 Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index caf21427b323..7426529b4ae8 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -201,14 +201,6 @@ func GetContextFromReader(rc io.ReadCloser, dockerfileName string) (out io.ReadC }), defaultDockerfileName, nil } -// IsArchive checks for the magic bytes of a tar or any supported compression -// algorithm. -// -// Deprecated: this utility was used internally and will be removed in the next release. -func IsArchive(header []byte) bool { - return isArchive(header) -} - // isArchive checks for the magic bytes of a tar or any supported compression // algorithm. func isArchive(header []byte) bool { From e5132e687fb106dc72cb988985bde1f36d47f924 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Jan 2026 12:52:40 +0100 Subject: [PATCH 2/5] cli/command/image/build: remove deprecated DefaultDockerfileName const It was deprecated in f24bb4bc76ae9c02e9df9d5bfccff5ee7e3a9ef9 Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index 7426529b4ae8..6115b4c6f617 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -25,11 +25,6 @@ import ( "github.com/moby/patternmatcher" ) -// DefaultDockerfileName is the Default filename with Docker commands, read by docker build -// -// Deprecated: this const is no longer used and will be removed in the next release. -const DefaultDockerfileName string = "Dockerfile" - const ( // defaultDockerfileName is the Default filename with Docker commands, read by docker build defaultDockerfileName string = "Dockerfile" From 77f4ff5784ca857dc7255e985045c58a0930360a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Jan 2026 12:54:37 +0100 Subject: [PATCH 3/5] cli/command/image/build: remove deprecated DetectArchiveReader util It was deprecated in c52fa073cd14498d060f0d8d99e9909737b729b5 Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index 6115b4c6f617..eea61eccf0a4 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -95,17 +95,6 @@ func filepathMatches(matcher *patternmatcher.PatternMatcher, file string) (bool, return matcher.MatchesOrParentMatches(file) } -// DetectArchiveReader detects whether the input stream is an archive or a -// Dockerfile and returns a buffered version of input, safe to consume in lieu -// of input. If an archive is detected, ok is set to true, and to false -// otherwise, in which case it is safe to assume input represents the contents -// of a Dockerfile. -// -// Deprecated: this utility was only used internally, and will be removed in the next release. -func DetectArchiveReader(input io.ReadCloser) (rc io.ReadCloser, ok bool, err error) { - return detectArchiveReader(input) -} - // detectArchiveReader detects whether the input stream is an archive or a // Dockerfile and returns a buffered version of input, safe to consume in lieu // of input. If an archive is detected, ok is set to true, and to false From bc443e6d2799bd6f1c8b87d14f429a4298fcae38 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Jan 2026 12:55:51 +0100 Subject: [PATCH 4/5] cli/command/image/build: remove deprecated WriteTempDockerfile util It was deprecated in 6e1ff0bec1c87913c3cb58e2499fbf549fb3221f Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index eea61eccf0a4..79274c1c5376 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -111,15 +111,6 @@ func detectArchiveReader(input io.ReadCloser) (rc io.ReadCloser, ok bool, err er return newReadCloserWrapper(buf, func() error { return input.Close() }), isArchive(magic), nil } -// WriteTempDockerfile writes a Dockerfile stream to a temporary file with a -// name specified by defaultDockerfileName and returns the path to the -// temporary directory containing the Dockerfile. -// -// Deprecated: this utility was only used internally, and will be removed in the next release. -func WriteTempDockerfile(rc io.ReadCloser) (dockerfileDir string, err error) { - return writeTempDockerfile(rc) -} - // writeTempDockerfile writes a Dockerfile stream to a temporary file with a // name specified by defaultDockerfileName and returns the path to the // temporary directory containing the Dockerfile. From f6f96074d00e5982a061f253d78960704ee00bfd Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Jan 2026 12:57:09 +0100 Subject: [PATCH 5/5] cli/command/image/build: remove deprecated ResolveAndValidateContextPath util It was deprecated in 0f2f9e9c41f10997aad8c370fe1193d7a744a3ac Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index 79274c1c5376..da746b8a93bd 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -272,17 +272,6 @@ func GetContextFromLocalDir(localDir, dockerfileName string) (string, string, er return localDir, relDockerfile, err } -// ResolveAndValidateContextPath uses the given context directory for a `docker build` -// and returns the absolute path to the context directory. -// -// Deprecated: this utility was used internally and will be removed in the next -// release. Use [DetectContextType] to detect the context-type, and use -// [GetContextFromLocalDir], [GetContextFromLocalDir], [GetContextFromGitURL], -// or [GetContextFromURL] instead. -func ResolveAndValidateContextPath(givenContextDir string) (string, error) { - return resolveAndValidateContextPath(givenContextDir) -} - // resolveAndValidateContextPath uses the given context directory for a `docker build` // and returns the absolute path to the context directory. func resolveAndValidateContextPath(givenContextDir string) (string, error) {