2

I have just started using k3d for local testing of ephemeral clusters. Locally it works great - I use pretty much default docker settings with no problems.

I would like to add automated tests like this using GitLab CI. On GitLab workers, the docker is not available on the default Unix domain socket: unix:///var/run/docker.sock, but rather a TCP socket, i.e.: tcp://docker:2376. This means, for the tests to work, I would need to somehow tell k3d to use the custom address.

I could not find anywhere in the k3d docs info how to use a different than default docker address. Is there some configuration entry that could be used?

hauron
  • 4,550
  • 5
  • 35
  • 52

1 Answers1

1

You can set the DOCKER_HOST variable, which is respected by all Docker commandline tools as well as k3d.

Eg:

export DOCKER_HOST=tcp://docker:2376
k3d cluster list
docker ps