Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mount windows folder using docker compose volumes?

How to mount windows folder using docker compose volumes?

I am trying to set up docker container using docker-compose. My docker-compose.yml file looks as follow:

php-fpm:
  build: php-fpm
  container_name: php-fpm
  volumes:
    - ../project:/var/www/dev

When i enter to the container like this:

docker exec -it php-fpm bash

And display content with ls command the /var/www/dev directory is empty. Does enyone know the solution for this ?

$ docker -v
Docker version 1.12.0, build 8eab29e

$ docker-compose -v
docker-compose version 1.8.0, build d988a55

I have Windows 10 and docker is installed via Docker ToolBox 1.12.0

@edit The mounted directory is also empty under Linux enviroment

like image 800
vardius Avatar asked Sep 13 '16 10:09

vardius


1 Answers

I fixed it by going to: Local Security Policy > Network List Manager Policies and Double-clicked unidentified Networks then change the location type to private and restarted Docker. Source

like image 92
vardius Avatar answered Oct 05 '22 06:10

vardius