vendor: github.com/docker/docker 4eb1c5bd52afa08595d9a082a9ba05c81f79be07

Update to latest master

Full diff: 38633e7971...4eb1c5bd52

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2022-06-24 18:17:56 +02:00
parent b496125aa7
commit 9373b26116
8 changed files with 48 additions and 6 deletions

View File

@ -76,7 +76,7 @@ require (
) )
replace ( replace (
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220603173024-38633e797195+incompatible // master (v22.06-dev) github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible // master (v22.06-dev)
github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2 github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
// Resolve dependency hell with github.com/cloudflare/cfssl (transitive via // Resolve dependency hell with github.com/cloudflare/cfssl (transitive via

View File

@ -105,8 +105,8 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xb
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=
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v20.10.3-0.20220603173024-38633e797195+incompatible h1:Umt6HQyK0tja1Hi7xr/RLTwfvwMWcDjgzku3DmBPaek= github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible h1:8fg+lTDVdv91JVw7B1juvVqgdh0zpzr36MmsA618oyI=
github.com/docker/docker v20.10.3-0.20220603173024-38633e797195+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o=
github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=

View File

@ -966,6 +966,7 @@ definitions:
type: "array" type: "array"
description: | description: |
Initial console size, as an `[height, width]` array. Initial console size, as an `[height, width]` array.
x-nullable: true
minItems: 2 minItems: 2
maxItems: 2 maxItems: 2
items: items:
@ -9207,6 +9208,15 @@ paths:
AttachStderr: AttachStderr:
type: "boolean" type: "boolean"
description: "Attach to `stderr` of the exec command." description: "Attach to `stderr` of the exec command."
ConsoleSize:
type: "array"
description: "Initial console size, as an `[height, width]` array."
x-nullable: true
minItems: 2
maxItems: 2
items:
type: "integer"
minimum: 0
DetachKeys: DetachKeys:
type: "string" type: "string"
description: | description: |
@ -9296,9 +9306,19 @@ paths:
Tty: Tty:
type: "boolean" type: "boolean"
description: "Allocate a pseudo-TTY." description: "Allocate a pseudo-TTY."
ConsoleSize:
type: "array"
description: "Initial console size, as an `[height, width]` array."
x-nullable: true
minItems: 2
maxItems: 2
items:
type: "integer"
minimum: 0
example: example:
Detach: false Detach: false
Tty: false Tty: true
ConsoleSize: [80, 64]
- name: "id" - name: "id"
in: "path" in: "path"
description: "Exec instance ID" description: "Exec instance ID"

View File

@ -33,6 +33,7 @@ type ExecConfig struct {
User string // User that will run the command User string // User that will run the command
Privileged bool // Is the container in privileged mode Privileged bool // Is the container in privileged mode
Tty bool // Attach standard streams to a tty. Tty bool // Attach standard streams to a tty.
ConsoleSize *[2]uint `json:",omitempty"` // Initial console size [height, width]
AttachStdin bool // Attach the standard input, makes possible user interaction AttachStdin bool // Attach the standard input, makes possible user interaction
AttachStderr bool // Attach the standard error AttachStderr bool // Attach the standard error
AttachStdout bool // Attach the standard output AttachStdout bool // Attach the standard output

View File

@ -1,6 +1,7 @@
package container // import "github.com/docker/docker/api/types/container" package container // import "github.com/docker/docker/api/types/container"
import ( import (
"io"
"time" "time"
"github.com/docker/docker/api/types/strslice" "github.com/docker/docker/api/types/strslice"
@ -52,6 +53,14 @@ type HealthConfig struct {
Retries int `json:",omitempty"` Retries int `json:",omitempty"`
} }
// ExecStartOptions holds the options to start container's exec.
type ExecStartOptions struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
ConsoleSize *[2]uint `json:",omitempty"`
}
// Config contains the configuration data about a container. // Config contains the configuration data about a container.
// It should hold only portable information about the container. // It should hold only portable information about the container.
// Here, "portable" means "independent from the host we are running on". // Here, "portable" means "independent from the host we are running on".

View File

@ -390,6 +390,8 @@ type ExecStartCheck struct {
Detach bool Detach bool
// Check if there's a tty // Check if there's a tty
Tty bool Tty bool
// Terminal size [height, width], unused if Tty == false
ConsoleSize *[2]uint `json:",omitempty"`
} }
// HealthcheckResult stores information about a single run of a healthcheck probe // HealthcheckResult stores information about a single run of a healthcheck probe

View File

@ -5,6 +5,7 @@ import (
"encoding/json" "encoding/json"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/versions"
) )
// ContainerExecCreate creates a new exec configuration to run an exec process. // ContainerExecCreate creates a new exec configuration to run an exec process.
@ -14,6 +15,9 @@ func (cli *Client) ContainerExecCreate(ctx context.Context, container string, co
if err := cli.NewVersionError("1.25", "env"); len(config.Env) != 0 && err != nil { if err := cli.NewVersionError("1.25", "env"); len(config.Env) != 0 && err != nil {
return response, err return response, err
} }
if versions.LessThan(cli.ClientVersion(), "1.42") {
config.ConsoleSize = nil
}
resp, err := cli.post(ctx, "/containers/"+container+"/exec", nil, config, nil) resp, err := cli.post(ctx, "/containers/"+container+"/exec", nil, config, nil)
defer ensureReaderClosed(resp) defer ensureReaderClosed(resp)
@ -26,6 +30,9 @@ func (cli *Client) ContainerExecCreate(ctx context.Context, container string, co
// ContainerExecStart starts an exec process already created in the docker host. // ContainerExecStart starts an exec process already created in the docker host.
func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error { func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error {
if versions.LessThan(cli.ClientVersion(), "1.42") {
config.ConsoleSize = nil
}
resp, err := cli.post(ctx, "/exec/"+execID+"/start", nil, config, nil) resp, err := cli.post(ctx, "/exec/"+execID+"/start", nil, config, nil)
ensureReaderClosed(resp) ensureReaderClosed(resp)
return err return err
@ -36,6 +43,9 @@ func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config
// and the a reader to get output. It's up to the called to close // and the a reader to get output. It's up to the called to close
// the hijacked connection by calling types.HijackedResponse.Close. // the hijacked connection by calling types.HijackedResponse.Close.
func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) { func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) {
if versions.LessThan(cli.ClientVersion(), "1.42") {
config.ConsoleSize = nil
}
headers := map[string][]string{ headers := map[string][]string{
"Content-Type": {"application/json"}, "Content-Type": {"application/json"},
} }

4
vendor/modules.txt vendored
View File

@ -39,7 +39,7 @@ github.com/docker/distribution/registry/client/transport
github.com/docker/distribution/registry/storage/cache github.com/docker/distribution/registry/storage/cache
github.com/docker/distribution/registry/storage/cache/memory github.com/docker/distribution/registry/storage/cache/memory
github.com/docker/distribution/uuid github.com/docker/distribution/uuid
# github.com/docker/docker v20.10.14+incompatible => github.com/docker/docker v20.10.3-0.20220603173024-38633e797195+incompatible # github.com/docker/docker v20.10.14+incompatible => github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible
## explicit ## explicit
github.com/docker/docker/api github.com/docker/docker/api
github.com/docker/docker/api/types github.com/docker/docker/api/types
@ -390,6 +390,6 @@ gotest.tools/v3/internal/format
gotest.tools/v3/internal/source gotest.tools/v3/internal/source
gotest.tools/v3/poll gotest.tools/v3/poll
gotest.tools/v3/skip gotest.tools/v3/skip
# github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220603173024-38633e797195+incompatible # github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible
# github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2 # github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
# github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.0.20 # github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.0.20