moby / moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
https://mobyproject.org/
Apache License 2.0
68.77k stars 18.67k forks source link

Docker and dummy network device #9452

Closed mkomu closed 9 years ago

mkomu commented 9 years ago

Any good ideas on how to make the dummy network device to work with docker? I can try to debug this also myself, but I have no idea where to start.

How to repeat:

$ sudo modprobe dummy $ docker -v Docker version 1.0.1, build 990021a $ docker run -t -i --privileged ubuntu:14.04 /bin/bash root@0d498ddd8614:/# /sbin/ip link add dummy0 type dummy0 RTNETLINK answers: Operation not supported

I have seen posts on how to make tun/tap to work, but nothing on dummy device. Btw, the same operation works on the host machine perfectly. I am using the docker available in Ubuntu LTS, but my friend reported that issue persists in docker 1.3.2.

mkomu commented 9 years ago

Tried also a later version with some extra options:

mkomu@utopic:~$ docker -v Docker version 1.2.0, build fa7b24f mkomu@utopic:~$ docker run -t -i --privileged --cap-add=NET_ADMIN ubuntu:14.04 /bin/bash root@4fbc8e8bad7b:/# ip link add dummy0 type dummy0 RTNETLINK answers: Operation not supported

ehazlett commented 9 years ago

Use the command ip link add dummy0 type dummy (dummy instead of dummy0). This works for me with Docker version 1.3.2.

SvenDowideit commented 9 years ago

looks good :)

docker@boot2docker:~$ docker run -t -i --rm --cap-add=NET_ADMIN ubuntu:14.04 ip link add dummy0 type dummy
docker@boot2docker:~$ docker run -t -i --rm  ubuntu:14.04 ip link add dummy0 type dummy
RTNETLINK answers: Operation not permitted
mkomu commented 9 years ago

Thanks! I got now the main daemon working with docker in this project: http://hipl.hiit.fi/

(It's basically an "end-to-end" VPN, i.e., no gateways)

crosbymichael commented 9 years ago

This looks like it's been resolved,