azure-pipelines-tasks: DockerV2 using ACR - no such host

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DockerV2

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines
  • Agent - Hosted ubuntu-latest

Issue Description

We’re trying to build and push a docker image to a private Azure Container Registry. The Docker Login step succeeds, but the Docker buildAndPush step fails with the following error message:

Get https://***/v2/: dial tcp: lookup *** on 168.63.129.16:53: no such host
/usr/bin/docker failed with return code: 1

This sounds like it might be related to https://github.com/microsoft/azure-pipelines-tasks/issues/10612, although we’re getting a slightly different error message and using a different agent.

Here is a stripped down version of our pipeline yaml:

name: "2019.3$(Rev:.r)"

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

variables:
  configuration: Release
  fullVersion: "2019.3.$(Build.BuildId)"

steps:
- task: Docker@2
  displayName: Login to ACR
  inputs:
    command: login
    containerRegistry: resdiary-acr

- task: Docker@2
  displayName: Build and push docker image
  inputs:
    command: buildAndPush
    containerRegistry: resdiary-acr
    repository: resdiary/database-maintenance
    tags: $(fullVersion)

Task logs

##[section]Starting: Build and push docker image
==============================================================================
Task         : Docker
Description  : Build or push Docker images, login or logout, or run a Docker command
Version      : 2.152.3
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/docker
==============================================================================
[command]/usr/bin/docker build -f /home/vsts/work/1/s/Dockerfile --label com.azure.dev.image.system.teamfoundationcollectionuri=https://dev.azure.com/xyz/ --label com.azure.dev.image.system.teamproject=Database Maintenance --label com.azure.dev.image.build.repository.name=xyz --label com.azure.dev.image.build.repository.uri=https://github.com/xyz --label com.azure.dev.image.build.sourcebranchname=merge --label com.azure.dev.image.build.sourceversion=28fd3aa0e53b82028e8247958e993c39f0aa10f3 --label com.azure.dev.image.build.definitionname=xyz --label com.azure.dev.image.build.buildnumber=2019.3.14 --label com.azure.dev.image.build.builduri=vstfs:///Build/Build/27 --label com.azure.dev.image.build.requestedfor=GitHub -t ***/resdiary/database-maintenance:2019.3.27 /home/vsts/work/1/s
Sending build context to Docker daemon  5.492MB

Step 1/15 : FROM mcr.microsoft.com/dotnet/core/runtime:2.2
2.2: Pulling from dotnet/core/runtime
743f2d6c1f65: Pulling fs layer
074da88b8de0: Pulling fs layer
ac831735b47a: Pulling fs layer
3adcc844418d: Pulling fs layer
3adcc844418d: Waiting
ac831735b47a: Download complete
074da88b8de0: Verifying Checksum
074da88b8de0: Download complete
3adcc844418d: Verifying Checksum
3adcc844418d: Download complete
743f2d6c1f65: Verifying Checksum
743f2d6c1f65: Download complete
743f2d6c1f65: Pull complete
074da88b8de0: Pull complete
ac831735b47a: Pull complete
3adcc844418d: Pull complete
Digest: sha256:d9543cbaa0d6ad7e0cda582608cde22da424c932e7d17ecdc433da0c1a8ceabb
Status: Downloaded newer image for mcr.microsoft.com/dotnet/core/runtime:2.2
 ---> c0f9ab44ecc1
Step 2/15 : WORKDIR /app
 ---> Running in 17b4ee6f68d8
Removing intermediate container 17b4ee6f68d8
 ---> 751998d2ad19
Step 3/15 : COPY artifacts/output .
 ---> 7820d2519b7d
Step 4/15 : COPY src/appsettings.yaml .
 ---> ddf985fc1521
Step 5/15 : ENTRYPOINT ["dotnet", "RD.DatabaseMaintenance.dll"]
 ---> Running in aa825ab58117
Removing intermediate container aa825ab58117
 ---> e38d38095bcd
Step 6/15 : LABEL com.azure.dev.image.build.buildnumber=2019.3.14
 ---> Running in df252650997f
Removing intermediate container df252650997f
 ---> cd9c1cdde28c
Step 7/15 : LABEL com.azure.dev.image.build.builduri=vstfs:///Build/Build/27
 ---> Running in d68e84c5a0bb
Removing intermediate container d68e84c5a0bb
 ---> 503e70720965
Step 8/15 : LABEL com.azure.dev.image.build.definitionname=xyz
 ---> Running in a5fc5b334f54
Removing intermediate container a5fc5b334f54
 ---> a2f74a7ccc92
Step 9/15 : LABEL com.azure.dev.image.build.repository.name=xyz
 ---> Running in 037dba944eed
Removing intermediate container 037dba944eed
 ---> 5af630af58fc
Step 10/15 : LABEL com.azure.dev.image.build.repository.uri=https://github.com/xyz
 ---> Running in 5a7debc70dba
Removing intermediate container 5a7debc70dba
 ---> f7a1b281915a
Step 11/15 : LABEL com.azure.dev.image.build.requestedfor=GitHub
 ---> Running in b2096844c03b
Removing intermediate container b2096844c03b
 ---> 70bfcdbe86b0
Step 12/15 : LABEL com.azure.dev.image.build.sourcebranchname=merge
 ---> Running in 41c144d0fdbc
Removing intermediate container 41c144d0fdbc
 ---> adb986725dce
Step 13/15 : LABEL com.azure.dev.image.build.sourceversion=28fd3aa0e53b82028e8247958e993c39f0aa10f3
 ---> Running in 3e542ba7de7e
Removing intermediate container 3e542ba7de7e
 ---> 7387addddad9
Step 14/15 : LABEL com.azure.dev.image.system.teamfoundationcollectionuri=https://dev.azure.com/xyz/
 ---> Running in db5057b2ee69
Removing intermediate container db5057b2ee69
 ---> a64b38582c25
Step 15/15 : LABEL com.azure.dev.image.system.teamproject=Database Maintenance
 ---> Running in c925ec9f8ed6
Removing intermediate container c925ec9f8ed6
 ---> 82181ab24445
Successfully built 82181ab24445
Successfully tagged ***/resdiary/database-maintenance:2019.3.27
[command]/usr/bin/docker push ***/resdiary/database-maintenance:2019.3.27
The push refers to repository [***/resdiary/database-maintenance]
Get https://***/v2/: dial tcp: lookup *** on 168.63.129.16:53: no such host
##[error]Get https://***/v2/: dial tcp: lookup *** on 168.63.129.16:53: no such host
##[error]/usr/bin/docker failed with return code: 1
##[section]Finishing: Build and push docker image

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

Get https://***/v2/: dial tcp: lookup *** on 168.63.129.16:53: no such host
/usr/bin/docker failed with return code: 1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

s

Any solution? issue fixed?