I have ipv6 enabled on docker host but there is one particular container where ipv6 is causing issues. Is there a way to launch a container without ipv6 support, either through command line argument or dockerfile directive?
Disable ip v6 in docker container
111.2k views Asked by Sergei Rodionov At
        	7
        	
        There are 7 answers
0
                
                        
                            
                        
                        
                            On
                            
                            
                                                    
                    
                Worked for me:
docker run -d -i -t  --name django_1.0 --sysctl 
net.ipv6.conf.all.disable_ipv6=1 -p 192.168.20.148:8000:8000/tcp -p 
192.168.20.148:8000:8000/udp -p 192.168.20.148:3000:3000/tcp -p 
192.168.20.148:3000:3000/udp IMAGE_NAME
root:~# netstat -tlp | grep -i docker
tcp  0  0 ip-192-168-20-148.:8000 *:*    LISTEN      4598/docker-proxy
tcp  0  0 ip-192-168-20-148.:3000 *:*    LISTEN      4642/docker-proxy
                        
Unfortunately there isn't:
--ipv6is a daemon-wide flag that cannot be overridden on a per-container basis.