Merge pull request #3933 from dvdksn/docs/registry-mirror-url

docs: note restriction on URL format of mirrors
This commit is contained in:
Milos Gajdos 2023-06-01 14:37:36 +01:00 committed by GitHub
commit f45d6d9ecf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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://<my-docker-mirror-host>"]
"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.