Docker Community Forums

Share and learn in the Docker community.

Mounting folders outside the user's folder on Windows


I may just be failing to searching these forums, as I feel like this is something that would have been asked and answered, but how can I mount folders outside the User directory on Docker Toolbox on WIndows 10 Home? I’ve shared the folder onto the VM, but can’t seem to actually get it to mount into a container (using docker compose). I’ve tried looking online but everything seems to be 2+ years ago and out of date.

I’ve followed the steps here: but when I use docker exec -it dockernginxphpexample_web_1 /bin/ash to try checking out the folder in the container, the directory is empty.

Can I do this? It’s really frustrating that it looks like I’d have to do work in one folder and then move it to another to actually put into my containers.

(Tekki) #2

Did you mount a folder into the container? See And if it still doesn’t work check your firewall, it may block the Docker network.


If it helps, this is my docker compose:

version: '3'


      context: .
      dockerfile: docker/nginx/Dockerfile
      - 8080:80
      - ./public:/code
      - php

      context: .
      dockerfile: docker/php/Dockerfile
      - ./public:/code