docker-machine: Can't access container's web server from host

后端 未结 6 1420
醉酒成梦
醉酒成梦 2020-12-23 09:39

I just installed Docker with Docker-Toolbox on my Mac using homebrew: install docker with homebrew

After creating and configuring a Container with Rails, Postgres an

6条回答
  •  有刺的猬
    2020-12-23 10:29

    192.168.99.100 is the IP of your Docker host, in this instance. You need to expose the port of your container and then you will be able to connect to it from the outside world.

    I'm not familiar with Docker Compose, but the log you have posted suggests port 8000 is exposed. Try, therefore, http://192.168.99.100:8000.

    (The reason http://192.168.99.100:2376 doesn't work is because that's the address and port of the Docker daemon itself, which isn't HTTP-based. As for 0.0.0.0: This is the address which your web server is listening on inside the container and equates to all external connections therein. However, without any ports exposed, there's no way in!)

提交回复
热议问题