Table of Contents

, , ,

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 API. See below on curl commands for deleting it.

Tested on

See also

References