Codebase list golang-github-containers-image / cdd6817
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
9 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
44 containers' images and container image registries.
55
66 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
88 implements "simple image signing".
99
1010 The containers/image library also allows you to inspect a repository on a
9191 expirationTime time.Time
9292 }
9393
94 // dockerClient is configuration for dealing with a single Docker registry.
94 // dockerClient is configuration for dealing with a single container registry.
9595 type dockerClient struct {
9696 // The following members are set by newDockerClient and do not change afterwards.
9797 sys *types.SystemContext
751751 err = ping("http")
752752 }
753753 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)
755755 if c.sys != nil && c.sys.DockerDisableV1Ping {
756756 return err
757757 }
1515 transports.Register(Transport)
1616 }
1717
18 // Transport is an ImageTransport for Docker registry-hosted images.
18 // Transport is an ImageTransport for container registry-hosted images.
1919 var Transport = dockerTransport{}
2020
2121 type dockerTransport struct{}
1111 var (
1212 // ErrV1NotSupported is returned when we're trying to talk to a
1313 // 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")
1515 // ErrTooManyRequests is returned when the status code returned is 429
1616 ErrTooManyRequests = errors.New("too many requests to registry")
1717 )
6767 a host/namespace/image stream or a wildcarded expression for matching all
6868 subdomains. For wildcarded subdomain matching, `*.example.com` is a valid case, but `example*.*.com` is not.
6969
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
7171 e.g. for `docker pull`), _not_ to the OpenShift API host and port.
7272
7373 ### `dir:`
194194 }
195195
196196 // 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).
198198 func AddDummyV2S1Signature(manifest []byte) ([]byte, error) {
199199 key, err := libtrust.GenerateECP256PrivateKey()
200200 if err != nil {
163163 // Values specific to this image
164164 sys *types.SystemContext
165165 // 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
167167 imageStreamImageName string // Resolved image identifier, or "" if not known yet
168168 }
169169
315315
316316 type openshiftImageDestination struct {
317317 client *openshiftClient
318 docker types.ImageDestination // The Docker Registry endpoint
318 docker types.ImageDestination // The docker/distribution API endpoint
319319 // State
320320 imageStreamImageName string // "" if not yet known
321321 }
305305 // .docker/config.json
306306 //
307307 // 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
309309 // GetCredentials API. The new API should be used and this API is kept to
310310 // maintain backward compatibility.
311311 func GetAuthentication(sys *types.SystemContext, registry string) (string, string, error) {
597597 // === docker.Transport overrides ===
598598 // If not "", a directory containing a CA certificate (ending with ".crt"),
599599 // 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.
601601 DockerCertPath string
602602 // If not "", overrides the system’s default path for a directory containing host[:port] subdirectories with the same structure as DockerCertPath above.
603603 // Ignored if DockerCertPath is non-empty.
604604 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.
606606 DockerInsecureSkipTLSVerify OptionalBool
607607 // if nil, the library tries to parse ~/.docker/config.json to retrieve credentials
608608 // Ignored if DockerBearerRegistryToken is non-empty.