I'm trying to build docker image with Dockerfile. For the experiment, I added to this file such lines:
RUN ping google.com
RUN ping 8.8.8.8
Then I'm trying to build this image:
docker build -t my-custom-python:latest -f ./Dockerfile
And this code not working properly. For ping commands it says:
ping: bad address 'google.com'
If I remove this lines, then it executes command:
RUN pip wheel --wheel-dir=/wheels -r /requirements/dev.txt
it reads my requiremets/dev.txt file, sees such line:
git+git://github.com/bpython/bpython.git
And after this it says:
Running command git clone -q git://github.com/bpython/bpython.git /tmp/pip-req-build-o8c7n380 fatal: unable to look up github.com (port 9418) (Try again) ERROR: Command errored out with exit status 128: git clone -q git://github.com/bpython/bpython.git /tmp/pip-req-build-o8c7n380 Check the logs for full command output.
It seems there is a problem with DNS, and (as I noticed) it started when I install ExpressVPN. But in my host machine ping and git clone works.
I also tried to disable VPN - nothing changes. I don't know how to ckeck if DNS works insight Docker or how to fix it.
Please, need your help!