upserve / docker-api

A lightweight Ruby client for the Docker Remote API
MIT License
1.09k stars 289 forks source link

Cannot use Docker API gem with Docker Desktop on Windows #572

Open lucywyman opened 3 years ago

lucywyman commented 3 years ago

I created an issue for this with Excon, as the specific issue is coming from when we try to connect to the Socket for Docker: https://github.com/excon/excon/issues/738. I'm not sure if there's any path forward for getting the gem to work on Windows?

nogweii commented 2 years ago

Not sure if you already realized this, but this is because Docker Desktop on Windows exposes the docker HTTP API over a TCP socket on the loopback interface. (Since Windows doesn't support UNIX socket files, especially bridged into a VM.)

I believe the default (once exposing is enabled in Docker Desktop) is tcp://localhost:2375.

abenevaut commented 1 year ago

i do DOCKER_URL=tcp://localhost:2375 bundle exec rspec