Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '3'
services:
dockerauth:
image: cesanta/docker_auth
ports:
- "5001:5001"
volumes:
- ./config:/config:ro
- ./log:/logs
- ./certs:/certs
command: /config/registry_auth_config.yml
restart: always
container_name: "dockerauth"
registry:
restart: always
image: registry:2
ports:
- 5000:5000
environment:
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry
REGISTRY_AUTH: token
REGISTRY_AUTH_TOKEN_REALM: https://dockerauth:5001/auth
REGISTRY_AUTH_TOKEN_SERVICE: "Docker registry"
REGISTRY_AUTH_TOKEN_ISSUER: "Auth Service"
REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: /certs/server.crt
volumes:
- ./data:/var/lib/registry
- ./certs:/certs
container_name: "registry"
links:
- dockerauth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.