compose/internal
Domantas Petrauskas 0afb4c8c4c
Some checks failed
ci / validate (lint) (push) Has been cancelled
ci / validate (validate-docs) (push) Has been cancelled
ci / validate (validate-go-mod) (push) Has been cancelled
ci / validate (validate-headers) (push) Has been cancelled
ci / binary (push) Has been cancelled
ci / bin-image-test (push) Has been cancelled
ci / test (push) Has been cancelled
ci / e2e (plugin, oldstable) (push) Has been cancelled
ci / e2e (standalone, oldstable) (push) Has been cancelled
ci / e2e (plugin, stable) (push) Has been cancelled
ci / e2e (standalone, stable) (push) Has been cancelled
merge / bin-image-prepare (push) Has been cancelled
merge / module-image (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
ci / binary-finalize (push) Has been cancelled
ci / coverage (push) Has been cancelled
ci / release (push) Has been cancelled
merge / bin-image (push) Has been cancelled
merge / desktop-edge-test (push) Has been cancelled
fix(publish): bypass Docker Desktop proxy for loopback registries
`docker compose publish` routed all registry traffic through Docker
Desktop's HTTP proxy. Publishing to a registry on localhost therefore
failed on Windows with:

    proxyconnect tcp: open ./pipe/dockerHttpProxy: The system cannot
    find the path specified.

even though `docker push`/`docker pull` worked against the same registry.

Two bugs in internal/desktop/proxy.go:

1. No loopback bypass. ProxyTransport forced every request through the
   Docker Desktop proxy and its DialContext always dialed the proxy
   socket, so loopback targets could never connect directly. Proxy
   selection now bypasses the proxy only for loopback targets
   (localhost, 127.0.0.0/8, ::1); all other registry traffic stays
   routed through Docker Desktop's PAC-aware proxy so Desktop keeps
   ownership of proxy decisions (e.g. enterprise-managed proxies). The
   local process NO_PROXY/no_proxy is deliberately not honored, so a
   broad value such as * or .corp cannot bypass centrally managed
   proxy policy.

2. Malformed Windows pipe path. The proxy named-pipe endpoint was
   hardcoded as npipe://./pipe/..., yielding the relative path
   ./pipe/dockerHttpProxy. It is now derived from the engine endpoint,
   preserving its namespace. Docker Desktop reports the backslash form
   npipe://\\.\pipe\docker_cli, so the derivation uses LastIndexAny to
   handle both backslash and forward-slash forms.

Publishing to localhost now connects directly like `docker push`, while
every non-loopback registry still goes through the Docker Desktop proxy.

Fixes #13824

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Domantas Petrauskas <dom.petrauskas@gmail.com>
2026-06-15 21:18:19 +02:00
..
desktop fix(publish): bypass Docker Desktop proxy for loopback registries 2026-06-15 21:18:19 +02:00
experimental next release will be major version v5.x 2025-11-13 09:32:43 +01:00
locker use new moby/moby modules instead of docker/docker dependency 2026-04-08 08:50:50 +02:00
memnet feat(desktop): add Docker Desktop detection and client skeleton (#11593) 2024-03-12 09:47:41 -04:00
oci fix: route OCI artifact pulls through Docker Desktop HTTP proxy 2026-05-18 10:53:23 +02:00
paths use go-compose instead Signed-off-by: tensorworker <tensorworker@proton.me> 2026-01-15 08:24:20 +01:00
pidfile use new moby/moby modules instead of docker/docker dependency 2026-04-08 08:50:50 +02:00
registry use containerd registry client 2025-09-26 18:45:07 +02:00
sync test: migrate tar_test.go from testify to gotest.tools/v3 2026-04-03 12:29:07 +02:00
tracing chore(deps): github.com/docker/buildx v0.34.1, buildkit v0.30.0 2026-06-15 12:45:57 +02:00
variables.go format code with gofumpt 2024-12-17 16:50:14 +01:00