Make docker use IPv4 for port binding

后端 未结 6 1740
鱼传尺愫
鱼传尺愫 2020-11-29 20:36

I have docker host and inside I have one container.

The docker host is binding the port on IPv6 interface only, not on IPv4.

This is the output



        
6条回答
  •  盖世英雄少女心
    2020-11-29 21:15

    ISSUE RESOVLED:

    USE docker run -it -p 80:80 --name nginx --net=host -d nginx

    that's issue we face with VM some time instead of bridge network try with host that will work for you

    tcp     0    0 0.0.0.0:80            0.0.0.0:*             LISTEN      - 
    tcp6    0    0 :::80                 :::*                  LISTEN      -  
    

提交回复
热议问题