Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

503 with docker-desktop on Mac #92

Open
c-w opened this issue Jun 26, 2023 · 0 comments
Open

503 with docker-desktop on Mac #92

c-w opened this issue Jun 26, 2023 · 0 comments

Comments

@c-w
Copy link

c-w commented Jun 26, 2023

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 --privileged to the docker run command: same crash with a 503
  • Adding --user $UID:$GID to the docker run command: container fails to start with error "Cannot create pidfile /run/haproxy.pid"
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

No branches or pull requests

1 participant