Docker Community Forums

Share and learn in the Docker community.

Access host docker inside container docker on Windows 10

(Vinogradovf) #1

I have a simple home setup for a build server which i run in docker on my Windows 10 laptop.

I would like to be able to build and push docker images from my build agent (which i run inside ubuntu 16.04 container). In linux i would share /var/run/docker.sock between host and container.

My question is how can i use host docker from linux container running on windows host ?

(Seanwong) #2

It’s been more than a year now, and I am in similar need, may i ask if you have already found a solution?

(Seanwong) #3

i found the solutions here works for me, by mapping //var/run/docker.socket:/var/run/docker.socket to the container

to use it with docker-compose, the solutions provided here worked for me, using hyper-v enabled docker

it is to either create .env file with COMPOSE_CONVERT_WINDOWS_PATHS=1 in it, and placed with at the same location as the docker-compose.yml.

else, you can set it in the CLI, set COMPOSE_CONVERT_WINDOWS_PATHS=1