{{tag>docker registry hub repository}} ====== Private docker registry ====== Example docker compose file: version: '3' services: registry: restart: unless-stopped image: registry:2 container_name: docker-registry environment: - TZ=Europe/Zagreb - REGISTRY_STORAGE_DELETE_ENABLED=true ports: - 127.0.0.1:5000:5000 volumes: - docker-registry:/var/lib/registry volumes: docker-registry: driver: local Notice we need to pass environment variable to be able to delete old images via the [[https://distribution.github.io/distribution/spec/api/|API]]. See below on curl commands for deleting it. ====== Tested on ====== * docker 24.0.7 * docker registry image 01.2024 ====== See also ====== * [[wiki:deleting_images_private_docker_registry|Deleting images from private docker registry]] ====== References ====== * https://distribution.github.io/distribution/ * https://stackoverflow.com/questions/39801094/how-to-delete-an-image-from-a-private-docker-registry