Docker registry (v2) only container
1.6K
This project puts Docker Registry (v2) in scratch docker container. It is available on Docker Hub and can be pulled using the following command.
docker pull alectolytic/registry
You will note that this is a tiny image.
$ docker images | grep docker.io/alectolytic/registry
docker.io/alectolytic/registry latest ad31451bf846 19 minutes ago 9.967 MB
In this example we deploy Docker Registry with data persisted via a data container.
docker create --entrypoint=_ -v /var/lib/registry --name docker-registry-data scratch
docker run -d --name docker-registry -p 5000:5000 \
--volumes-from docker-registry-data \
alectolytic/registry
docker run -d --name docker-registry -p 5000:5000 \
--volumes-from docker-registry-data \
-v /path/to/config.yml:/config.yml \
alectolytic/registry
NOTE: If running on an SELinux enabled system, run chcon -Rt svirt_sandbox_file_t /path/to/config.yml before staring the registry.
You can start or stop docker-registry container using the following command.
# Starting
docker start docker-registry
# stopping
docker stop docker-registry
You can access data from the data container using any container of your choice.
# using alpine (tiny busybox)
docker run --rm -it --volumes-from docker-registry-data alpine sh
# using fedora
docker run --rm -it --volumes-from docker-registry-data fedora:latest bash
Content type
Image
Digest
sha256:1dc358a3a…
Size
2.7 MB
Last updated
about 11 years ago
docker pull alectolytic/registry