Ive configured TLS for my docker on my windows server 2019 followed the instructions by https://github.com/StefanScherer/dockerfiles-windows/tree/main/dockertls
It prints the following message after docker compose up
It starts the first container build regarding my yml file just to end directly after verifying the yml with:
error during connect: Get "http://localhost:2375/v1.24/containers/json?all=1&filters=...": dial tcp [::1]:2375: connectex: No connection could be made because the target machine actively refused it.
Somehow it calls localhost and the unsecured port (2375) which ofc is not exposed and also not set in the host param as you see below.
Im using the following command:
docker -H tcp://<ip>:2376 --tls --tlsverify --tlscacert=.\.dockercert\ca.pem --tlscert=.\.dockercert\cert.pem --tlskey=.\.dockercert\key.pem compose up -f <my yml files>...
If I run this exact line from my work station or on the server itself it works just fine. But called by the self-hosted bitbucket runner it ends up with the error above
The files in the .dockercert folder all exist. My docker deamon config look followed by above examle like this:
{
"data-root": "D:\\Docker-Data",
"tlscacert": "C:\\ProgramData\\docker\\certs.d\\ca.pem",
"tlskey": "C:\\ProgramData\\docker\\certs.d\\server-key.pem",
"tlscert": "C:\\ProgramData\\docker\\certs.d\\server-cert.pem",
"hosts": [
"tcp://0.0.0.0:2376",
"npipe://"
],
"tlsverify": true
}