Can't visit `http://172.17.0.2:5000` after starting docker registry

后端 未结 1 1579
名媛妹妹
名媛妹妹 2021-01-14 01:18

On a mac system, I start the register following the deploy document:

docker run -d -p 5000:5000 --restart=always --name registry registry:2

相关标签:
1条回答
  • 2021-01-14 01:49

    If you are using docker-machine, see "Port forwarding in docker-machine?"

    • either port forward the 5000 port on the VirtualBox level (meaning localhost:5000 will work)

      VBoxManage controlvm "boot2docker-vm" natpf1 "tcp-port5000,tcp,,5000,,5000";
      
    • or use the ip returned by $(docker-machine ip <yourMachine>)

    0 讨论(0)
提交回复
热议问题