1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 11:58:47 +00:00
dockerfiles/registry
2016-08-27 19:44:32 +08:00
..
docker-compose.yml registry mirror 2016-08-27 19:44:32 +08:00
README.md registry mirror 2016-08-27 19:44:32 +08:00

registry

Registry is the Docker toolset to pack, ship, store, and deliver content.

docker-compose.yml

registry:
  image: registry
  ports:
    - "5000:5000"
  volumes:
    - /etc/docker/registry
    - ./data:/var/lib/registry
    - ./certs:/certs
    - ./auth:/auth
  environment:
    - REGISTRY_HTTP_TLS_CERTIFICATE=/certs/registry.easypi.info.crt
    - REGISTRY_HTTP_TLS_KEY=/certs/registry.easypi.info.key
    - REGISTRY_AUTH=htpasswd
    - REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
    - REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
  restart: always

up and running

$ docker-compose up -d
$ docker-compose exec registry sh
>>> htpasswd -Bbn username password >> /auth/htpasswd
>>> cat >> /etc/docker/registry/config.yml
proxy:
  remoteurl: https://registry-1.docker.io
  username: username
  password: password
^D
>>> exit
$ docker-compose restart

$ docker pull alpine
$ docker tag alpine registry.easypi.info:5000/alpine

$ docker login -u username -p password easypi.info:5000
$ docker push registry.easypi.info:5000/alpine
$ docker pull registry.easypi.info:5000/alpine

read more