Docker Community Forums

Share and learn in the Docker community.

Network issue with custom created bridge

docker

(Wnoorduin) #1

I seemed to have circumvented this problem by playing around with docker, The problem is this. When I do this on a default Docker:

$ docker network create --subnet 10.0.0.0/24 mynet
$ docker run -it --ip 10.0.0.10 --net mynet --dns 8.8.8.8 ubuntu bash
root@120e4e16663c:/# apt-get update
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Temporary failure resolving ‘archive.ubuntu.com

There is no internet connection, while using the default bridge, Docker has no problem in connecting to the internet. Should be something basic, but I don’t see it


(David Maze) #2

From https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options do you need to create the bridge network with a --ip-masq option?