Change all references to docker registry to container registry
Will leave references to distribution spec until there is an OCI Spec we
can point at.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Daniel J Walsh
2 years ago
4 | 4 |
containers' images and container image registries.
|
5 | 5 |
|
6 | 6 |
The containers/image library allows application to pull and push images from
|
7 | |
container image registries, like the upstream docker registry. It also
|
|
7 |
container image registries, like the docker.io and quay.io registries. It also
|
8 | 8 |
implements "simple image signing".
|
9 | 9 |
|
10 | 10 |
The containers/image library also allows you to inspect a repository on a
|
91 | 91 |
expirationTime time.Time
|
92 | 92 |
}
|
93 | 93 |
|
94 | |
// dockerClient is configuration for dealing with a single Docker registry.
|
|
94 |
// dockerClient is configuration for dealing with a single container registry.
|
95 | 95 |
type dockerClient struct {
|
96 | 96 |
// The following members are set by newDockerClient and do not change afterwards.
|
97 | 97 |
sys *types.SystemContext
|
|
751 | 751 |
err = ping("http")
|
752 | 752 |
}
|
753 | 753 |
if err != nil {
|
754 | |
err = errors.Wrapf(err, "error pinging docker registry %s", c.registry)
|
|
754 |
err = errors.Wrapf(err, "error pinging container registry %s", c.registry)
|
755 | 755 |
if c.sys != nil && c.sys.DockerDisableV1Ping {
|
756 | 756 |
return err
|
757 | 757 |
}
|
15 | 15 |
transports.Register(Transport)
|
16 | 16 |
}
|
17 | 17 |
|
18 | |
// Transport is an ImageTransport for Docker registry-hosted images.
|
|
18 |
// Transport is an ImageTransport for container registry-hosted images.
|
19 | 19 |
var Transport = dockerTransport{}
|
20 | 20 |
|
21 | 21 |
type dockerTransport struct{}
|
11 | 11 |
var (
|
12 | 12 |
// ErrV1NotSupported is returned when we're trying to talk to a
|
13 | 13 |
// docker V1 registry.
|
14 | |
ErrV1NotSupported = errors.New("can't talk to a V1 docker registry")
|
|
14 |
ErrV1NotSupported = errors.New("can't talk to a V1 container registry")
|
15 | 15 |
// ErrTooManyRequests is returned when the status code returned is 429
|
16 | 16 |
ErrTooManyRequests = errors.New("too many requests to registry")
|
17 | 17 |
)
|
67 | 67 |
a host/namespace/image stream or a wildcarded expression for matching all
|
68 | 68 |
subdomains. For wildcarded subdomain matching, `*.example.com` is a valid case, but `example*.*.com` is not.
|
69 | 69 |
|
70 | |
*Note:* The _hostname_ and _port_ refer to the Docker registry host and port (the one used
|
|
70 |
*Note:* The _hostname_ and _port_ refer to the container registry host and port (the one used
|
71 | 71 |
e.g. for `docker pull`), _not_ to the OpenShift API host and port.
|
72 | 72 |
|
73 | 73 |
### `dir:`
|
194 | 194 |
}
|
195 | 195 |
|
196 | 196 |
// AddDummyV2S1Signature adds an JWS signature with a temporary key (i.e. useless) to a v2s1 manifest.
|
197 | |
// This is useful to make the manifest acceptable to a Docker Registry (even though nothing needs or wants the JWS signature).
|
|
197 |
// This is useful to make the manifest acceptable to a docker/distribution registry (even though nothing needs or wants the JWS signature).
|
198 | 198 |
func AddDummyV2S1Signature(manifest []byte) ([]byte, error) {
|
199 | 199 |
key, err := libtrust.GenerateECP256PrivateKey()
|
200 | 200 |
if err != nil {
|
163 | 163 |
// Values specific to this image
|
164 | 164 |
sys *types.SystemContext
|
165 | 165 |
// State
|
166 | |
docker types.ImageSource // The Docker Registry endpoint, or nil if not resolved yet
|
|
166 |
docker types.ImageSource // The docker/distribution API endpoint, or nil if not resolved yet
|
167 | 167 |
imageStreamImageName string // Resolved image identifier, or "" if not known yet
|
168 | 168 |
}
|
169 | 169 |
|
|
315 | 315 |
|
316 | 316 |
type openshiftImageDestination struct {
|
317 | 317 |
client *openshiftClient
|
318 | |
docker types.ImageDestination // The Docker Registry endpoint
|
|
318 |
docker types.ImageDestination // The docker/distribution API endpoint
|
319 | 319 |
// State
|
320 | 320 |
imageStreamImageName string // "" if not yet known
|
321 | 321 |
}
|
305 | 305 |
// .docker/config.json
|
306 | 306 |
//
|
307 | 307 |
// Deprecated: This API only has support for username and password. To get the
|
308 | |
// support for oauth2 in docker registry authentication, we added the new
|
|
308 |
// support for oauth2 in container registry authentication, we added the new
|
309 | 309 |
// GetCredentials API. The new API should be used and this API is kept to
|
310 | 310 |
// maintain backward compatibility.
|
311 | 311 |
func GetAuthentication(sys *types.SystemContext, registry string) (string, string, error) {
|
597 | 597 |
// === docker.Transport overrides ===
|
598 | 598 |
// If not "", a directory containing a CA certificate (ending with ".crt"),
|
599 | 599 |
// a client certificate (ending with ".cert") and a client certificate key
|
600 | |
// (ending with ".key") used when talking to a Docker Registry.
|
|
600 |
// (ending with ".key") used when talking to a container registry.
|
601 | 601 |
DockerCertPath string
|
602 | 602 |
// If not "", overrides the system’s default path for a directory containing host[:port] subdirectories with the same structure as DockerCertPath above.
|
603 | 603 |
// Ignored if DockerCertPath is non-empty.
|
604 | 604 |
DockerPerHostCertDirPath string
|
605 | |
// Allow contacting docker registries over HTTP, or HTTPS with failed TLS verification. Note that this does not affect other TLS connections.
|
|
605 |
// Allow contacting container registries over HTTP, or HTTPS with failed TLS verification. Note that this does not affect other TLS connections.
|
606 | 606 |
DockerInsecureSkipTLSVerify OptionalBool
|
607 | 607 |
// if nil, the library tries to parse ~/.docker/config.json to retrieve credentials
|
608 | 608 |
// Ignored if DockerBearerRegistryToken is non-empty.
|