Struggling understanding how to make it all work
jmorris644 opened this issue · comments
I am very sorry but I am just unable to get this working for me correctly in a windows environment.
I am trying to do two things:
-
Maintain a static file system between boots.
a. I use the command docker run -it -v $HOME/.dockerpi:/sdcard lukechilds/dockerpi
b. to run this without an error I need to remove the ":" from the directory spec.
c. Once the system boots I have created a test file in the pi home directory. I then shut it all down and run the above command again. It does not have my test file in it. I must be missing something very simple. -
I have a custom image that I want to load. I cannot get the syntax properly. Let's say that my image is called test1.img and it is located in the C:/ directory. What would be my syntax for loading that image?
Again, my apologies. I am just not being very successful in my attempts.
Maintain a static file system between boots.
The following command mounts $HOME/.dockerpi
on your host to /sdcard
inside the Docker container.
docker run -it -v $HOME/.dockerpi:/sdcard lukechilds/dockerpi
On Unix-like operating systems $HOME/.dockerpi
will be a hidden folder in your how directory. I'm not sure how to that on Windows but there will be some equivalent. It doesn't even have to be in your home dir, it can be literally anywhere on your filesystem.
I have a custom image that I want to load.
Same as above really. The following command from the readme mounts /2019-09-26-raspbian-buster-lite.img
on your host to /sdcard/filesystem.img
inside the container.
docker run -it -v /2019-09-26-raspbian-buster-lite.img:/sdcard/filesystem.img lukechilds/dockerpi
So if your image is C:/test1.img
then you'd run:
docker run -it -v C:/test1.img:/sdcard/filesystem.img lukechilds/dockerpi
Your issues aren't really related to this project, they're related to how to use Docker volumes on Windows. I'm sorry I'm not really familiar with Windows so I can't be of much more help. Search for "How to mount Docker volumes on Windows" and you should be able to figure it out.