I’m new to dockers and I have a self hosted windows-10 VM scale set. Now from this build agent, I’m trying to run the docker build and it is failing with below error on azure pipeline
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.32/images/create?fromImage=prefecthq%2Fprefect&tag=2-python3.10: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. C:a_tooldocker-stable17.9.0-cex64docker.exe inspect prefecthq/prefect:2-python3.10
The image is building successfully in local
Here are my yml tasks
- task: DockerInstaller@0
inputs:
dockerVersion: '17.09.0-ce'
- task: Docker@2
displayName: "Docker Registry Login"
inputs:
containerRegistry: "$(DockerRegistryServiceEndpointName)"
command: "login"
- task: Docker@2
displayName: "Build Docker Image"
inputs:
containerRegistry: "$(DockerRegistryServiceEndpointName)"
repository: "$(ContainerRepository)"
command: "build"
Dockerfile: "**/Dockerfile"
tags: |
$(Build.BuildId)
latest
I tried to see if docker version
is working and even for that, I get same error
To run the daemon I used below command but it is not working through pipeline saying docker is not found.
- powershell: |
Start-Service docker
docker version
I’m not sure whether if we can run in elevated mode through yml powershell.
user25982998 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.