mirror of https://github.com/docker/cli.git
vendor: docker v20.10.3-0.20220720171342-a60b458179aa (22.06 branch)
full diff: 4eb1c5bd52...a60b458179
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
f175f5d177
commit
07113638c1
|
@ -10,7 +10,7 @@ require (
|
|||
github.com/containerd/containerd v1.6.4
|
||||
github.com/creack/pty v1.1.11
|
||||
github.com/docker/distribution v2.8.1+incompatible
|
||||
github.com/docker/docker v20.10.14+incompatible // see "replace" for the actual version
|
||||
github.com/docker/docker v20.10.14+incompatible // v22.06.x - see "replace" for the actual version
|
||||
github.com/docker/docker-credential-helpers v0.6.4
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/docker/go-units v0.4.0
|
||||
|
@ -76,7 +76,7 @@ require (
|
|||
)
|
||||
|
||||
replace (
|
||||
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible // master (v22.06-dev)
|
||||
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+incompatible // 22.06 branch (v22.06-dev)
|
||||
|
||||
// Resolve dependency hell with github.com/cloudflare/cfssl (transitive via
|
||||
// swarmkit) by pinning the certificate-transparency-go version. Remove once
|
||||
|
|
|
@ -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.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/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible h1:8fg+lTDVdv91JVw7B1juvVqgdh0zpzr36MmsA618oyI=
|
||||
github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+incompatible h1:gaceOC7utpmWqA7OF95kxXO2lGNTkbHIvgxpE+0hPi8=
|
||||
github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+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/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c=
|
||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*Package filters provides tools for encoding a mapping of keys to a set of
|
||||
/*
|
||||
Package filters provides tools for encoding a mapping of keys to a set of
|
||||
multiple values.
|
||||
*/
|
||||
package filters // import "github.com/docker/docker/api/types/filters"
|
||||
|
|
|
@ -45,6 +45,7 @@ func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) {
|
|||
// IndexInfo contains information about a registry
|
||||
//
|
||||
// RepositoryInfo Examples:
|
||||
//
|
||||
// {
|
||||
// "Index" : {
|
||||
// "Name" : "docker.io",
|
||||
|
|
|
@ -100,8 +100,10 @@ func GetTimestamp(value string, reference time.Time) (string, error) {
|
|||
// if the incoming nanosecond portion is longer or shorter than 9 digits it is
|
||||
// converted to nanoseconds. The expectation is that the seconds and
|
||||
// seconds will be used to create a time variable. For example:
|
||||
//
|
||||
// seconds, nanoseconds, err := ParseTimestamp("1136073600.000000001",0)
|
||||
// if err == nil since := time.Unix(seconds, nanoseconds)
|
||||
//
|
||||
// returns seconds as def(aultSeconds) if value == ""
|
||||
func ParseTimestamps(value string, def int64) (int64, int64, error) {
|
||||
if value == "" {
|
||||
|
|
|
@ -30,8 +30,7 @@ func IsURL(str string) bool {
|
|||
//
|
||||
// The following patterns are considered to be a Git URL:
|
||||
//
|
||||
// - https://(.*).git(?:#.+)?$ git repository URL with optional fragment, as
|
||||
// known to be used by GitHub and GitLab.
|
||||
// - https://(.*).git(?:#.+)?$ git repository URL with optional fragment, as known to be used by GitHub and GitLab.
|
||||
// - http://(.*).git(?:#.+)?$ same, but non-TLS
|
||||
// - git://(.*) URLs using git:// scheme
|
||||
// - git@(.*)
|
||||
|
@ -49,7 +48,7 @@ func IsURL(str string) bool {
|
|||
// path. Code using this function should check if the path exists locally before
|
||||
// using it as a URL.
|
||||
//
|
||||
// Fragments
|
||||
// # Fragments
|
||||
//
|
||||
// Git URLs accept context configuration in their fragment section, separated by
|
||||
// a colon (`:`). The first part represents the reference to check out, and can
|
||||
|
@ -74,7 +73,6 @@ func IsURL(str string) bool {
|
|||
// | my-repo.git#master:directory | refs/heads/master | /directory |
|
||||
// | my-repo.git#mytag:directory | refs/tags/my-tag | /directory |
|
||||
// | my-repo.git#mybranch:directory | refs/heads/my-branch | /directory |
|
||||
//
|
||||
func IsGitURL(str string) bool {
|
||||
if IsURL(str) && urlPathWithFragmentSuffix.MatchString(str) {
|
||||
return true
|
||||
|
|
|
@ -4,7 +4,7 @@ Package client is a Go client for the Docker Engine API.
|
|||
For more information about the Engine API, see the documentation:
|
||||
https://docs.docker.com/engine/api/
|
||||
|
||||
Usage
|
||||
# Usage
|
||||
|
||||
You use the library by creating a client object and calling methods on it. The
|
||||
client can be created either from environment variables with NewClientWithOpts(client.FromEnv),
|
||||
|
@ -37,7 +37,6 @@ For example, to list running containers (the equivalent of "docker ps"):
|
|||
fmt.Printf("%s %s\n", container.ID[:10], container.Image)
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
package client // import "github.com/docker/docker/client"
|
||||
|
||||
|
@ -121,12 +120,10 @@ func CheckRedirect(req *http.Request, via []*http.Request) error {
|
|||
// itself with values from environment variables (client.FromEnv), and has
|
||||
// automatic API version negotiation enabled (client.WithAPIVersionNegotiation()).
|
||||
//
|
||||
//
|
||||
// cli, err := client.NewClientWithOpts(
|
||||
// client.FromEnv,
|
||||
// client.WithAPIVersionNegotiation(),
|
||||
// )
|
||||
//
|
||||
func NewClientWithOpts(ops ...Opt) (*Client, error) {
|
||||
client, err := defaultHTTPClient(DefaultDockerHost)
|
||||
if err != nil {
|
||||
|
|
|
@ -40,11 +40,11 @@ type notFound interface {
|
|||
// IsErrNotFound returns true if the error is a NotFound error, which is returned
|
||||
// by the API when some object is not found.
|
||||
func IsErrNotFound(err error) bool {
|
||||
var e notFound
|
||||
if errors.As(err, &e) {
|
||||
if errdefs.IsNotFound(err) {
|
||||
return true
|
||||
}
|
||||
return errdefs.IsNotFound(err)
|
||||
var e notFound
|
||||
return errors.As(err, &e)
|
||||
}
|
||||
|
||||
type objectNotFoundError struct {
|
||||
|
@ -58,22 +58,11 @@ func (e objectNotFoundError) Error() string {
|
|||
return fmt.Sprintf("Error: No such %s: %s", e.object, e.id)
|
||||
}
|
||||
|
||||
// unauthorizedError represents an authorization error in a remote registry.
|
||||
type unauthorizedError struct {
|
||||
cause error
|
||||
}
|
||||
|
||||
// Error returns a string representation of an unauthorizedError
|
||||
func (u unauthorizedError) Error() string {
|
||||
return u.cause.Error()
|
||||
}
|
||||
|
||||
// IsErrUnauthorized returns true if the error is caused
|
||||
// when a remote registry authentication fails
|
||||
//
|
||||
// Deprecated: use errdefs.IsUnauthorized
|
||||
func IsErrUnauthorized(err error) bool {
|
||||
if _, ok := err.(unauthorizedError); ok {
|
||||
return ok
|
||||
}
|
||||
return errdefs.IsUnauthorized(err)
|
||||
}
|
||||
|
||||
|
@ -85,32 +74,12 @@ func (e pluginPermissionDenied) Error() string {
|
|||
return "Permission denied while installing plugin " + e.name
|
||||
}
|
||||
|
||||
// IsErrPluginPermissionDenied returns true if the error is caused
|
||||
// when a user denies a plugin's permissions
|
||||
func IsErrPluginPermissionDenied(err error) bool {
|
||||
_, ok := err.(pluginPermissionDenied)
|
||||
return ok
|
||||
}
|
||||
|
||||
type notImplementedError struct {
|
||||
message string
|
||||
}
|
||||
|
||||
func (e notImplementedError) Error() string {
|
||||
return e.message
|
||||
}
|
||||
|
||||
func (e notImplementedError) NotImplemented() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsErrNotImplemented returns true if the error is a NotImplemented error.
|
||||
// This is returned by the API when a requested feature has not been
|
||||
// implemented.
|
||||
//
|
||||
// Deprecated: use errdefs.IsNotImplemented
|
||||
func IsErrNotImplemented(err error) bool {
|
||||
if _, ok := err.(notImplementedError); ok {
|
||||
return ok
|
||||
}
|
||||
return errdefs.IsNotImplemented(err)
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
|
|||
}
|
||||
|
||||
if cli.scheme == "https" && strings.Contains(err.Error(), "bad certificate") {
|
||||
return serverResp, errors.Wrap(err, "The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings")
|
||||
return serverResp, errors.Wrap(err, "the server probably has client authentication (--tlsverify) enabled; check your TLS client certification settings")
|
||||
}
|
||||
|
||||
// Don't decorate context sentinel errors; users may be comparing to
|
||||
|
@ -153,7 +153,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
|
|||
if nErr, ok := err.(*url.Error); ok {
|
||||
if nErr, ok := nErr.Err.(*net.OpError); ok {
|
||||
if os.IsPermission(nErr.Err) {
|
||||
return serverResp, errors.Wrapf(err, "Got permission denied while trying to connect to the Docker daemon socket at %v", cli.host)
|
||||
return serverResp, errors.Wrapf(err, "permission denied while trying to connect to the Docker daemon socket at %v", cli.host)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,10 +180,10 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
|
|||
if strings.Contains(err.Error(), `open //./pipe/docker_engine`) {
|
||||
// Checks if client is running with elevated privileges
|
||||
if f, elevatedErr := os.Open("\\\\.\\PHYSICALDRIVE0"); elevatedErr == nil {
|
||||
err = errors.Wrap(err, "In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.")
|
||||
err = errors.Wrap(err, "in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect")
|
||||
} else {
|
||||
f.Close()
|
||||
err = errors.Wrap(err, "This error may indicate that the docker daemon is not running.")
|
||||
err = errors.Wrap(err, "this error may indicate that the docker daemon is not running")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1178,6 +1178,7 @@ loop:
|
|||
// and unpacks it into the directory at `dest`.
|
||||
// The archive may be compressed with one of the following algorithms:
|
||||
// identity (uncompressed), gzip, bzip2, xz.
|
||||
//
|
||||
// FIXME: specify behavior when target path exists vs. doesn't exist.
|
||||
func Untar(tarArchive io.Reader, dest string, options *TarOptions) error {
|
||||
return untarHandler(tarArchive, dest, options, true)
|
||||
|
|
|
@ -17,8 +17,8 @@ import (
|
|||
// Generate("foo.txt", "hello world", "emptyfile")
|
||||
//
|
||||
// The above call will return an archive with 2 files:
|
||||
// * ./foo.txt with content "hello world"
|
||||
// * ./empty with empty content
|
||||
// - ./foo.txt with content "hello world"
|
||||
// - ./empty with empty content
|
||||
//
|
||||
// FIXME: stream content instead of buffering
|
||||
// FIXME: specify permissions and other archive metadata
|
||||
|
|
|
@ -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/memory
|
||||
github.com/docker/distribution/uuid
|
||||
# github.com/docker/docker v20.10.14+incompatible => github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible
|
||||
# github.com/docker/docker v20.10.14+incompatible => github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+incompatible
|
||||
## explicit
|
||||
github.com/docker/docker/api
|
||||
github.com/docker/docker/api/types
|
||||
|
@ -390,5 +390,5 @@ gotest.tools/v3/internal/format
|
|||
gotest.tools/v3/internal/source
|
||||
gotest.tools/v3/poll
|
||||
gotest.tools/v3/skip
|
||||
# github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220624123139-4eb1c5bd52af+incompatible
|
||||
# github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+incompatible
|
||||
# github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.0.20
|
||||
|
|
Loading…
Reference in New Issue