I am new to docker and Ubuntu 16.04 OS as well. My configuration is as follows:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
$ docker info
Server Version: 18.09.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Default Runtime: runc
Init Binary: docker-init
containerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: fec3683
Kernel Version: 4.15.0-42-generic
Operating System: Ubuntu 16.04.5 LTS
Total Memory: 15.4GiB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Live Restore Enabled: false
Product License: Community Engine
WARNING: No swap limit support
I am connect to office VPN network and all my accesses to office and internet are working fine with my Network proxy configuration done in my laptop.
Even “docker container run” commands are also working fine.
But when I try to do “docker image build” using a docker file whose content is: FROM busybox RUN echo “building simple docker image” CMD [echo, “hello container”]
I am getting below error message: $ docker image build -t testimg . Sending build context to Docker daemon 2.048kB Step 1/3 : FROM busybox Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I had searched a bit and found that we may need to set the proxy in the ~/.docker/config.json file, and I had added the proxy entries as mentioned in the issue#https://github.com/docker/cli/issues/507
Even after adding the entries as suggested in the above issue, I still face the same issue.
I am little clueless now on how to solve this issue with docker image build. Any help would be greatly appreciated.