Skip to content

Instantly share code, notes, and snippets.

@cicorias
Created September 12, 2019 15:25
Show Gist options
  • Save cicorias/960a2d3fffff608bcc32b2d574218227 to your computer and use it in GitHub Desktop.
Save cicorias/960a2d3fffff608bcc32b2d574218227 to your computer and use it in GitHub Desktop.
running docker remotely on a docker for desktop host

Setup the Docker API Proxy

Use a canned image or the Dockerfile below

docker run -d --name proxy -p 2375:2375 -v /var/run/docker.sock:/var/run/docker.sock jarkt/docker-remote-api

Ensure any firewalls aren't running remote.

Then set the ENV variables

export DOCKER_HOST=tcp://192.168.86.171:2375
FROM alpine
RUN apk update && apk add socat
EXPOSE 2375
CMD socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment