From 0b4ab06763e853dfce85bc1d03325e6622db0c0e Mon Sep 17 00:00:00 2001 From: Grant Miller Date: Mon, 27 Jan 2025 17:31:42 -0600 Subject: [PATCH] referencing public images with creds --- docs/vendor/packaging-public-images.mdx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/vendor/packaging-public-images.mdx b/docs/vendor/packaging-public-images.mdx index 97c1ffbc8d..6adf9b450b 100644 --- a/docs/vendor/packaging-public-images.mdx +++ b/docs/vendor/packaging-public-images.mdx @@ -8,14 +8,15 @@ For more information about the Replicated proxy registry, see [About the Replica 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. -For public images, you can use anonymous access without configuring registry credentials. +For public images, you need to first configure registry credentials. To pull public images through the Replicated proxy registry, use the following `docker` command: ```bash -docker pull REPLICATED_PROXY_DOMAIN/anonymous/UPSTREAM_REGISTRY_HOSTNAME/IMAGE:TAG +docker pull REPLICATED_PROXY_DOMAIN/proxy/APPSLUG/UPSTREAM_REGISTRY_HOSTNAME/IMAGE:TAG ``` Where: +* `APPSLUG` is your Replicated app slug found on the [app settings page](https://vendor.replicated.com/settings). * `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). * `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`. * `IMAGE` is the image name. @@ -31,12 +32,12 @@ The following examples show how to pull public images from DockerHub: ```bash # DockerHub is the default when no hostname is specified -docker pull proxy.replicated.com/anonymous/busybox -docker pull proxy.replicated.com/anonymous/nginx:1.16.0 +docker pull proxy.replicated.com/proxy/APPSLUG/busybox +docker pull proxy.replicated.com/proxy/APPSLUG/nginx:1.16.0 ``` ```bash # You can also optionally specify docker.io -docker pull proxy.replicated.com/anonymous/docker.io/replicated/replicated-sdk:1.0.0 +docker pull proxy.replicated.com/proxy/APPSLUG/docker.io/replicated/replicated-sdk:1.0.0 ``` ### Pull Images from Other Registries @@ -44,7 +45,7 @@ docker pull proxy.replicated.com/anonymous/docker.io/replicated/replicated-sdk:1 The following example shows how to pull images from the Amazon ECR Public Gallery: ```bash -docker pull proxy.replicated.com/anonymous/public.ecr.aws/nginx/nginx:latest +docker pull proxy.replicated.com/proxy/APPSLUG/public.ecr.aws/nginx/nginx:latest ``` ### Pull Images Using a Custom Domain for the Proxy Registry @@ -52,7 +53,7 @@ docker pull proxy.replicated.com/anonymous/public.ecr.aws/nginx/nginx:latest The following example shows how to pull a public image when a custom domain is configured for the proxy registry: ```bash -docker pull my.customdomain.io/anonymous/public.ecr.aws/nginx/nginx:latest +docker pull my.customdomain.io/proxy/APPSLUG/public.ecr.aws/nginx/nginx:latest ``` For information about how to set a custom domain for the proxy registry, see [Using Custom Domains](/vendor/custom-domains-using).