vendor: github.com/docker/cli v28.0.0-rc.2

full diff: https://github.com/docker/cli/compare/v28.0.0-rc.1...v28.0.0-rc.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-02-14 19:52:08 +01:00
parent 461bd9e5d1
commit 0a4a1babd1
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
6 changed files with 33 additions and 11 deletions

2
go.mod
View File

@ -17,7 +17,7 @@ require (
github.com/creack/pty v1.1.24 github.com/creack/pty v1.1.24
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/distribution/reference v0.6.0 github.com/distribution/reference v0.6.0
github.com/docker/cli v28.0.0-rc.1+incompatible github.com/docker/cli v28.0.0-rc.2+incompatible
github.com/docker/cli-docs-tool v0.9.0 github.com/docker/cli-docs-tool v0.9.0
github.com/docker/docker v28.0.0-rc.2+incompatible github.com/docker/docker v28.0.0-rc.2+incompatible
github.com/docker/go-units v0.5.0 github.com/docker/go-units v0.5.0

4
go.sum
View File

@ -122,8 +122,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/cli v28.0.0-rc.1+incompatible h1:4Xkn+JKnvVqDfyL/pZCWaPM9jzPtAJvNu7qKBkotv3I= github.com/docker/cli v28.0.0-rc.2+incompatible h1:2N1dpr3qtlJwIQpqXm7oNwWNAUGzpKlsCeJ32ejvpTk=
github.com/docker/cli v28.0.0-rc.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v28.0.0-rc.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli-docs-tool v0.9.0 h1:CVwQbE+ZziwlPqrJ7LRyUF6GvCA+6gj7MTCsayaK9t0= github.com/docker/cli-docs-tool v0.9.0 h1:CVwQbE+ZziwlPqrJ7LRyUF6GvCA+6gj7MTCsayaK9t0=
github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3Tr1ipoypjAUtc= github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3Tr1ipoypjAUtc=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=

View File

@ -518,4 +518,4 @@ Run '{{.CommandPath}} COMMAND --help' for more information on a command.
` `
const helpTemplate = ` const helpTemplate = `
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}` {{- if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`

View File

@ -33,18 +33,28 @@ import (
) )
// New returns net.Conn // New returns net.Conn
func New(_ context.Context, cmd string, args ...string) (net.Conn, error) { func New(ctx context.Context, cmd string, args ...string) (net.Conn, error) {
var ( // Don't kill the ssh process if the context is cancelled. Killing the
c commandConn // ssh process causes an error when go's http.Client tries to reuse the
err error // net.Conn (commandConn).
) //
c.cmd = exec.Command(cmd, args...) // Not passing down the Context might seem counter-intuitive, but in this
// case, the lifetime of the process should be managed by the http.Client,
// not the caller's Context.
//
// Further details;;
//
// - https://github.com/docker/cli/pull/3900
// - https://github.com/docker/compose/issues/9448#issuecomment-1264263721
ctx = context.WithoutCancel(ctx)
c := commandConn{cmd: exec.CommandContext(ctx, cmd, args...)}
// we assume that args never contains sensitive information // we assume that args never contains sensitive information
logrus.Debugf("commandconn: starting %s with %v", cmd, args) logrus.Debugf("commandconn: starting %s with %v", cmd, args)
c.cmd.Env = os.Environ() c.cmd.Env = os.Environ()
c.cmd.SysProcAttr = &syscall.SysProcAttr{} c.cmd.SysProcAttr = &syscall.SysProcAttr{}
setPdeathsig(c.cmd) setPdeathsig(c.cmd)
createSession(c.cmd) createSession(c.cmd)
var err error
c.stdin, err = c.cmd.StdinPipe() c.stdin, err = c.cmd.StdinPipe()
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -43,6 +43,13 @@ func (m *MountOpt) Set(value string) error {
return mount.VolumeOptions return mount.VolumeOptions
} }
imageOptions := func() *mounttypes.ImageOptions {
if mount.ImageOptions == nil {
mount.ImageOptions = new(mounttypes.ImageOptions)
}
return mount.ImageOptions
}
bindOptions := func() *mounttypes.BindOptions { bindOptions := func() *mounttypes.BindOptions {
if mount.BindOptions == nil { if mount.BindOptions == nil {
mount.BindOptions = new(mounttypes.BindOptions) mount.BindOptions = new(mounttypes.BindOptions)
@ -147,6 +154,8 @@ func (m *MountOpt) Set(value string) error {
volumeOptions().DriverConfig.Options = make(map[string]string) volumeOptions().DriverConfig.Options = make(map[string]string)
} }
setValueOnMap(volumeOptions().DriverConfig.Options, val) setValueOnMap(volumeOptions().DriverConfig.Options, val)
case "image-subpath":
imageOptions().Subpath = val
case "tmpfs-size": case "tmpfs-size":
sizeBytes, err := units.RAMInBytes(val) sizeBytes, err := units.RAMInBytes(val)
if err != nil { if err != nil {
@ -175,6 +184,9 @@ func (m *MountOpt) Set(value string) error {
if mount.VolumeOptions != nil && mount.Type != mounttypes.TypeVolume { if mount.VolumeOptions != nil && mount.Type != mounttypes.TypeVolume {
return fmt.Errorf("cannot mix 'volume-*' options with mount type '%s'", mount.Type) return fmt.Errorf("cannot mix 'volume-*' options with mount type '%s'", mount.Type)
} }
if mount.ImageOptions != nil && mount.Type != mounttypes.TypeImage {
return fmt.Errorf("cannot mix 'image-*' options with mount type '%s'", mount.Type)
}
if mount.BindOptions != nil && mount.Type != mounttypes.TypeBind { if mount.BindOptions != nil && mount.Type != mounttypes.TypeBind {
return fmt.Errorf("cannot mix 'bind-*' options with mount type '%s'", mount.Type) return fmt.Errorf("cannot mix 'bind-*' options with mount type '%s'", mount.Type)
} }

2
vendor/modules.txt vendored
View File

@ -229,7 +229,7 @@ github.com/davecgh/go-spew/spew
# github.com/distribution/reference v0.6.0 # github.com/distribution/reference v0.6.0
## explicit; go 1.20 ## explicit; go 1.20
github.com/distribution/reference github.com/distribution/reference
# github.com/docker/cli v28.0.0-rc.1+incompatible # github.com/docker/cli v28.0.0-rc.2+incompatible
## explicit ## explicit
github.com/docker/cli/cli github.com/docker/cli/cli
github.com/docker/cli/cli-plugins/hooks github.com/docker/cli/cli-plugins/hooks