Merge pull request #1516 from crazy-max/dependabot/go_modules/github.com/moby/buildkit-0.25.1

chore(deps): bump github.com/moby/buildkit from 0.23.2 to 0.25.2
This commit is contained in:
CrazyMax
2025-11-09 17:12:54 +01:00
committed by GitHub
8 changed files with 41 additions and 33 deletions

View File

@@ -244,7 +244,7 @@ type AddCommand struct {
Chmod string
Link bool
ExcludePatterns []string
KeepGitDir bool // whether to keep .git dir, only meaningful for git sources
KeepGitDir *bool // whether to keep .git dir, only meaningful for git sources
Checksum string
Unpack *bool
}

View File

@@ -1,7 +0,0 @@
//go:build dfexcludepatterns
package instructions
func init() {
excludePatternsEnabled = true
}

View File

@@ -20,8 +20,6 @@ import (
"github.com/pkg/errors"
)
var excludePatternsEnabled = false
type parseRequest struct {
command string
args []string
@@ -33,8 +31,10 @@ type parseRequest struct {
comments []string
}
var parseRunPreHooks []func(*RunCommand, parseRequest) error
var parseRunPostHooks []func(*RunCommand, parseRequest) error
var (
parseRunPreHooks []func(*RunCommand, parseRequest) error
parseRunPostHooks []func(*RunCommand, parseRequest) error
)
var parentsEnabled = false
@@ -326,19 +326,13 @@ func parseAdd(req parseRequest) (*AddCommand, error) {
return nil, errNoDestinationArgument("ADD")
}
var flExcludes *Flag
// silently ignore if not -labs
if excludePatternsEnabled {
flExcludes = req.flags.AddStrings("exclude")
}
flChown := req.flags.AddString("chown", "")
flChmod := req.flags.AddString("chmod", "")
flLink := req.flags.AddBool("link", false)
flKeepGitDir := req.flags.AddBool("keep-git-dir", false)
flChecksum := req.flags.AddString("checksum", "")
flUnpack := req.flags.AddBool("unpack", false)
flExcludes := req.flags.AddStrings("exclude")
if err := req.flags.Parse(); err != nil {
return nil, err
}
@@ -354,13 +348,19 @@ func parseAdd(req parseRequest) (*AddCommand, error) {
unpack = &b
}
var keepGit *bool
if _, ok := req.flags.used["keep-git-dir"]; ok {
b := flKeepGitDir.Value == "true"
keepGit = &b
}
return &AddCommand{
withNameAndCode: newWithNameAndCode(req),
SourcesAndDest: *sourcesAndDest,
Chown: flChown.Value,
Chmod: flChmod.Value,
Link: flLink.Value == "true",
KeepGitDir: flKeepGitDir.Value == "true",
KeepGitDir: keepGit,
Checksum: flChecksum.Value,
ExcludePatterns: stringValuesFromFlagIfPossible(flExcludes),
Unpack: unpack,
@@ -372,12 +372,7 @@ func parseCopy(req parseRequest) (*CopyCommand, error) {
return nil, errNoDestinationArgument("COPY")
}
var flExcludes *Flag
var flParents *Flag
if excludePatternsEnabled {
flExcludes = req.flags.AddStrings("exclude")
}
if parentsEnabled {
flParents = req.flags.AddBool("parents", false)
}
@@ -386,6 +381,7 @@ func parseCopy(req parseRequest) (*CopyCommand, error) {
flFrom := req.flags.AddString("from", "")
flChmod := req.flags.AddString("chmod", "")
flLink := req.flags.AddBool("link", false)
flExcludes := req.flags.AddStrings("exclude")
if err := req.flags.Parse(); err != nil {
return nil, err
@@ -596,6 +592,7 @@ func parseOptInterval(f *Flag) (time.Duration, error) {
}
return d, nil
}
func parseHealthcheck(req parseRequest) (*HealthCheckCommand, error) {
if len(req.args) == 0 {
return nil, errAtLeastOneArgument("HEALTHCHECK")

View File

@@ -174,4 +174,22 @@ var (
},
Experimental: true,
}
RuleExposeProtoCasing = LinterRule[func(string) string]{
Name: "ExposeProtoCasing",
Description: "Protocol in EXPOSE instruction should be lowercase",
URL: "https://docs.docker.com/go/dockerfile/rule/expose-proto-casing/",
Format: func(port string) string {
return fmt.Sprintf("Defined protocol '%s' in EXPOSE instruction should be lowercase", port)
},
}
RuleExposeInvalidFormat = LinterRule[func(string) string]{
Name: "ExposeInvalidFormat",
Description: "IP address and host-port mapping should not be used in EXPOSE instruction. This will become an error in a future release",
URL: "https://docs.docker.com/go/dockerfile/rule/expose-invalid-format/",
Format: func(port string) string {
return fmt.Sprintf("EXPOSE instruction should not define an IP address or host-port mapping, found '%s'", port)
},
// TODO(crazy-max): deprecate this rule in the future and error out instead
// Deprecated: true,
}
)

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc-gen-go v1.36.9
// protoc v3.11.4
// source: github.com/moby/buildkit/util/stack/stack.proto