docs: Update to refer to new image tag v3 (#4373)

This commit is contained in:
Milos Gajdos 2025-04-03 12:04:00 -07:00 committed by GitHub
commit dbca4995c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 18 additions and 18 deletions

View File

@ -9,7 +9,7 @@ This is useful if you intend to actively work on the registry.
Most people should use prebuilt images, for example, the [Registry docker image](https://hub.docker.com/r/library/registry/) provided by Docker. Most people should use prebuilt images, for example, the [Registry docker image](https://hub.docker.com/r/library/registry/) provided by Docker.
People looking for advanced operational use cases might consider rolling their own image with a custom Dockerfile inheriting `FROM registry:2`. People looking for advanced operational use cases might consider rolling their own image with a custom Dockerfile inheriting `FROM registry:3`.
The latest updates to `main` branch are automatically pushed to [distribution Docker Hub repository](https://hub.docker.com/r/distribution/distribution) and tagged with `edge` tag. The latest updates to `main` branch are automatically pushed to [distribution Docker Hub repository](https://hub.docker.com/r/distribution/distribution) and tagged with `edge` tag.

View File

@ -38,7 +38,7 @@ The distribution registry implements the [OCI Distribution Spec](https://github.
Start your registry Start your registry
```sh ```sh
docker run -d -p 5000:5000 --name registry registry:2 docker run -d -p 5000:5000 --name registry registry:3
``` ```
Pull (or build) some image from the hub Pull (or build) some image from the hub

View File

@ -7,11 +7,11 @@ title: About Registry
A registry is a storage and content delivery system, holding named container A registry is a storage and content delivery system, holding named container
images and other content, available in different tagged versions. images and other content, available in different tagged versions.
> Example: the image `distribution/registry`, with tags `2.0` and `2.1`. > Example: the image `distribution/registry`, with tags `2.8` and `3.0`.
Users interact with a registry by pushing and pulling images. Users interact with a registry by pushing and pulling images.
> Example: `docker pull registry-1.docker.io/distribution/registry:2.1`. > Example: `docker pull registry-1.docker.io/distribution/registry:3.0`.
Storage itself is delegated to drivers. The default storage driver is the local Storage itself is delegated to drivers. The default storage driver is the local
posix filesystem, which is suitable for development or small deployments. posix filesystem, which is suitable for development or small deployments.

View File

@ -68,7 +68,7 @@ specify it in the `docker run` command:
```bash ```bash
$ docker run -d -p 5000:5000 --restart=always --name registry \ $ docker run -d -p 5000:5000 --restart=always --name registry \
-v `pwd`/config.yml:/etc/distribution/config.yml \ -v `pwd`/config.yml:/etc/distribution/config.yml \
registry:2 registry:3
``` ```
Use this Use this

View File

@ -19,7 +19,7 @@ If you have an air-gapped datacenter, see
Use a command like the following to start the registry container: Use a command like the following to start the registry container:
```console ```console
$ docker run -d -p 5000:5000 --restart=always --name registry registry:2 $ docker run -d -p 5000:5000 --restart=always --name registry registry:3
``` ```
The registry is now ready to use. The registry is now ready to use.
@ -108,7 +108,7 @@ $ docker run -d \
-p 5000:5000 \ -p 5000:5000 \
--restart=always \ --restart=always \
--name registry \ --name registry \
registry:2 registry:3
``` ```
### Customize the published port ### Customize the published port
@ -124,7 +124,7 @@ registry listens on port `5000` by default.
$ docker run -d \ $ docker run -d \
-p 5001:5000 \ -p 5001:5000 \
--name registry-test \ --name registry-test \
registry:2 registry:3
``` ```
If you want to change the port the registry listens on within the container, you If you want to change the port the registry listens on within the container, you
@ -136,7 +136,7 @@ $ docker run -d \
-e REGISTRY_HTTP_ADDR=0.0.0.0:5001 \ -e REGISTRY_HTTP_ADDR=0.0.0.0:5001 \
-p 5001:5001 \ -p 5001:5001 \
--name registry-test \ --name registry-test \
registry:2 registry:3
``` ```
@ -158,7 +158,7 @@ $ docker run -d \
--restart=always \ --restart=always \
--name registry \ --name registry \
-v /mnt/registry:/var/lib/registry \ -v /mnt/registry:/var/lib/registry \
registry:2 registry:3
``` ```
### Customize the storage back-end ### Customize the storage back-end
@ -220,7 +220,7 @@ If you have been issued an _intermediate_ certificate instead, see
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \ -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \ -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
-p 443:443 \ -p 443:443 \
registry:2 registry:3
``` ```
4. Docker clients can now pull from and push to your registry using its 4. Docker clients can now pull from and push to your registry using its
@ -325,7 +325,7 @@ $ docker service create \
-e REGISTRY_HTTP_TLS_KEY=/run/secrets/domain.key \ -e REGISTRY_HTTP_TLS_KEY=/run/secrets/domain.key \
--publish published=443,target=443 \ --publish published=443,target=443 \
--replicas 1 \ --replicas 1 \
registry:2 registry:3
``` ```
You can access the service on port 443 of any swarm node. Docker sends the You can access the service on port 443 of any swarm node. Docker sends the
@ -442,7 +442,7 @@ using htpasswd, all authentication attempts will fail.
-v "$(pwd)"/certs:/certs \ -v "$(pwd)"/certs:/certs \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \ -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \ -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
registry:2 registry:3
``` ```
4. Try to pull an image from the registry, or push an image to the registry. 4. Try to pull an image from the registry, or push an image to the registry.
@ -489,7 +489,7 @@ invocation. Use the following example `docker-compose.yml` as a template.
```yaml ```yaml
registry: registry:
restart: always restart: always
image: registry:2 image: registry:3
ports: ports:
- 5000:5000 - 5000:5000
environment: environment:

View File

@ -178,7 +178,7 @@ apache:
- `pwd`/auth:/usr/local/apache2/conf - `pwd`/auth:/usr/local/apache2/conf
registry: registry:
image: registry:2 image: registry:3
ports: ports:
- 127.0.0.1:5000:5000 - 127.0.0.1:5000:5000
volumes: volumes:

View File

@ -181,7 +181,7 @@ Review the [requirements](../#requirements), then follow these steps.
- ./auth/nginx.conf:/etc/nginx/nginx.conf:ro - ./auth/nginx.conf:/etc/nginx/nginx.conf:ro
registry: registry:
image: registry:2 image: registry:3
volumes: volumes:
- ./data:/var/lib/registry - ./data:/var/lib/registry
``` ```

View File

@ -34,7 +34,7 @@ ExecStartPre=-/usr/bin/docker rm %N
ExecStart=/usr/bin/docker run --name %N \ ExecStart=/usr/bin/docker run --name %N \
-v registry:/var/lib/registry \ -v registry:/var/lib/registry \
-p 5000:5000 \ -p 5000:5000 \
registry:2 registry:3
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
@ -53,7 +53,7 @@ socket-activation of containers.
#### Create service file #### Create service file
```sh ```sh
podman create --name registry --network=none -v registry:/var/lib/registry registry:2 podman create --name registry --network=none -v registry:/var/lib/registry registry:3
podman generate systemd --name --new registry > registry.service podman generate systemd --name --new registry > registry.service
``` ```