Hello Community,
I also asked that question on SO but thought its more bitbucket specific so it would be good to ask this question here:
Ive got a windows runnter on my win2019 server wit latest docker installed.
As suggested here: https://github.com/StefanScherer/dockerfiles-windows/tree/main/dockertls
I set up docker for tcp with activated TLS.
So far so good.
Outside the pipeline the script works just fine - also from my workstation im able to deploy the docker-compose project to my server.
However when it comes to run the exact same command inside the pipeline it ends up using the wrong host/port:
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>...
Result:
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.
You can see somehow inside the pipeline docker tries to connect to http://localhost:2375 instead of "<ip>:2376".
So I asume somethings happening inside the runner that changes the host or even removed the param, but I thought its just a java application that run on my powershell.
The cert files exist and as mentioned no problems when I run the command from any other mashine.
Any idea how to fix it?
Best,
Malte