diff --git a/00_registry/docker-compose.yml b/00_registry/docker-compose.yml new file mode 100644 index 0000000..a60ceb6 --- /dev/null +++ b/00_registry/docker-compose.yml @@ -0,0 +1,15 @@ +services: + registry: + image: registry:2.8.3 + container_name: registry + restart: always + ports: + - "5000:5000" + environment: + REGISTRY_STORAGE_DELETE_ENABLED: "true" + volumes: + - registry-data:/var/lib/registry + +volumes: + registry-data: + driver: local diff --git a/00_registry/gc_registry.sh b/00_registry/gc_registry.sh new file mode 100755 index 0000000..edb502d --- /dev/null +++ b/00_registry/gc_registry.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec registry bin/registry garbage-collect /etc/docker/registry/config.yml diff --git a/00_registry/show_images.sh b/00_registry/show_images.sh new file mode 100755 index 0000000..15c46f6 --- /dev/null +++ b/00_registry/show_images.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if ! which jq >/dev/null ; then + echo "Please install jq first." + exit 1 +fi + +curl http://localhost:5000/v2/_catalog | jq .