container

[HOW TO] Use docker with internet/network

When you create you docker container by default it’s usable only offline.
It’s mean that you cannot use your network data or ping google for instance.

$ docker network create -d "transparent" -o com.docker.network.windowsshim.vlanid=7 my_transparent

You will create a new network using « transparent » driver, your internet connection can be gone few second.

To check if the command has been successfully done you can check your docker network with this command

$ docker network ls
NETWORK ID NAME DRIVER SCOPE
d78a094e2ade Default Switch ics local
b82a8e0d571a my_transparent transparent local
c0c3930cefce nat nat local

Look good !
Now run your docker container !

$ docker run -itd –net= »Default Switch » myImage:latest

THAT IT ! ENJOY !