2

I'm having trouble with internet inside my docker. I have internet connection in a default network, but I don't have it in my created network. I've checked it by trying to ping google.com. I have created the network like this

network create --subnet=172.18.0.0/16 mynet123

Any ideas on this? How can I get access to the internet?

arti_lina
  • 95
  • 2
  • 8
  • Are you sure that your 172.18.0.0 has internet connection? – Alejandro Galera Jun 03 '19 at 16:49
  • @mulg0r I've said that I don't have it in this network at all. So that's what the question is about. – arti_lina Jun 03 '19 at 16:51
  • In this case is not a docker-network problem, but is a problem of your connectivity internet in your host. First, solve that and then tell me in which interface in your host do you have internet to face docker-network problem – Alejandro Galera Jun 03 '19 at 16:52

1 Answers1

0

As you can see in this answer, if you create your network like this, it should have the internet connection: https://stackoverflow.com/a/42336592/332451

If you create the network with the --internal switch, it'd have become a network without a route to the internet.

exic
  • 2,220
  • 1
  • 22
  • 29
  • Well it doesn't solve the issue. By the way, there's no internet connection in any network that I create manually. – arti_lina Jun 04 '19 at 08:13