Docker official registry (Docker Hub) URL

前端 未结 6 871
深忆病人
深忆病人 2021-01-30 19:57

Docker Hub official website has been moved to https://registry.hub.docker.com from https://hub.docker.com/.

If I try to docker pull images from URL like:

6条回答
  •  孤独总比滥情好
    2021-01-30 20:22

    You're able to get the current registry-url using docker info:

    ...
    Debug Mode (server): false
    Registry: https://index.docker.io/v1/
    Labels:
    ...
    

    That's also the url you may use to run your self hosted-registry:

    docker run -d -p 5000:5000 --name registry -e REGISTRY_PROXY_REMOTEURL=https://index.docker.io registry:2
    

    Grep & use it right away:

    $ echo $(docker info | grep -oP "(?<=Registry: ).*")
    https://index.docker.io/v1/
    

提交回复
热议问题