Files
guides-and-docs/docker-compose/Registry/docker-compose.yml

27 lines
928 B
YAML

version: '3.7'
services:
registry:
image: registry:latest
container_name: local-docker-registry
ports:
# Map to a host port, e.g., 5000. Change if needed.
- "5435:5000"
environment:
REGISTRY_AUTH: htpasswd # Enable htpasswd auth
REGISTRY_AUTH_HTPASSWD_REALM: Local Registry # Realm name for login prompt
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd # Path *inside* the container
volumes:
# Persist registry data
- /3tbhdd/Registry/registry-data:/var/lib/registry
- /3tbhdd/Registry/auth:/auth
restart: always
networks:
# Use a common network if Gitea/Runner need to access it by name
- npm-crowdsec_crowdsec_proxy # Optional: Replace with your network name
volumes:
registry-data:
networks:
npm-crowdsec_crowdsec_proxy: # Optional: Define if not already defined
external: true # Or true if defined elsewhere