We are building a container image with k3d installed. As part of the build pipeline, I want to do a lightweight test/verification of the k3d installation. When the pipeline had access to docker, both k3d --version and k3d version worked. But now I want to avoid having docker (or any other container runtime) available to the pipeline. But this does not seem to work:
$ k3d version
Failed to initialize: unable to resolve docker endpoint: open /certs/client/ca.pem: no such file or directory
The container image has docker installed adding some DOCKER_* environment variables. As a workaround, I tried to unset all DOCKER_* environment variables before running the test (inside the image). And it works! But I think the k3d version should be independent of a Docker runtime present - regardless of docker environment variables present.
What did you expect to happen
The commands k3d --version and k3d version prints the versions as it should without errors.
What did you do
We are building a container image with k3d installed. As part of the build pipeline, I want to do a lightweight test/verification of the k3d installation. When the pipeline had access to docker, both
k3d --version
andk3d version
worked. But now I want to avoid having docker (or any other container runtime) available to the pipeline. But this does not seem to work:The only reference to this path I can find is the environment variable DOCKER_CERT_PATH=/certs/client . I've been looking briefly at the k3d source code, and I suspect there might be something in the generic init applied to all commands: https://github.com/k3d-io/k3d/blob/7f8ffd64b23ee3b69da576186b09014d5b352f28/cmd/root.go#L203
The container image has docker installed adding some
DOCKER_*
environment variables. As a workaround, I tried to unset allDOCKER_*
environment variables before running the test (inside the image). And it works! But I think thek3d version
should be independent of a Docker runtime present - regardless of docker environment variables present.What did you expect to happen
The commands
k3d --version
andk3d version
prints the versions as it should without errors.Which version of
k3d
v5.7.4