Skip to content

feat: honor DOCKER_HOST for Docker daemon resolution#4

Merged
hectorvent merged 2 commits into
mainfrom
feat/docker-host-env
Jun 10, 2026
Merged

feat: honor DOCKER_HOST for Docker daemon resolution#4
hectorvent merged 2 commits into
mainfrom
feat/docker-host-env

Conversation

@hectorvent

Copy link
Copy Markdown
Contributor

Summary

Resolves the Docker daemon endpoint from the standard DOCKER_HOST environment variable so Podman, rootless setups, and remote Docker contexts work without assuming /var/run/docker.sock.

Details

  • New DockerClient.parseDockerHost(...) resolver with precedence: DOCKER_HOST (standard) → DOCKER_SOCK (legacy override) → OS default. Classifies the endpoint as UNIX, TCP, or NPIPE.
  • start / az start / gcp start now use dockerSocketRunArgs(): bind-mount the resolved unix socket, or pass a remote tcp:// daemon through to the container via DOCKER_HOST.
  • floci doctor's docker.socket check reports the resolved endpoint (unix path, remote daemon, or named pipe).
  • Adds DockerHostResolveTest (10 cases) and README documentation.

Testing

  • mvn test — 33 passing (incl. new DockerHostResolveTest).
  • Verified floci doctor against default socket, tcp:// remote, and a Podman unix:// socket.

Closes #3

Resolve the Docker endpoint from DOCKER_HOST (with the legacy DOCKER_SOCK
override and an OS default fallback) so Podman, rootless setups, and remote
Docker contexts work without assuming /var/run/docker.sock.

start/az start/gcp start bind-mount the resolved unix socket or pass a remote
tcp:// daemon through via DOCKER_HOST; doctor's docker.socket check reports the
resolved endpoint. Adds DockerHostResolveTest and README documentation.

Closes #3
@hectorvent hectorvent merged commit 6862c0d into main Jun 10, 2026
2 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.

Feature Request: Add support for using $DOCKER_HOST environment variable

1 participant