mirror of
https://github.com/distribution/distribution.git
synced 2025-04-27 11:11:33 +00:00
docs: Update to refer to new image tag v3 (#4373)
This commit is contained in:
commit
dbca4995c8
@ -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.
|
||||
|
||||
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.
|
||||
|
||||
|
@ -38,7 +38,7 @@ The distribution registry implements the [OCI Distribution Spec](https://github.
|
||||
Start your registry
|
||||
|
||||
```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
|
||||
|
@ -7,11 +7,11 @@ title: About Registry
|
||||
A registry is a storage and content delivery system, holding named container
|
||||
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.
|
||||
|
||||
> 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
|
||||
posix filesystem, which is suitable for development or small deployments.
|
||||
|
@ -68,7 +68,7 @@ specify it in the `docker run` command:
|
||||
```bash
|
||||
$ docker run -d -p 5000:5000 --restart=always --name registry \
|
||||
-v `pwd`/config.yml:/etc/distribution/config.yml \
|
||||
registry:2
|
||||
registry:3
|
||||
```
|
||||
|
||||
Use this
|
||||
|
@ -19,7 +19,7 @@ If you have an air-gapped datacenter, see
|
||||
Use a command like the following to start the registry container:
|
||||
|
||||
```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.
|
||||
@ -108,7 +108,7 @@ $ docker run -d \
|
||||
-p 5000:5000 \
|
||||
--restart=always \
|
||||
--name registry \
|
||||
registry:2
|
||||
registry:3
|
||||
```
|
||||
|
||||
### Customize the published port
|
||||
@ -124,7 +124,7 @@ registry listens on port `5000` by default.
|
||||
$ docker run -d \
|
||||
-p 5001:5000 \
|
||||
--name registry-test \
|
||||
registry:2
|
||||
registry:3
|
||||
```
|
||||
|
||||
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 \
|
||||
-p 5001:5001 \
|
||||
--name registry-test \
|
||||
registry:2
|
||||
registry:3
|
||||
```
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ $ docker run -d \
|
||||
--restart=always \
|
||||
--name registry \
|
||||
-v /mnt/registry:/var/lib/registry \
|
||||
registry:2
|
||||
registry:3
|
||||
```
|
||||
|
||||
### 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_KEY=/certs/domain.key \
|
||||
-p 443:443 \
|
||||
registry:2
|
||||
registry:3
|
||||
```
|
||||
|
||||
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 \
|
||||
--publish published=443,target=443 \
|
||||
--replicas 1 \
|
||||
registry:2
|
||||
registry:3
|
||||
```
|
||||
|
||||
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 \
|
||||
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
|
||||
-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.
|
||||
@ -489,7 +489,7 @@ invocation. Use the following example `docker-compose.yml` as a template.
|
||||
```yaml
|
||||
registry:
|
||||
restart: always
|
||||
image: registry:2
|
||||
image: registry:3
|
||||
ports:
|
||||
- 5000:5000
|
||||
environment:
|
||||
|
@ -178,7 +178,7 @@ apache:
|
||||
- `pwd`/auth:/usr/local/apache2/conf
|
||||
|
||||
registry:
|
||||
image: registry:2
|
||||
image: registry:3
|
||||
ports:
|
||||
- 127.0.0.1:5000:5000
|
||||
volumes:
|
||||
|
@ -181,7 +181,7 @@ Review the [requirements](../#requirements), then follow these steps.
|
||||
- ./auth/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
|
||||
registry:
|
||||
image: registry:2
|
||||
image: registry:3
|
||||
volumes:
|
||||
- ./data:/var/lib/registry
|
||||
```
|
||||
|
@ -34,7 +34,7 @@ ExecStartPre=-/usr/bin/docker rm %N
|
||||
ExecStart=/usr/bin/docker run --name %N \
|
||||
-v registry:/var/lib/registry \
|
||||
-p 5000:5000 \
|
||||
registry:2
|
||||
registry:3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -53,7 +53,7 @@ socket-activation of containers.
|
||||
#### Create service file
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user