1

I installed docker toolbox 1.11.2 and Laradock v.2 cloned from GitHub.

Everything seems to work except the laradock_workspace_1. When is generated it does not create files on the host machine (Windows 7 64-bit). In the docker-compose.yml I have tried playing with the volumes as suggested here

### Laravel Application Code Container ######################

    volumes_source:
        build: ./volumes/application
        volumes:
            - ../:/var/www/laravel

If I change the last line to ../.. then run docker-compose up, docker exec -it laradock_workspace_1 ls and I can see that it is traversing the folders on the host machine. I just don't see any files.

My goal here is to make the actual Laravel code external so I can edit them on the host machine and use git.

I can use the Kitematic app to make the changes I want but they seem lost if I do a docker-compose down. (and I get errors about things still being in use.)

I'm new to docker so any help is appreciated.

S.I.
  • 3,250
  • 12
  • 48
  • 77

1 Answers1

2

First, make sure your docker-machine is running. If it is, then follow below:

Open up Virtualbox GUI and right click your docker vm, and select settings, then go to Shared Folders.

Change the c\users to whatever folder your code lies in, like this: enter image description here

This will mount your desired folder to /c/Users in the docker-machine vm.

After this, change the docker-compose.yml in the laradock folder to this:

### Laravel Application Code Container ######################

    volumes_source:
        build: ./volumes/application
        volumes:
            - /c/Users/pomodoro.xyz/code:/var/www/laravel

The logic behind this is, since we are running the docker in a VM, the docker-compose command looks for folder in the VM, not in the windows machines. Thats why we have provided the VM machine path to the docker-compose file.

stirredo
  • 2,297
  • 3
  • 19
  • 23