Skip to content

Instantly share code, notes, and snippets.

@aHisayoshiSuehiro
Last active April 11, 2017 06:06
Show Gist options
  • Save aHisayoshiSuehiro/996251a3a57cb72672af1d4358fdf77e to your computer and use it in GitHub Desktop.
Save aHisayoshiSuehiro/996251a3a57cb72672af1d4358fdf77e to your computer and use it in GitHub Desktop.
docker-registry

ユーザー追加

docker run --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/htpasswd

version: '3'
services:
registry:
image: registry:latest
ports:
- "5000:5000"
volumes:
- ./ssl:/ssl
- registry:/var/lib/registry
- ./auth:/auth
restart: always
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
logging:
driver: journald
options:
tag: "registry"
frontend:
restart: always
image: konradkleine/docker-registry-frontend:v2
ports:
- "8088:80"
depends_on:
- registry
links:
- registry:docker-registry.lnc.jp
environment:
- ENV_DOCKER_REGISTRY_HOST=docker-registry.lnc.jp
- ENV_DOCKER_REGISTRY_PORT=5000
logging:
driver: journald
options:
tag: "registry-frontend"
volumes:
registry: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment