How to get remote access to a private docker-registry?

前端 未结 15 602
攒了一身酷
攒了一身酷 2020-11-30 18:45

I\'m trying to setup a private docker registry using the image taken from: https://github.com/docker/docker-registry

Just by running:
docker run -p 5000:50

15条回答
  •  遥遥无期
    2020-11-30 18:59

    Setting Local insecure registry in docker along with proxy:

    1) in ubuntu add the following flag --insecure-registry IP:port under DOCKER_OPTS in file /etc/default/docker

    1.1) configure no_proxy env variable to bypass local IP/hostname/domainname...as proxy can throw a interactive msg ...like continue and this intermediate msg confuses docker client and finally timesout...

    1.2) if domainname is configured...then don't forget to update /etc/hosts file if not using DNS.

    1.3) in /etc/default/docker set the env variables http_proxy and https_proxy...as it enables to download images from outside company hubs. format http_proxy=http://username:password@proxy:port

    2) restart the docker service...if installed as service, use sudo service docker restart

    3) restart the registry container [sudo docker run -p 5000:5000 registry:2 ]

    4) tag the required image using sudo docker tag imageid IP:port/imagename/tagname ifany

    5) push the image ...sudo docker push ip:port/imagename

    6) If u want to pull the image from another machine say B without TLS/SSL,then in B apply setps 1,1.1 and 2. If these changes are not done in machine B...pull will fail.

提交回复
热议问题