Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

373
Vistas
docker for windows equivalent for "-v /var/run/docker.sock:/var/run/docker.sock"

I'm trying to control the host docker service from inside a container.

With Linux host and Linux container that is usually done like this: docker run -it -v /var/run/docker.sock:/var/run/docker.sock alpine

I now want to achieve the same with a Docker for Windows host and a Linux container.

If tried quite a lot of things, mostly using DOCKER_HOST with varying IP's like 10.75.0.1:2375 (IP of docker VM), 172.17.0.1:2375 (container IP) and 0.0.0.0:2375 as well as 192.168.178.xxx:2375 (host IP).

But apparently nothing responds on port 2375 or 2376 which I checked with something like: docker run -ti --rm alpine /bin/sh -c "apk add -U nmap && nmap -Pn 10.72.0.1 -p 2375-2376"

At this point I'd like to know if this is even possible with Docker for Windows. Most information I found concerns docker-machine / VirtualBox combinations.

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

This works fine when running Linux containers using Docker for Windows too (but not when running Windows containers). Just ensure that your shell won't rewrite paths or similar.

over 4 years ago · Santiago Trujillo Denunciar

0

I don't know how SO works so if necroposting is frowned upon then sorry. I also don't use docker on windows but this thread came up during my search for setting up portainer. I figured out the thing that I wanted to figure out and on first login portainer gave me this warning:

 Ensure that you have started the Portainer container with the following Docker flag:
-v "/var/run/docker.sock:/var/run/docker.sock" (Linux).
or
-v \\.\pipe\docker_engine:\\.\pipe\docker_engine (Windows).

So, there you go. Hope that helps.

over 4 years ago · Santiago Trujillo Denunciar

0

To complement the answer by @friism:

Just ensure that your shell won't rewrite paths or similar.

This was happening to me within Git Bash on Windows. The solution, in this case, was to prefix all absolute paths with an extra slash (/) to disable the automatic path rewriting done by Git Bash. (Source)

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda