Skip to content

render: cannot create Docker network on macOS — Unix socket path percent-encoded as %2F in HTTP URL causes context deadline exceeded #531

Closed

Description

@mfaizanse

What happened?

Running crossplane composition render on macOS with Docker Desktop fails when creating the Docker network for rendering. The Go Docker client incorrectly percent-encodes the Unix socket path in the HTTP URL, producing http://%2Fvar%2Frun%2Fdocker.sock/_ping instead of a valid Unix socket HTTP request — causing a context deadline exceeded timeout.

The error occurs even though Docker is fully functional (docker ps, docker network create all work normally).

Error message

crossplane: error: cannot create Docker network for rendering: cannot create Docker network "crossplane-render-xxxxx": Get "http://%2Fvar%2Frun%2Fdocker.sock/_ping": context deadline exceeded

How to reproduce

  1. Install Docker Desktop on macOS (tested with Docker Desktop 4.x, macOS arm64)
  2. Install crossplane CLI v2.5.0 via brew
  3. Run crossplane composition render <xr.yaml> <composition.yaml>
  4. Observe failure at the "cannot create Docker network" step

Workaround

Use socat to bridge the Unix socket to TCP, then set DOCKER_HOST:

socat TCP-LISTEN:2375,bind=127.0.0.1,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock &
export DOCKER_HOST=tcp://127.0.0.1:2375
crossplane composition render <xr.yaml> <composition.yaml>

Environment

  • Crossplane CLI version: v2.5.0
  • Platform: darwin/arm64 (macOS)
  • Docker Desktop version: 4.x (latest)
  • Docker context: desktop-linux (default on macOS)
  • Docker socket: /var/run/docker.sock → symlink to ~/.docker/run/docker.sock

Activity

  1. adamwg commented on Nov 11, 2026

    @adamwg
    Member

    Hi @mfaizanse - were you able to solve this? If you can share what was wrong, it could be helpful for anyone else who hits the issue in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions