Docker Community Forums

Share and learn in the Docker community.

How to set gateway for container

(Ipeacocks) #1

Is it possible to set gateway for container?

In container I am trying to set it but w/o success:

root@727346abe539:/# route del default gw
SIOCDELRT: Operation not permitted

root@727346abe539:/# route add default
SIOCADDRT: Operation not permitted


(Andy Rothfusz) #2

Iā€™m not sure how to do this on a container-by-container basis, but you can set some related parameters on the daemon using --bip (see ā€œCustomizing docker0ā€)