Docker Community Forums

Share and learn in the Docker community.

Mount Windows npipe into a Linux container

Hi there, what’s the best way to connect a Linux container with a Windows host?

On a Linux based host it’s usually achieved by mounting /var/run/docker.sock into the Linux container. That being said, on Windows, there is no docker.sock to mount since Docker for Windows uses a named pipe. We tried to mount the named pipe into the Linux container without any luck. We saw similar issues like this one: https://github.com/docker/for-win/issues/6813

Did anyone get it to work? Or the only way to control the Windows host from a container is by using a Windows container?

Thanks in advance :raised_hands:

No, you cannot run windows containers directly on Linux. But you can run Linux on Windows. You can change between OS containers Linux and windows by right clicking on the docker in tray menu. Unlike Virtualization, containerization uses the same host os.