taskcat icon indicating copy to clipboard operation
taskcat copied to clipboard

fix(#798): Honor DOCKER_HOST environment variable for Docker API client

Open james-hu opened this issue 1 month ago • 1 comments

Overview

TaskCat fails when running in Kubernetes with contained runtime or in GitLab pipeline due to Docker daemon connection errors.

Testing/Steps taken to ensure quality

See issue #798. As long as the UNIX socket is not available, the error happens.

Solution

Allow users to specify a custom Docker host via the DOCKER_HOST environment variable, which is passed to the Docker APIClient constructor.

Changes

  • Docker APIClient now uses DOCKER_HOST if set, otherwise defaults to unix://var/run/docker.sock

Testing Instructions

Test in an environment that the Docker daemon's UNIX socket is not accessible by the client, for example in a GitLab pipleine with docker:dind service.

james-hu avatar Dec 03 '25 05:12 james-hu

I am not familiar with this... what should I do to make "Static Analysis" green?

james-hu avatar Dec 04 '25 02:12 james-hu