Persist data in Docker / Move data


#1

I’m using the official dreamfactory docker image.

  • Are there some instructions how to upgrade the image without losing any data?
  • Do you plan integrating some ENV variables to persist data outside the image (currently data is saved to /opt/dreamfactory/app)?
  • How can I port/recreate my docker-container INCLUDING data on another server?

Or do I need to create my own Dockerfile for these?

thx

andy


#2

env vars are now supported, see http://www.devops-blog.net/dreamfactory/using-dreamfactory-2-x-as-rest-api-with-docker aswell as http://blog.dreamfactory.com/scaling-dreamfactory-with-docker


#3

To sum things up about updating:

Simply build a new image from their Dockerfile and make sure its not using the git clone from cache (docker build --no-cache ..). Their Dockerfile points to latest version. (Or pull latest from DockerHub)
Personally, I use a copy of their Dockerfile and added RUN git checkout tags/2.2.0 after the git clone

If you have local app data or local db, you want to make /opt/dreamfactory/storage/app and storage/databases a VOLUME, so you need a custom Dockerfile or make a new one FROM theirs.

Have a look here http://www.devops-blog.net/dreamfactory/orchestrating-dreamfactory-with-docker-compose-and-a-loadbalancer which basically also answers portability as thats a requirement for immutable containers