0

I am trying to build a docker image using my build pipeline, however docker is unable to pull the base image my build pipeline is hosted in azure devops server Azure devops server hosted inside window server 2019 VM

2021-03-04T06:58:21.6816037Z ==============================================================================
2021-03-04T06:58:21.6816138Z Task         : Docker
2021-03-04T06:58:21.6816209Z Description  : Build, tag, push, or run Docker images, or run a Docker command. Task can be used with Docker or Azure Container registry.
2021-03-04T06:58:21.6816271Z Version      : 0.3.24
2021-03-04T06:58:21.6816322Z Author       : Microsoft Corporation
2021-03-04T06:58:21.6816387Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=848006)
2021-03-04T06:58:21.6816465Z ==============================================================================
2021-03-04T06:58:22.7477068Z [command]"C:\Program Files\Docker\docker.exe" build -f C:\myagent_agent\_work\7\s\hello-solution\core\Infrastructure\Docker\build\5910\Dockerfile -t myregistry.azurecr.io/myapp-hello:276 C:\heisoul2_agent\_work\7\s\hello-solution\core\Infrastructure\Docker\build\5910
2021-03-04T06:58:26.3591773Z Sending build context to Docker daemon  154.9MB
2021-03-04T06:58:26.3592364Z 
2021-03-04T06:58:26.3701800Z Step 1/19 : FROM tomcat:9.0.41-jdk15-openjdk-slim-buster
2021-03-04T06:58:41.7345125Z Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2021-03-04T06:58:41.7599411Z ##[error]C:\Program Files\Docker\docker.exe failed with return code: 1
2021-03-04T06:58:41.7613038Z ##[section]Finishing: Build an image

Docker Desktop window pan not showing options in resources sections

enter image description here

TylerH
  • 20,799
  • 66
  • 75
  • 101
Satyam Pandey
  • 593
  • 2
  • 10
  • 32
  • Maybe this is a solution: https://stackoverflow.com/questions/48056365/error-get-https-registry-1-docker-io-v2-net-http-request-canceled-while-b – Yuriy Piskunov Mar 04 '21 at 07:17
  • Yes i am also thinking to change the DNS Server IP to 8.8.8.8 , however in my docker desktop window pan, i am not able to see the option of network that very weird ,, i have attached the screen shot – Satyam Pandey Mar 04 '21 at 07:55

2 Answers2

0

This error encountered due to the destination unreachability problem. It means that the port might be filtered by the local or external firewall, the DNS setting of the machine might be the trouble.

however in my docker desktop window pan, i am not able to see the option of network that very weird

For this issue, the Network tab is not available in Windows container mode because networking is managed by Windows. This is stated in this official document.

Regarding changing Windows DNS addresses, detailed instructions on how to do so here (see section II).

This document is about configuring container DNS, the information in this section explains configuring container DNS within the Docker default bridge.

Here are some tickets(ticket1, ticket2) with the same issue you can refer to.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
0

I used buildArguments in dockertask in azure-pipeline.yml

buildArguments: 'http_proxy=http://username:password@proxy:80'
TylerH
  • 20,799
  • 66
  • 75
  • 101
Satyam Pandey
  • 593
  • 2
  • 10
  • 32