|
| 1 | +# Connecting to a Public Registry through the Proxy Registry |
| 2 | + |
| 3 | +This topic describes how to pull images from public registries using the Replicated proxy registry. |
| 4 | + |
| 5 | +For more information about the Replicated proxy registry, see [About the Replicated Proxy Registry](private-images-about). |
| 6 | + |
| 7 | +## Pull Public Images Through the Replicated Proxy Registry |
| 8 | + |
| 9 | +You can use the Replicated proxy registry to pull both public and private images. Using the Replicated proxy registry for public images can simplify network access requirements for your customers, as they only need to whitelist a single domain (either `proxy.replicated.com` or your custom domain) instead of multiple registry domains. |
| 10 | + |
| 11 | +For public images, you can use anonymous access without configuring registry credentials. |
| 12 | + |
| 13 | +To pull public images through the Replicated proxy registry, use the following `docker` command: |
| 14 | + |
| 15 | +```bash |
| 16 | +docker pull REPLICATED_PROXY_DOMAIN/anonymous/UPSTREAM_REGISTRY_HOSTNAME/IMAGE:TAG |
| 17 | +``` |
| 18 | +Where: |
| 19 | +* `REPLICATED_PROXY_DOMAIN` is `proxy.replicated.com` or your custom domain. For information about how to set a custom domain for the proxy registry, see [Using Custom Domains](/vendor/custom-domains-using). |
| 20 | +* `UPSTREAM_REGISTRY_HOSTNAME` is the hostname for the public registry where the image is located. If the image is located in a namespace within the registry, include the namespace after the hostname. For example, `quay.io/namespace`. |
| 21 | +* `IMAGE` is the image name. |
| 22 | +* `TAG` is the image tag. |
| 23 | + |
| 24 | +## Examples |
| 25 | + |
| 26 | +This section includes examples of pulling public images through the Replicated proxy registry. |
| 27 | + |
| 28 | +### Pull Images from DockerHub |
| 29 | + |
| 30 | +The following examples show how to pull public images from DockerHub: |
| 31 | + |
| 32 | +```bash |
| 33 | +# DockerHub is the default when no hostname is specified |
| 34 | +docker pull proxy.replicated.com/anonymous/busybox |
| 35 | +docker pull proxy.replicated.com/anonymous/nginx:1.16.0 |
| 36 | +``` |
| 37 | +```bash |
| 38 | +# You can also optionally specify docker.io |
| 39 | +docker pull proxy.replicated.com/anonymous/docker.io/replicated/replicated-sdk:1.0.0 |
| 40 | +``` |
| 41 | + |
| 42 | +### Pull Images from Other Registries |
| 43 | + |
| 44 | +The following example shows how to pull images from the Amazon ECR Public Gallery: |
| 45 | + |
| 46 | +```bash |
| 47 | +docker pull proxy.replicated.com/anonymous/public.ecr.aws/nginx/nginx:latest |
| 48 | +``` |
| 49 | + |
| 50 | +### Pull Images Using a Custom Domain for the Proxy Registry |
| 51 | + |
| 52 | +The following example shows how to pull a public image when a custom domain is configured for the proxy registry: |
| 53 | + |
| 54 | +```bash |
| 55 | +docker pull my.customdomain.io/anonymous/public.ecr.aws/nginx/nginx:latest |
| 56 | +``` |
| 57 | +For information about how to set a custom domain for the proxy registry, see [Using Custom Domains](/vendor/custom-domains-using). |
| 58 | + |
| 59 | +## Related Topic |
| 60 | + |
| 61 | +[Connecting to an External Registry](packaging-private-images) |
0 commit comments