At the project I am at now, we have Github Enterprise set up behind a VPN, so I use OpenVPN to connect with my desktop (Ubuntu 14.04 LTS), but when I try to build with Docker (using Centos6) I always get ssh: Could not resolve hostname github.xxx.xxx: Name or service not known
.
I've looked at the Docker documentation, but it looks that it is only solving problem using Proxy or a Bridge, and Google only returns answers on how I can set up OpenVPN on a Docker image.
So then I turn to Stackoverflow and hope for an answer on how I can run sudo docker build image
and get it to use my VPN to clone from Github.
Also, our Mac users have installed Boot2Docker, and have no problems building the image.
Docker Desktop networking can work when attached to a VPN. To do this, Docker Desktop intercepts traffic from the containers and injects it into the host as if it originated from the Docker application.
In terms of Docker, a bridge network uses a software bridge which allows containers connected to the same bridge network to communicate, while providing isolation from containers which are not connected to that bridge network.
Virtual machines have a host operating system and a guest operating system inside each VM. The guest OS can be any OS, such as Linux or Windows, irrespective of the host OS. In contrast, Docker containers are hosted on a single physical server with the host OS shared among them.
I tried all kinds of things, in the end the simplest thins helped on Ubuntu 18.04. Stoping and starting docker deamon.
Prerequisites: VPN off
sudo systemctl stop docker
---> Start VPN
sudo systemctl start docker
Hope will help someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With