- SSL Certificate
$ mkdir /auth && touch /auth/htpasswd
$ docker run \
--entrypoint htpasswd \
registry:2.6.2 -Bbn {USERNAME} {PASSWORD} > /auth/htpasswd
$ cat /auth/htpasswd
docker run -d \
--restart=always \
--name privateregistry \
-v /auth:/auth \
-e "REGISTRY_AUTH=htpasswd" \
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
-v /mnt/registry:/var/lib/registry \
-p 80:5000 \
registry:2.6.2
$ docker login {domainname} -u {username}
password:
$ docker pull ubuntu:16.04
$ docker tags ubuntu:16.04 {domainname}/{nameimages}
$ docker push {domainname}/{nameimages}
call https://{domainname}/v2/_catalog