Add Local Registry Example

This commit is contained in:
Frank Woeckener
2025-03-28 08:21:34 +01:00
parent 7859ba370c
commit 019e9cfd70
4 changed files with 32 additions and 0 deletions

View File

@@ -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

3
00_registry/gc_registry.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker exec registry bin/registry garbage-collect /etc/docker/registry/config.yml

8
00_registry/show_images.sh Executable file
View File

@@ -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 .