I am getting the error below while trying to build docker image. My operating system is CentOS 7 on a corporate setting.
Sending build context to Docker daemon 1.22GB
Step 1/20 : FROM centos
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
I followed the answers i got online.(related question). I followed the answer with the 24 votes, since it is given for CentOS 7
I created a file called docker inside the directory /etc/sysconfig/ and added the content below
HTTP_PROXY="http://proxy.example.com:80/"
HTTPS_PROXY="https://proxy.example.com:443/"
http_proxy="${HTTP_PROXY}"
https_proxy="${HTTPS_PROXY}"
But i am getting the error below.
Sending build context to Docker daemon 1.22GB
Step 1/20 : FROM centos
Get https://registry-1.docker.io/v2/: http: error connecting to proxy https://proxy.example.com:443/: dial tcp: lookup proxy.example.com on 127.0.0.1:53: no such host
My Docker version is
client :
version 17.05.0-ce
API version: 1.29
server :
version :17.05.0-ce
API version: 1.29