I am running a Spring Boot mongodb example from John Thompson's course.
I am using Window 10 while John Thompson is using Mac/Linux. I heard Docker may not be working properly in Windows.
According to John, Docker is a "Linux" thing.
I installed Docker for Windows (Edge release, engine 18.09.0)
I tried both Linux and Windows containers in Docker.
In my local directory:
c:\users\myname\desktop> docker run -p 27017:27017 -v /dockerdata/mongo -d mongo
I have already share my C drive with the container.
I have a dockerdata/mongo directory in my desktop.
After running the Spring boot example, I should have some data persisted in dockerdata/mongo directory as instructed.
However, my dockerdata/mongo directory is still empty.
I am running out of idea now.
It seems like my mongo data is not persisted in the directory I mounted to.
Thanks in advance.
machines help you to do more, but experience less. Experience this tiny ad: