Docker – Local Development on container
Getting started with Docker and I wanted to know the following:
I want to develop a Laravel application, all of the files are located on my local machine. However, I cannot seem to figure out how I am able to synchronise the files on my local machine to the server itself?
This was available using vagrant so I’m just wondering is there an effective and easy solution to this problem?
One Solution collect form web for “Docker – Local Development on container”
Have a look at: https://docs.docker.com/engine/tutorials/dockervolumes/
Probably you have to do something like:
$ docker run -d --name mycontainer -v /home/user/Sites/mysite:/var/www/mysite my/image
This way you mount the host folder to you container folder. This means that the folder on your host will be visible from your container. These two folders are the same folder physically!