vendor: github.com/docker/docker 164cae56ed95 (master, v-next)
full diff: 2269acc7a3...164cae56ed
Co-authored-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
2
vendor/github.com/docker/docker/api/common.go
generated
vendored
2
vendor/github.com/docker/docker/api/common.go
generated
vendored
@ -3,7 +3,7 @@ package api // import "github.com/docker/docker/api"
|
||||
// Common constants for daemon and client.
|
||||
const (
|
||||
// DefaultVersion of the current REST API.
|
||||
DefaultVersion = "1.47"
|
||||
DefaultVersion = "1.48"
|
||||
|
||||
// MinSupportedAPIVersion is the minimum API version that can be supported
|
||||
// by the API server, specified as "major.minor". Note that the daemon
|
||||
|
||||
91
vendor/github.com/docker/docker/api/swagger.yaml
generated
vendored
91
vendor/github.com/docker/docker/api/swagger.yaml
generated
vendored
@ -19,10 +19,10 @@ produces:
|
||||
consumes:
|
||||
- "application/json"
|
||||
- "text/plain"
|
||||
basePath: "/v1.47"
|
||||
basePath: "/v1.48"
|
||||
info:
|
||||
title: "Docker Engine API"
|
||||
version: "1.47"
|
||||
version: "1.48"
|
||||
x-logo:
|
||||
url: "https://docs.docker.com/assets/images/logo-docker-main.png"
|
||||
description: |
|
||||
@ -55,8 +55,8 @@ info:
|
||||
the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
|
||||
is returned.
|
||||
|
||||
If you omit the version-prefix, the current version of the API (v1.47) is used.
|
||||
For example, calling `/info` is the same as calling `/v1.47/info`. Using the
|
||||
If you omit the version-prefix, the current version of the API (v1.48) is used.
|
||||
For example, calling `/info` is the same as calling `/v1.48/info`. Using the
|
||||
API without a version-prefix is deprecated and will be removed in a future release.
|
||||
|
||||
Engine releases in the near future should support this version of the API,
|
||||
@ -393,7 +393,7 @@ definitions:
|
||||
Make the mount non-recursively read-only, but still leave the mount recursive
|
||||
(unless NonRecursive is set to `true` in conjunction).
|
||||
|
||||
Addded in v1.44, before that version all read-only mounts were
|
||||
Added in v1.44, before that version all read-only mounts were
|
||||
non-recursive by default. To match the previous behaviour this
|
||||
will default to `true` for clients on versions prior to v1.44.
|
||||
type: "boolean"
|
||||
@ -1384,7 +1384,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always empty. It must not be used, and will be removed in API v1.48.
|
||||
type: "string"
|
||||
example: ""
|
||||
Domainname:
|
||||
@ -1394,7 +1394,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always empty. It must not be used, and will be removed in API v1.48.
|
||||
type: "string"
|
||||
example: ""
|
||||
User:
|
||||
@ -1408,7 +1408,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always false. It must not be used, and will be removed in API v1.48.
|
||||
type: "boolean"
|
||||
default: false
|
||||
example: false
|
||||
@ -1419,7 +1419,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always false. It must not be used, and will be removed in API v1.48.
|
||||
type: "boolean"
|
||||
default: false
|
||||
example: false
|
||||
@ -1430,7 +1430,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always false. It must not be used, and will be removed in API v1.48.
|
||||
type: "boolean"
|
||||
default: false
|
||||
example: false
|
||||
@ -1457,7 +1457,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always false. It must not be used, and will be removed in API v1.48.
|
||||
type: "boolean"
|
||||
default: false
|
||||
example: false
|
||||
@ -1468,7 +1468,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always false. It must not be used, and will be removed in API v1.48.
|
||||
type: "boolean"
|
||||
default: false
|
||||
example: false
|
||||
@ -1479,7 +1479,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always false. It must not be used, and will be removed in API v1.48.
|
||||
type: "boolean"
|
||||
default: false
|
||||
example: false
|
||||
@ -1516,7 +1516,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always empty. It must not be used, and will be removed in API v1.48.
|
||||
type: "string"
|
||||
default: ""
|
||||
example: ""
|
||||
@ -1555,7 +1555,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always omitted. It must not be used, and will be removed in API v1.48.
|
||||
type: "boolean"
|
||||
default: false
|
||||
example: false
|
||||
@ -1567,7 +1567,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always omitted. It must not be used, and will be removed in API v1.48.
|
||||
type: "string"
|
||||
default: ""
|
||||
example: ""
|
||||
@ -1601,7 +1601,7 @@ definitions:
|
||||
<p><br /></p>
|
||||
|
||||
> **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.
|
||||
> always omitted. It must not be used, and will be removed in API v1.48.
|
||||
type: "integer"
|
||||
default: 10
|
||||
x-nullable: true
|
||||
@ -2216,7 +2216,7 @@ definitions:
|
||||
Created:
|
||||
description: |
|
||||
Date and time at which the image was created as a Unix timestamp
|
||||
(number of seconds sinds EPOCH).
|
||||
(number of seconds since EPOCH).
|
||||
type: "integer"
|
||||
x-nullable: false
|
||||
example: "1644009612"
|
||||
@ -2518,7 +2518,7 @@ definitions:
|
||||
example: false
|
||||
Attachable:
|
||||
description: |
|
||||
Wheter a global / swarm scope network is manually attachable by regular
|
||||
Whether a global / swarm scope network is manually attachable by regular
|
||||
containers from workers in swarm mode.
|
||||
type: "boolean"
|
||||
default: false
|
||||
@ -3741,7 +3741,7 @@ definitions:
|
||||
example: "json-file"
|
||||
Options:
|
||||
description: |
|
||||
Driver-specific options for the selectd log driver, specified
|
||||
Driver-specific options for the selected log driver, specified
|
||||
as key/value pairs.
|
||||
type: "object"
|
||||
additionalProperties:
|
||||
@ -5352,7 +5352,7 @@ definitions:
|
||||
The version Go used to compile the daemon, and the version of the Go
|
||||
runtime in use.
|
||||
type: "string"
|
||||
example: "go1.21.13"
|
||||
example: "go1.22.7"
|
||||
Os:
|
||||
description: |
|
||||
The operating system that the daemon is running on ("linux" or "windows")
|
||||
@ -5848,13 +5848,13 @@ definitions:
|
||||
- "/var/run/cdi"
|
||||
Containerd:
|
||||
$ref: "#/definitions/ContainerdInfo"
|
||||
x-nullable: true
|
||||
|
||||
ContainerdInfo:
|
||||
description: |
|
||||
Information for connecting to the containerd instance that is used by the daemon.
|
||||
This is included for debugging purposes only.
|
||||
type: "object"
|
||||
x-nullable: true
|
||||
properties:
|
||||
Address:
|
||||
description: "The address of the containerd socket."
|
||||
@ -7717,7 +7717,7 @@ paths:
|
||||
* Memory usage % = `(used_memory / available_memory) * 100.0`
|
||||
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
|
||||
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
|
||||
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
|
||||
* number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
|
||||
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
|
||||
operationId: "ContainerStats"
|
||||
produces: ["application/json"]
|
||||
@ -9202,6 +9202,15 @@ paths:
|
||||
description: "Image name or ID"
|
||||
type: "string"
|
||||
required: true
|
||||
- name: "platform"
|
||||
type: "string"
|
||||
in: "query"
|
||||
description: |
|
||||
JSON encoded OCI platform describing platform to show the history for.
|
||||
If not provided, the host platform will be used. If it's not
|
||||
available, any present platform will be picked.
|
||||
|
||||
Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
|
||||
tags: ["Image"]
|
||||
/images/{name}/push:
|
||||
post:
|
||||
@ -9231,12 +9240,23 @@ paths:
|
||||
parameters:
|
||||
- name: "name"
|
||||
in: "path"
|
||||
description: "Image name or ID."
|
||||
description: |
|
||||
Name of the image to push. For example, `registry.example.com/myimage`.
|
||||
The image must be present in the local image store with the same name.
|
||||
|
||||
The name should be provided without tag; if a tag is provided, it
|
||||
is ignored. For example, `registry.example.com/myimage:latest` is
|
||||
considered equivalent to `registry.example.com/myimage`.
|
||||
|
||||
Use the `tag` parameter to specify the tag to push.
|
||||
type: "string"
|
||||
required: true
|
||||
- name: "tag"
|
||||
in: "query"
|
||||
description: "The tag to associate with the image on the registry."
|
||||
description: |
|
||||
Tag of the image to push. For example, `latest`. If no tag is provided,
|
||||
all tags of the given image that are present in the local image store
|
||||
are pushed.
|
||||
type: "string"
|
||||
- name: "X-Registry-Auth"
|
||||
in: "header"
|
||||
@ -9936,7 +9956,16 @@ paths:
|
||||
description: "Image name or ID"
|
||||
type: "string"
|
||||
required: true
|
||||
tags: ["Image"]
|
||||
- name: "platform"
|
||||
type: "string"
|
||||
in: "query"
|
||||
description: |
|
||||
JSON encoded OCI platform describing a platform which will be used
|
||||
to select a platform-specific image to be saved if the image is
|
||||
multi-platform.
|
||||
If not provided, the full multi-platform image will be saved.
|
||||
|
||||
Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
|
||||
/images/get:
|
||||
get:
|
||||
summary: "Export several images"
|
||||
@ -10003,6 +10032,16 @@ paths:
|
||||
description: "Suppress progress details during load."
|
||||
type: "boolean"
|
||||
default: false
|
||||
- name: "platform"
|
||||
type: "string"
|
||||
in: "query"
|
||||
description: |
|
||||
JSON encoded OCI platform describing a platform which will be used
|
||||
to select a platform-specific image to be load if the image is
|
||||
multi-platform.
|
||||
If not provided, the full multi-platform image will be loaded.
|
||||
|
||||
Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
|
||||
tags: ["Image"]
|
||||
/containers/{id}/exec:
|
||||
post:
|
||||
|
||||
25
vendor/github.com/docker/docker/api/types/client.go
generated
vendored
25
vendor/github.com/docker/docker/api/types/client.go
generated
vendored
@ -129,14 +129,6 @@ type ImageBuildResponse struct {
|
||||
OSType string
|
||||
}
|
||||
|
||||
// RequestPrivilegeFunc is a function interface that
|
||||
// clients can supply to retry operations after
|
||||
// getting an authorization error.
|
||||
// This function returns the registry authentication
|
||||
// header value in base 64 format, or an error
|
||||
// if the privilege request fails.
|
||||
type RequestPrivilegeFunc func(context.Context) (string, error)
|
||||
|
||||
// NodeListOptions holds parameters to list nodes with.
|
||||
type NodeListOptions struct {
|
||||
Filters filters.Args
|
||||
@ -235,11 +227,18 @@ type PluginDisableOptions struct {
|
||||
|
||||
// PluginInstallOptions holds parameters to install a plugin.
|
||||
type PluginInstallOptions struct {
|
||||
Disabled bool
|
||||
AcceptAllPermissions bool
|
||||
RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
|
||||
RemoteRef string // RemoteRef is the plugin name on the registry
|
||||
PrivilegeFunc RequestPrivilegeFunc
|
||||
Disabled bool
|
||||
AcceptAllPermissions bool
|
||||
RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
|
||||
RemoteRef string // RemoteRef is the plugin name on 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.
|
||||
//
|
||||
// For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
|
||||
PrivilegeFunc func(context.Context) (string, error)
|
||||
AcceptPermissionsFunc func(context.Context, PluginPrivileges) (bool, error)
|
||||
Args []string
|
||||
}
|
||||
|
||||
5
vendor/github.com/docker/docker/api/types/container/hostconfig.go
generated
vendored
5
vendor/github.com/docker/docker/api/types/container/hostconfig.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
package container // import "github.com/docker/docker/api/types/container"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@ -325,12 +326,12 @@ func ValidateRestartPolicy(policy RestartPolicy) error {
|
||||
if policy.MaximumRetryCount < 0 {
|
||||
msg += " and cannot be negative"
|
||||
}
|
||||
return &errInvalidParameter{fmt.Errorf(msg)}
|
||||
return &errInvalidParameter{errors.New(msg)}
|
||||
}
|
||||
return nil
|
||||
case RestartPolicyOnFailure:
|
||||
if policy.MaximumRetryCount < 0 {
|
||||
return &errInvalidParameter{fmt.Errorf("invalid restart policy: maximum retry count cannot be negative")}
|
||||
return &errInvalidParameter{errors.New("invalid restart policy: maximum retry count cannot be negative")}
|
||||
}
|
||||
return nil
|
||||
case "":
|
||||
|
||||
2
vendor/github.com/docker/docker/api/types/filters/parse.go
generated
vendored
2
vendor/github.com/docker/docker/api/types/filters/parse.go
generated
vendored
@ -196,7 +196,7 @@ func (args Args) Match(field, source string) bool {
|
||||
}
|
||||
|
||||
// GetBoolOrDefault returns a boolean value of the key if the key is present
|
||||
// and is intepretable as a boolean value. Otherwise the default value is returned.
|
||||
// and is interpretable as a boolean value. Otherwise the default value is returned.
|
||||
// Error is not nil only if the filter values are not valid boolean or are conflicting.
|
||||
func (args Args) GetBoolOrDefault(key string, defaultValue bool) (bool, error) {
|
||||
fieldValues, ok := args.fields[key]
|
||||
|
||||
25
vendor/github.com/docker/docker/api/types/image/opts.go
generated
vendored
25
vendor/github.com/docker/docker/api/types/image/opts.go
generated
vendored
@ -38,7 +38,7 @@ type PullOptions struct {
|
||||
// authentication header value in base64 encoded format, or an error if the
|
||||
// privilege request fails.
|
||||
//
|
||||
// Also see [github.com/docker/docker/api/types.RequestPrivilegeFunc].
|
||||
// For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
|
||||
PrivilegeFunc func(context.Context) (string, error)
|
||||
Platform string
|
||||
}
|
||||
@ -53,7 +53,7 @@ type PushOptions struct {
|
||||
// authentication header value in base64 encoded format, or an error if the
|
||||
// privilege request fails.
|
||||
//
|
||||
// Also see [github.com/docker/docker/api/types.RequestPrivilegeFunc].
|
||||
// For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
|
||||
PrivilegeFunc func(context.Context) (string, error)
|
||||
|
||||
// Platform is an optional field that selects a specific platform to push
|
||||
@ -86,3 +86,24 @@ type RemoveOptions struct {
|
||||
Force bool
|
||||
PruneChildren bool
|
||||
}
|
||||
|
||||
// HistoryOptions holds parameters to get image history.
|
||||
type HistoryOptions struct {
|
||||
// Platform from the manifest list to use for history.
|
||||
Platform *ocispec.Platform
|
||||
}
|
||||
|
||||
// LoadOptions holds parameters to load images.
|
||||
type LoadOptions struct {
|
||||
// Quiet suppresses progress output
|
||||
Quiet bool
|
||||
|
||||
// Platform is a specific platform to load when the image is a multi-platform
|
||||
Platform *ocispec.Platform
|
||||
}
|
||||
|
||||
// SaveOptions holds parameters to save images.
|
||||
type SaveOptions struct {
|
||||
// Platform is a specific platform to save if the image is a multi-platform image.
|
||||
Platform *ocispec.Platform
|
||||
}
|
||||
|
||||
2
vendor/github.com/docker/docker/api/types/image/summary.go
generated
vendored
2
vendor/github.com/docker/docker/api/types/image/summary.go
generated
vendored
@ -12,7 +12,7 @@ type Summary struct {
|
||||
Containers int64 `json:"Containers"`
|
||||
|
||||
// Date and time at which the image was created as a Unix timestamp
|
||||
// (number of seconds sinds EPOCH).
|
||||
// (number of seconds since EPOCH).
|
||||
//
|
||||
// Required: true
|
||||
Created int64 `json:"Created"`
|
||||
|
||||
27
vendor/github.com/docker/docker/api/types/registry/authconfig.go
generated
vendored
27
vendor/github.com/docker/docker/api/types/registry/authconfig.go
generated
vendored
@ -1,5 +1,6 @@
|
||||
package registry // import "github.com/docker/docker/api/types/registry"
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"io"
|
||||
@ -12,6 +13,18 @@ import (
|
||||
// authorization credentials for registry operations (push/pull).
|
||||
const AuthHeader = "X-Registry-Auth"
|
||||
|
||||
// RequestAuthConfig is a function interface that clients can supply
|
||||
// to retry operations after getting an authorization error.
|
||||
//
|
||||
// The function must return the [AuthHeader] value ([AuthConfig]), encoded
|
||||
// in base64url format ([RFC4648, section 5]), which can be decoded by
|
||||
// [DecodeAuthConfig].
|
||||
//
|
||||
// It must return an error if the privilege request fails.
|
||||
//
|
||||
// [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5
|
||||
type RequestAuthConfig func(context.Context) (string, error)
|
||||
|
||||
// AuthConfig contains authorization information for connecting to a Registry.
|
||||
type AuthConfig struct {
|
||||
Username string `json:"username,omitempty"`
|
||||
@ -34,10 +47,9 @@ type AuthConfig struct {
|
||||
}
|
||||
|
||||
// EncodeAuthConfig serializes the auth configuration as a base64url encoded
|
||||
// RFC4648, section 5) JSON string for sending through the X-Registry-Auth header.
|
||||
// ([RFC4648, section 5]) JSON string for sending through the X-Registry-Auth header.
|
||||
//
|
||||
// For details on base64url encoding, see:
|
||||
// - RFC4648, section 5: https://tools.ietf.org/html/rfc4648#section-5
|
||||
// [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5
|
||||
func EncodeAuthConfig(authConfig AuthConfig) (string, error) {
|
||||
buf, err := json.Marshal(authConfig)
|
||||
if err != nil {
|
||||
@ -46,15 +58,14 @@ func EncodeAuthConfig(authConfig AuthConfig) (string, error) {
|
||||
return base64.URLEncoding.EncodeToString(buf), nil
|
||||
}
|
||||
|
||||
// DecodeAuthConfig decodes base64url encoded (RFC4648, section 5) JSON
|
||||
// DecodeAuthConfig decodes base64url encoded ([RFC4648, section 5]) JSON
|
||||
// authentication information as sent through the X-Registry-Auth header.
|
||||
//
|
||||
// This function always returns an AuthConfig, even if an error occurs. It is up
|
||||
// This function always returns an [AuthConfig], even if an error occurs. It is up
|
||||
// to the caller to decide if authentication is required, and if the error can
|
||||
// be ignored.
|
||||
//
|
||||
// For details on base64url encoding, see:
|
||||
// - RFC4648, section 5: https://tools.ietf.org/html/rfc4648#section-5
|
||||
// [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5
|
||||
func DecodeAuthConfig(authEncoded string) (*AuthConfig, error) {
|
||||
if authEncoded == "" {
|
||||
return &AuthConfig{}, nil
|
||||
@ -69,7 +80,7 @@ func DecodeAuthConfig(authEncoded string) (*AuthConfig, error) {
|
||||
// clients and API versions. Current clients and API versions expect authentication
|
||||
// to be provided through the X-Registry-Auth header.
|
||||
//
|
||||
// Like DecodeAuthConfig, this function always returns an AuthConfig, even if an
|
||||
// Like [DecodeAuthConfig], this function always returns an [AuthConfig], even if an
|
||||
// error occurs. It is up to the caller to decide if authentication is required,
|
||||
// and if the error can be ignored.
|
||||
func DecodeAuthConfigBody(rdr io.ReadCloser) (*AuthConfig, error) {
|
||||
|
||||
9
vendor/github.com/docker/docker/api/types/registry/search.go
generated
vendored
9
vendor/github.com/docker/docker/api/types/registry/search.go
generated
vendored
@ -10,11 +10,12 @@ import (
|
||||
type SearchOptions struct {
|
||||
RegistryAuth string
|
||||
|
||||
// PrivilegeFunc is a [types.RequestPrivilegeFunc] the client can
|
||||
// supply to retry operations after getting an authorization error.
|
||||
// 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.
|
||||
//
|
||||
// It must return the registry authentication header value in base64
|
||||
// format, or an error if the privilege request fails.
|
||||
// For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
|
||||
PrivilegeFunc func(context.Context) (string, error)
|
||||
Filters filters.Args
|
||||
Limit int
|
||||
|
||||
2
vendor/github.com/docker/docker/api/types/swarm/swarm.go
generated
vendored
2
vendor/github.com/docker/docker/api/types/swarm/swarm.go
generated
vendored
@ -122,7 +122,7 @@ type CAConfig struct {
|
||||
SigningCAKey string `json:",omitempty"`
|
||||
|
||||
// If this value changes, and there is no specified signing cert and key,
|
||||
// then the swarm is forced to generate a new root certificate ane key.
|
||||
// then the swarm is forced to generate a new root certificate and key.
|
||||
ForceRotate uint64 `json:",omitempty"`
|
||||
}
|
||||
|
||||
|
||||
10
vendor/github.com/docker/docker/api/types/types_deprecated.go
generated
vendored
10
vendor/github.com/docker/docker/api/types/types_deprecated.go
generated
vendored
@ -1,6 +1,8 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/image"
|
||||
"github.com/docker/docker/api/types/storage"
|
||||
@ -97,3 +99,11 @@ type RootFS = image.RootFS
|
||||
//
|
||||
// Deprecated: use [image.InspectResponse].
|
||||
type ImageInspect = image.InspectResponse
|
||||
|
||||
// RequestPrivilegeFunc is a function interface that clients can supply to
|
||||
// retry operations after getting an authorization error.
|
||||
// This function returns the registry authentication header value in base64
|
||||
// format, or an error if the privilege request fails.
|
||||
//
|
||||
// Deprecated: moved to [github.com/docker/docker/api/types/registry.RequestAuthConfig].
|
||||
type RequestPrivilegeFunc func(context.Context) (string, error)
|
||||
|
||||
2
vendor/github.com/docker/docker/api/types/volume/cluster_volume.go
generated
vendored
2
vendor/github.com/docker/docker/api/types/volume/cluster_volume.go
generated
vendored
@ -414,7 +414,7 @@ type Info struct {
|
||||
// the Volume has not been successfully created yet.
|
||||
VolumeID string `json:",omitempty"`
|
||||
|
||||
// AccessibleTopolgoy is the topology this volume is actually accessible
|
||||
// AccessibleTopology is the topology this volume is actually accessible
|
||||
// from.
|
||||
AccessibleTopology []Topology `json:",omitempty"`
|
||||
}
|
||||
|
||||
18
vendor/github.com/docker/docker/client/image_history.go
generated
vendored
18
vendor/github.com/docker/docker/client/image_history.go
generated
vendored
@ -3,15 +3,29 @@ package client // import "github.com/docker/docker/client"
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/docker/docker/api/types/image"
|
||||
)
|
||||
|
||||
// ImageHistory returns the changes in an image in history format.
|
||||
func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error) {
|
||||
func (cli *Client) ImageHistory(ctx context.Context, imageID string, opts image.HistoryOptions) ([]image.HistoryResponseItem, error) {
|
||||
values := url.Values{}
|
||||
if opts.Platform != nil {
|
||||
if err := cli.NewVersionError(ctx, "1.48", "platform"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p, err := json.Marshal(*opts.Platform)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid platform: %v", err)
|
||||
}
|
||||
values.Set("platform", string(p))
|
||||
}
|
||||
|
||||
var history []image.HistoryResponseItem
|
||||
serverResp, err := cli.get(ctx, "/images/"+imageID+"/history", url.Values{}, nil)
|
||||
serverResp, err := cli.get(ctx, "/images/"+imageID+"/history", values, nil)
|
||||
defer ensureReaderClosed(serverResp)
|
||||
if err != nil {
|
||||
return history, err
|
||||
|
||||
21
vendor/github.com/docker/docker/client/image_load.go
generated
vendored
21
vendor/github.com/docker/docker/client/image_load.go
generated
vendored
@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@ -12,12 +13,28 @@ import (
|
||||
// ImageLoad loads an image in the docker host from the client host.
|
||||
// It's up to the caller to close the io.ReadCloser in the
|
||||
// ImageLoadResponse returned by this function.
|
||||
func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (image.LoadResponse, error) {
|
||||
//
|
||||
// Platform is an optional parameter that specifies the platform to load from
|
||||
// the provided multi-platform image. This is only has effect if the input image
|
||||
// is a multi-platform image.
|
||||
func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, opts image.LoadOptions) (image.LoadResponse, error) {
|
||||
v := url.Values{}
|
||||
v.Set("quiet", "0")
|
||||
if quiet {
|
||||
if opts.Quiet {
|
||||
v.Set("quiet", "1")
|
||||
}
|
||||
if opts.Platform != nil {
|
||||
if err := cli.NewVersionError(ctx, "1.48", "platform"); err != nil {
|
||||
return image.LoadResponse{}, err
|
||||
}
|
||||
|
||||
p, err := json.Marshal(*opts.Platform)
|
||||
if err != nil {
|
||||
return image.LoadResponse{}, err
|
||||
}
|
||||
v.Set("platform", string(p))
|
||||
}
|
||||
|
||||
resp, err := cli.postRaw(ctx, "/images/load", v, input, http.Header{
|
||||
"Content-Type": {"application/x-tar"},
|
||||
})
|
||||
|
||||
18
vendor/github.com/docker/docker/client/image_save.go
generated
vendored
18
vendor/github.com/docker/docker/client/image_save.go
generated
vendored
@ -2,17 +2,33 @@ package client // import "github.com/docker/docker/client"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
|
||||
"github.com/docker/docker/api/types/image"
|
||||
)
|
||||
|
||||
// ImageSave retrieves one or more images from the docker host as an io.ReadCloser.
|
||||
// It's up to the caller to store the images and close the stream.
|
||||
func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) {
|
||||
func (cli *Client) ImageSave(ctx context.Context, imageIDs []string, opts image.SaveOptions) (io.ReadCloser, error) {
|
||||
query := url.Values{
|
||||
"names": imageIDs,
|
||||
}
|
||||
|
||||
if opts.Platform != nil {
|
||||
if err := cli.NewVersionError(ctx, "1.48", "platform"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p, err := json.Marshal(*opts.Platform)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid platform: %v", err)
|
||||
}
|
||||
query.Set("platform", string(p))
|
||||
}
|
||||
|
||||
resp, err := cli.get(ctx, "/images/get", query, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
6
vendor/github.com/docker/docker/client/interface.go
generated
vendored
6
vendor/github.com/docker/docker/client/interface.go
generated
vendored
@ -91,16 +91,16 @@ type ImageAPIClient interface {
|
||||
BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
|
||||
BuildCancel(ctx context.Context, id string) error
|
||||
ImageCreate(ctx context.Context, parentReference string, options image.CreateOptions) (io.ReadCloser, error)
|
||||
ImageHistory(ctx context.Context, image string) ([]image.HistoryResponseItem, error)
|
||||
ImageHistory(ctx context.Context, image string, opts image.HistoryOptions) ([]image.HistoryResponseItem, error)
|
||||
ImageImport(ctx context.Context, source image.ImportSource, ref string, options image.ImportOptions) (io.ReadCloser, error)
|
||||
ImageInspectWithRaw(ctx context.Context, image string) (image.InspectResponse, []byte, error)
|
||||
ImageList(ctx context.Context, options image.ListOptions) ([]image.Summary, error)
|
||||
ImageLoad(ctx context.Context, input io.Reader, quiet bool) (image.LoadResponse, error)
|
||||
ImageLoad(ctx context.Context, input io.Reader, opts image.LoadOptions) (image.LoadResponse, error)
|
||||
ImagePull(ctx context.Context, ref string, options image.PullOptions) (io.ReadCloser, error)
|
||||
ImagePush(ctx context.Context, ref string, options image.PushOptions) (io.ReadCloser, error)
|
||||
ImageRemove(ctx context.Context, image string, options image.RemoveOptions) ([]image.DeleteResponse, error)
|
||||
ImageSave(ctx context.Context, images []string, opts image.SaveOptions) (io.ReadCloser, error)
|
||||
ImageSearch(ctx context.Context, term string, options registry.SearchOptions) ([]registry.SearchResult, error)
|
||||
ImageSave(ctx context.Context, images []string) (io.ReadCloser, error)
|
||||
ImageTag(ctx context.Context, image, ref string) error
|
||||
ImagesPrune(ctx context.Context, pruneFilter filters.Args) (image.PruneReport, error)
|
||||
}
|
||||
|
||||
2
vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go
generated
vendored
2
vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go
generated
vendored
@ -290,7 +290,7 @@ func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr,
|
||||
}
|
||||
|
||||
// Stream is an io.Writer for output with utilities to get the output's file
|
||||
// descriptor and to detect wether it's a terminal.
|
||||
// descriptor and to detect whether it's a terminal.
|
||||
//
|
||||
// it is subset of the streams.Out type in
|
||||
// https://pkg.go.dev/github.com/docker/cli@v20.10.17+incompatible/cli/streams#Out
|
||||
|
||||
2
vendor/github.com/docker/docker/pkg/pools/pools.go
generated
vendored
2
vendor/github.com/docker/docker/pkg/pools/pools.go
generated
vendored
@ -124,7 +124,7 @@ func (bufPool *BufioWriterPool) Put(b *bufio.Writer) {
|
||||
}
|
||||
|
||||
// NewWriteCloserWrapper returns a wrapper which puts the bufio.Writer back
|
||||
// into the pool and closes the writer if it's an io.Writecloser.
|
||||
// into the pool and closes the writer if it's an io.WriteCloser.
|
||||
func (bufPool *BufioWriterPool) NewWriteCloserWrapper(buf *bufio.Writer, w io.Writer) io.WriteCloser {
|
||||
return ioutils.NewWriteCloserWrapper(w, func() error {
|
||||
buf.Flush()
|
||||
|
||||
2
vendor/github.com/docker/docker/pkg/system/xattrs_linux.go
generated
vendored
2
vendor/github.com/docker/docker/pkg/system/xattrs_linux.go
generated
vendored
@ -6,7 +6,7 @@ import (
|
||||
|
||||
// Lgetxattr retrieves the value of the extended attribute identified by attr
|
||||
// and associated with the given path in the file system.
|
||||
// It will returns a nil slice and nil error if the xattr is not set.
|
||||
// It returns a nil slice and nil error if the xattr is not set.
|
||||
func Lgetxattr(path string, attr string) ([]byte, error) {
|
||||
sysErr := func(err error) ([]byte, error) {
|
||||
return nil, &XattrError{Op: "lgetxattr", Attr: attr, Path: path, Err: err}
|
||||
|
||||
2
vendor/github.com/docker/docker/registry/config.go
generated
vendored
2
vendor/github.com/docker/docker/registry/config.go
generated
vendored
@ -359,7 +359,7 @@ func hasScheme(reposName string) bool {
|
||||
}
|
||||
|
||||
func validateHostPort(s string) error {
|
||||
// Split host and port, and in case s can not be splitted, assume host only
|
||||
// Split host and port, and in case s can not be split, assume host only
|
||||
host, port, err := net.SplitHostPort(s)
|
||||
if err != nil {
|
||||
host = s
|
||||
|
||||
Reference in New Issue
Block a user