Home  >  Q&A  >  body text

宿主机如何连接Docker容器里面的Linux主机呢?

宿主机都无法ping通容器中的Linux,这可咋办?

巴扎黑巴扎黑2761 days ago711

reply all(4)I'll reply

  • 巴扎黑

    巴扎黑2017-04-21 11:17:59

    The Docker Engine uses Linux-specific kernel features, so to run it on
    Windows we need to use a lightweight virtual machine (vm). You use the
    Windows Docker client to control the virtualized Docker Engine to
    build, run, and manage Docker containers.

    The host you are talking about is win, it is the host of the virtual machine

    reply
    0
  • ringa_lee

    ringa_lee2017-04-21 11:17:59

    It seems that you are running Docker under Windows, and the Docker must be running in a VM.
    It is recommended to check whether the VM's network configuration is NAT or something else.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-21 11:17:59

    Because by default the docker container and your win machine are in two different network segments. As long as your host machine can ping the container, you can. If you want to connect via crt, you need to bind the port

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:17:59

    Please ask, how to solve this problem? I'm encountering the same problem now

    reply
    0
  • Cancelreply