I just started a django project with docker, I used the cookiecutter-django template that is discussed in the book Two scoops of django.
I am trying to set it all up in OSX, but I am having some trouble with the following part from the documentation:
Saving changes
If you are using OS X or Windows, you need to create a /data partition inside the virtual machine that runs the docker deamon in order make all changes persistent. If you don’t do that your /data directory will get wiped out on every reboot. To create a persistent folder, log into the virtual machine by running:
$ docker-machine ssh dev1
$ sudo su
$ echo 'ln -sfn /mnt/sda1/data /data' >> /var/lib/boot2docker/bootlocal.sh
However, if I execute these commands, and try to start my docker project, I get the following error:
ERROR: Cannot start container 182a38022fbdf65f7a64f1ca5475a3414084d11c91f1cb48bffc6f76491baf4a: mkdir /data: file exists
I'm quite stuck at this point, do you guys have an idea what I could do to get this up and running?
So in the end this was fixed by making the directory in the local machine. I did that with the following code when adding the line to the bootlocal.sh file:
$ mkdir /mnt/sda1/data
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments