Reputation: 7041
Having a docker database container, in this case a neo4j container, how can I persist the data, and make sure that the next time I start a neo4j docker image that it points to my HOST database and not a new database?
I am using Docker in windows, so boot2docker is being used. And I say database but I am also thinking how do I serve a directory that I am working on a web application to be run, so I don't have to commit all the changes to the image... I just want to edit a folder in my windows environment and debug it using a docker web server stack.
Upvotes: 2
Views: 657
Reputation: 8791
The easiest way would be to have a shared folder between your Windows host and boot2docker VM (This post can help)
Then you just have to share that folder to your container using the -v option.
docker run -d -v /path/to/shared/folder/in/VM:/path/to/folder/in/container myimage /cmd
More info on how to share data between container and host
Upvotes: 3