Saving changes in docker project

hY8vVpf3tyR57Xib

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?

hY8vVpf3tyR57Xib

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

EPPlus not saving changes to worksheet

From Dev

Saving commit changes in shell

From Dev

Datagridview not saving changes to Database

From Dev

DataSet Saving Changes

From Dev

Saving all changes in activity

From Dev

Saving changes in Developer Tools is not working

From Dev

exporting jar with eclipse not saving changes?

From Dev

Saving changes of folder on Java ArrayLists

From Dev

Updating entity, all changes not saving

From Dev

Saving a url that changes as a javascript variable?

From Dev

Eclipse - Showing changes before saving

From Dev

CImg saving images changes values?

From Dev

Chef Knife not saving changes with editor

From Dev

DbContext not saving changes it shows it has

From Dev

Changes to a Merged CSV file not saving

From Dev

Close an object without saving changes

From Dev

KDE Plasma Panel Changes not Saving

From Dev

Entity Framework 6 not saving changes

From Dev

Manipulating a pandas dataframe then saving the changes

From Dev

Docker commit not saving files

From Dev

Saving docker container image

From Dev

Saving a django project in OSX Mavericks

From Dev

Saving a data stream in a django project

From Dev

Unity project changes not in executable

From Dev

Get project element code when saving project

From Dev

Detect changes when saving Laravel 4: Eloquent

From Dev

Determine if saving NSManagedObjectContext will result in changes to persistent store

From Dev

"git commit --amend -c <commit>" not saving changes

From Dev

Rspec/FactoryGirl: changes in factory not saving in test database?