Tecnativa / Tecnativa/docker-socket-proxy
503 with docker-desktop on Mac
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 207
- PR merge metrics
- No merged PRs in 30d
Description
With docker-desktop 4.20.1 on Mac, the following crashes with a HTTP 503 error:
# get the location of the currently active docker socket, will be something like $HOME/.docker/run/docker.sock
#
socket="$(docker context ls --format '{{.Current}}\t{{.DockerEndpoint}}' | awk '$1 == "true" { print $2 }')"
socket="${socket#unix://}"
# run the socket proxy
#
docker run -p 2375:2375 -v "${socket}:/var/run/docker.sock:ro" -d --rm tecnativa/docker-socket-proxy
# make a call to the proxy: this crashes
#
DOCKER_HOST=tcp://127.0.0.1:2375 docker ps
Hard-coding socket=/var/run/docker.sock works fine, but shouldn't there be a way to respect the socket location provided by the docker context?
Other approaches I tried which didn't work:
- Adding
--privilegedto the docker run command: same crash with a 503 - Adding
--user $UID:$GIDto the docker run command: container fails to start with error "Cannot create pidfile /run/haproxy.pid"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with Docker Desktop 4.20.1 using the docker context-derived socket, docker-socket-proxy, and DOCKER_HOST=tcp://127.0.0.1:2375. Compare it with the working hard-coded /var/run/docker.sock setup and trace the source of the HTTP 503; done means the context-provided socket works through the proxy without the crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100