feat: add support for docker-socket-proxy#52
Open
dan-hollis wants to merge 1 commit intoFinsys:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds TCP Docker connection support via
DOCKER_HOSTfor use with docker-socket-proxy and similar TCP-based proxies.Previously,
DOCKER_HOSTwas loaded from the environment but never actually wired into the Docker client. All connections were hardcoded to Unix sockets. This caused startup failures when attempting to use a TCP proxy:Docker socket not found at tcp://socket-proxy:2375(config validation ranos.Stat()on a TCP URL)dial unix /var/run/docker.sock: connect: no such file or directory(client always dialed Unix)Changes
internal/docker/client.go: NewNewClientWithHost()constructor with TCP/Unix transport selection. NewDialDocker()method as single entry point for all raw connections, replacing 5 scatterednet.Dial("unix", ...)calls.internal/docker/compose.go: NewdockerHostEnv()helper so subprocesses (docker compose,docker login) receive the correctDOCKER_HOSTvalue instead of hardcodedunix://.internal/config/config.go: ValidatesDOCKER_HOSTformat (tcp://required) when set; skips socket file check.internal/server/http.go,internal/edge/client.go,internal/edge/tunnel.go: Updated to passDockerHostthrough and useDialDocker()for raw connections.Usage
Where
socket-proxyis adocker-socket-proxycontainer on the same internal docker network in this case.fixes #44
fixes #46