Skip to content

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

Merged
andrew-glenn merged 2 commits intoaws-ia:mainfrom
james-hu:fix/issue-798-DockerException
Jan 26, 2026
Merged

fix(#798): Honor DOCKER_HOST environment variable for Docker API client#866
andrew-glenn merged 2 commits intoaws-ia:mainfrom
james-hu:fix/issue-798-DockerException

Conversation

@james-hu
Copy link
Copy Markdown
Contributor

@james-hu james-hu commented Dec 3, 2025

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
Copy link
Copy Markdown
Contributor Author

james-hu commented Dec 4, 2025

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

@n-tucker
Copy link
Copy Markdown

+1 for this PR, we're encountering the same issue trying to update the SOCI index builder to v2 using taskcat upload. Setting DOCKER_HOST fixes the error on the host, but as soon as the Lambda packaging is run inside the Taskcat container things are borked 😢

image

@andrew-glenn
Copy link
Copy Markdown
Contributor

pre-commit fixes, etc, forthcoming in a secondary PR

@andrew-glenn andrew-glenn merged commit 145a119 into aws-ia:main Jan 26, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants