From 9d1f71c801eaaac265dc9d14cc5fc8cee4757d9a Mon Sep 17 00:00:00 2001 From: David Karlsson Date: Wed, 31 May 2023 20:20:52 +0200 Subject: [PATCH] docs: note restriction on URL format of mirrors Signed-off-by: David Karlsson --- docs/recipes/mirror.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/recipes/mirror.md b/docs/recipes/mirror.md index 2fd50ea55..7bf992006 100644 --- a/docs/recipes/mirror.md +++ b/docs/recipes/mirror.md @@ -31,6 +31,18 @@ relying entirely on your local registry is the simplest scenario. It's currently not possible to mirror another private registry. Only the central Hub can be mirrored. +The URL of a pull-through registry mirror must be the root of a domain. +No path components other than an optional trailing slash (`/`) are allowed. +The following table shows examples of allowed and disallowed mirror URLs. + +| URL | Allowed | +| -------------------------------------- | ------- | +| `https://mirror.company.example` | Yes | +| `https://mirror.company.example/` | Yes | +| `https://mirror.company.example/foo` | No | +| `https://mirror.company.example#bar` | No | +| `https://mirror.company.example?baz=1` | No | + > **Note** > > Mirrors of Docker Hub are still subject to Docker's [fair usage policy](https://www.docker.com/pricing/resource-consumption-updates){: target="blank" rel="noopener" class=“”}. @@ -110,10 +122,14 @@ and add the `registry-mirrors` key and value, to make the change persistent. ```json { - "registry-mirrors": ["https://"] + "registry-mirrors": ["https://mirror.company.example"] } ``` +> **Note** +> +> The mirror URL must be the root of the domain. + Save the file and reload Docker for the change to take effect. > Some log messages that appear to be errors are actually informational messages.