Docker on Windows: how to connect to container from host using container IP?

前端 未结 2 1781
时光说笑
时光说笑 2020-12-16 02:46

I have

  • Windows 10
  • Docker for Windows V. 1.12.5 Rev. 9503, which does not rely on boot2docker or VirtualBox anymore.

I have a number of

2条回答
  •  温柔的废话
    2020-12-16 02:59

    On docker for windows you can use address 10.0.75.1:8080 but you need to configure your firewall, a better way is using address 10.0.75.2:8080,

    for both addresses you have to publish your port when you run container

    docker run -p 8080:8080 image_name
    

    More info https://github.com/docker/for-win/issues/334#issuecomment-297030101

提交回复
热议问题