Skip to content

Docker Build Error: "No connection could be made because the target machine actively refused it" on Bitbucket Pipeline

0

I'm encountering an error while running a Bitbucket Pipeline to build a Docker image on a Windows instance. Despite configuring Docker to use the named pipe, I receive a connection error. Here's a detailed description of my setup and the issue: { "experimental": false, "hosts": [ "npipe:///" ] } This is my deamon.json that I have modified . I have Confirmed Docker Desktop settings and ensured the option Expose daemon on tcp://localhost:2375 without TLS is unchecked.

asked a year ago392 views
2 Answers
3
Accepted Answer

Hello,

To fix the Docker build error in your Bitbucket Pipeline on a Windows instance, the Docker is configured to use named pipes. Set your daemon.json to {"hosts": ["npipe:///"]} and confirm "Expose daemon on tcp://localhost:port number without TLS" is unchecked in Docker Desktop settings. In your pipeline, set the Docker service's DOCKER_HOST environment variable to npipe:////./pipe/docker_engine.

Please look at Link.

https://stackoverflow.com/questions/67126094/how-to-connect-to-docker-daemon-in-bitbucket-pipeline

https://community.atlassian.com/t5/Bitbucket-questions/Unable-to-build-push-Windows-container-via-Windows-Runner/qaq-p/2189404

https://phoenixnap.com/kb/cannot-connect-to-the-docker-daemon-error

EXPERT
answered a year ago
EXPERT
reviewed a year ago
EXPERT
reviewed a year ago
1

One option to check is to use the Docker in Docker containerization.

Please look at this link : https://stackoverflow.com/questions/67126094/how-to-connect-to-docker-daemon-in-bitbucket-pipeline

EXPERT
answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.