mirror of https://github.com/docker/cli.git
vendor: github.com/docker/docker v27.0.0-dev (9d9488468fe2)
full diff: a736d0701c...9d9488468f
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
cba002eb5e
commit
892784deed
|
@ -12,7 +12,7 @@ require (
|
||||||
github.com/creack/pty v1.1.21
|
github.com/creack/pty v1.1.21
|
||||||
github.com/distribution/reference v0.6.0
|
github.com/distribution/reference v0.6.0
|
||||||
github.com/docker/distribution v2.8.3+incompatible
|
github.com/docker/distribution v2.8.3+incompatible
|
||||||
github.com/docker/docker v26.1.1-0.20240610145149-a736d0701c41+incompatible // master (v27.0.0-dev)
|
github.com/docker/docker v26.1.1-0.20240610201418-9d9488468fe2+incompatible // master (v27.0.0-dev)
|
||||||
github.com/docker/docker-credential-helpers v0.8.2
|
github.com/docker/docker-credential-helpers v0.8.2
|
||||||
github.com/docker/go-connections v0.5.0
|
github.com/docker/go-connections v0.5.0
|
||||||
github.com/docker/go-units v0.5.0
|
github.com/docker/go-units v0.5.0
|
||||||
|
|
|
@ -59,8 +59,8 @@ github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5
|
||||||
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.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/docker v26.1.1-0.20240610145149-a736d0701c41+incompatible h1:Kraon288jb3POkrmM5w6Xo979z2rrCtFzHycAjafRes=
|
github.com/docker/docker v26.1.1-0.20240610201418-9d9488468fe2+incompatible h1:k63BdhjySkwvmdeofOsBElcuVrWaDBrI7FQgnyoVnnM=
|
||||||
github.com/docker/docker v26.1.1-0.20240610145149-a736d0701c41+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v26.1.1-0.20240610201418-9d9488468fe2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
|
github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
|
||||||
github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
||||||
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=
|
||||||
|
|
|
@ -1368,7 +1368,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always empty and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always empty. It must not be used, and will be removed in API v1.47.
|
||||||
type: "string"
|
type: "string"
|
||||||
example: ""
|
example: ""
|
||||||
Domainname:
|
Domainname:
|
||||||
|
@ -1377,7 +1378,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always empty and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always empty. It must not be used, and will be removed in API v1.47.
|
||||||
type: "string"
|
type: "string"
|
||||||
example: ""
|
example: ""
|
||||||
User:
|
User:
|
||||||
|
@ -1390,7 +1392,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always false and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always false. It must not be used, and will be removed in API v1.47.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
|
@ -1400,7 +1403,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always false and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always false. It must not be used, and will be removed in API v1.47.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
|
@ -1410,7 +1414,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always false and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always false. It must not be used, and will be removed in API v1.47.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
|
@ -1436,7 +1441,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always false and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always false. It must not be used, and will be removed in API v1.47.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
|
@ -1446,7 +1452,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always false and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always false. It must not be used, and will be removed in API v1.47.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
|
@ -1456,7 +1463,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always false and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always false. It must not be used, and will be removed in API v1.47.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
|
@ -1492,7 +1500,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always empty and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always empty. It must not be used, and will be removed in API v1.47.
|
||||||
type: "string"
|
type: "string"
|
||||||
default: ""
|
default: ""
|
||||||
example: ""
|
example: ""
|
||||||
|
@ -1530,7 +1539,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always omitted and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always omitted. It must not be used, and will be removed in API v1.47.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
|
@ -1541,7 +1551,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Deprecated**: this field is deprecated in API v1.44 and up. It is always omitted.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always omitted. It must not be used, and will be removed in API v1.47.
|
||||||
type: "string"
|
type: "string"
|
||||||
default: ""
|
default: ""
|
||||||
example: ""
|
example: ""
|
||||||
|
@ -1574,7 +1585,8 @@ definitions:
|
||||||
|
|
||||||
<p><br /></p>
|
<p><br /></p>
|
||||||
|
|
||||||
> **Note**: this field is always omitted and must not be used.
|
> **Deprecated**: this field is not part of the image specification and is
|
||||||
|
> always omitted. It must not be used, and will be removed in API v1.47.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
default: 10
|
default: 10
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
@ -2115,6 +2127,7 @@ definitions:
|
||||||
format: "dateTime"
|
format: "dateTime"
|
||||||
example: "2022-02-28T14:40:02.623929178Z"
|
example: "2022-02-28T14:40:02.623929178Z"
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
|
||||||
ImageSummary:
|
ImageSummary:
|
||||||
type: "object"
|
type: "object"
|
||||||
x-go-name: "Summary"
|
x-go-name: "Summary"
|
||||||
|
@ -9023,6 +9036,11 @@ paths:
|
||||||
details.
|
details.
|
||||||
type: "string"
|
type: "string"
|
||||||
required: true
|
required: true
|
||||||
|
- name: "platform"
|
||||||
|
in: "query"
|
||||||
|
description: "Select a platform-specific manifest to be pushed. OCI platform (JSON encoded)"
|
||||||
|
type: "string"
|
||||||
|
x-nullable: true
|
||||||
tags: ["Image"]
|
tags: ["Image"]
|
||||||
/images/{name}/tag:
|
/images/{name}/tag:
|
||||||
post:
|
post:
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ImportSource holds source information for ImageImport
|
// ImportSource holds source information for ImageImport
|
||||||
|
@ -43,7 +44,23 @@ type PullOptions struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// PushOptions holds information to push images.
|
// PushOptions holds information to push images.
|
||||||
type PushOptions PullOptions
|
type PushOptions struct {
|
||||||
|
All bool
|
||||||
|
RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
|
||||||
|
|
||||||
|
// PrivilegeFunc is a function that clients can supply to retry operations
|
||||||
|
// after getting an authorization error. This function returns the registry
|
||||||
|
// authentication header value in base64 encoded format, or an error if the
|
||||||
|
// privilege request fails.
|
||||||
|
//
|
||||||
|
// Also see [github.com/docker/docker/api/types.RequestPrivilegeFunc].
|
||||||
|
PrivilegeFunc func(context.Context) (string, error)
|
||||||
|
|
||||||
|
// Platform is an optional field that selects a specific platform to push
|
||||||
|
// when the image is a multi-platform image.
|
||||||
|
// Using this will only push a single platform-specific manifest.
|
||||||
|
Platform *ocispec.Platform `json:",omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// ListOptions holds parameters to list images with.
|
// ListOptions holds parameters to list images with.
|
||||||
type ListOptions struct {
|
type ListOptions struct {
|
||||||
|
|
|
@ -2,7 +2,9 @@ package client // import "github.com/docker/docker/client"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
@ -36,6 +38,20 @@ func (cli *Client) ImagePush(ctx context.Context, image string, options image.Pu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if options.Platform != nil {
|
||||||
|
if err := cli.NewVersionError(ctx, "1.46", "platform"); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
p := *options.Platform
|
||||||
|
pJson, err := json.Marshal(p)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("invalid platform: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
query.Set("platform", string(pJson))
|
||||||
|
}
|
||||||
|
|
||||||
resp, err := cli.tryImagePush(ctx, name, query, options.RegistryAuth)
|
resp, err := cli.tryImagePush(ctx, name, query, options.RegistryAuth)
|
||||||
if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil {
|
if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil {
|
||||||
newAuthHeader, privilegeErr := options.PrivilegeFunc(ctx)
|
newAuthHeader, privilegeErr := options.PrivilegeFunc(ctx)
|
||||||
|
|
|
@ -6,6 +6,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/containerd/containerd/pkg/userns"
|
||||||
"github.com/docker/docker/pkg/system"
|
"github.com/docker/docker/pkg/system"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
@ -35,13 +36,18 @@ func (overlayWhiteoutConverter) ConvertWrite(hdr *tar.Header, path string, fi os
|
||||||
}
|
}
|
||||||
|
|
||||||
if fi.Mode()&os.ModeDir != 0 {
|
if fi.Mode()&os.ModeDir != 0 {
|
||||||
|
opaqueXattrName := "trusted.overlay.opaque"
|
||||||
|
if userns.RunningInUserNS() {
|
||||||
|
opaqueXattrName = "user.overlay.opaque"
|
||||||
|
}
|
||||||
|
|
||||||
// convert opaque dirs to AUFS format by writing an empty file with the prefix
|
// convert opaque dirs to AUFS format by writing an empty file with the prefix
|
||||||
opaque, err := system.Lgetxattr(path, "trusted.overlay.opaque")
|
opaque, err := system.Lgetxattr(path, opaqueXattrName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(opaque) == 1 && opaque[0] == 'y' {
|
if len(opaque) == 1 && opaque[0] == 'y' {
|
||||||
delete(hdr.PAXRecords, paxSchilyXattr+"trusted.overlay.opaque")
|
delete(hdr.PAXRecords, paxSchilyXattr+opaqueXattrName)
|
||||||
|
|
||||||
// create a header for the whiteout file
|
// create a header for the whiteout file
|
||||||
// it should inherit some properties from the parent, but be a regular file
|
// it should inherit some properties from the parent, but be a regular file
|
||||||
|
@ -69,9 +75,14 @@ func (c overlayWhiteoutConverter) ConvertRead(hdr *tar.Header, path string) (boo
|
||||||
|
|
||||||
// if a directory is marked as opaque by the AUFS special file, we need to translate that to overlay
|
// if a directory is marked as opaque by the AUFS special file, we need to translate that to overlay
|
||||||
if base == WhiteoutOpaqueDir {
|
if base == WhiteoutOpaqueDir {
|
||||||
err := unix.Setxattr(dir, "trusted.overlay.opaque", []byte{'y'}, 0)
|
opaqueXattrName := "trusted.overlay.opaque"
|
||||||
|
if userns.RunningInUserNS() {
|
||||||
|
opaqueXattrName = "user.overlay.opaque"
|
||||||
|
}
|
||||||
|
|
||||||
|
err := unix.Setxattr(dir, opaqueXattrName, []byte{'y'}, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, errors.Wrapf(err, "setxattr(%q, trusted.overlay.opaque=y)", dir)
|
return false, errors.Wrapf(err, "setxattr(%q, %s=y)", dir, opaqueXattrName)
|
||||||
}
|
}
|
||||||
// don't write the file itself
|
// don't write the file itself
|
||||||
return false, err
|
return false, err
|
||||||
|
|
|
@ -56,7 +56,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 v26.1.1-0.20240610145149-a736d0701c41+incompatible
|
# github.com/docker/docker v26.1.1-0.20240610201418-9d9488468fe2+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
|
||||||
|
|
Loading…
Reference in New Issue