Page 1 of 1
Docker: saving configuration
Posted: Mon Apr 06, 2015 7:34 pm
by Ceaus
Hi,
All brand new to docker I am trying the "kylejohnson/zoneminder" image. From knowing nothing about docker to running ZoneMinder in just two days. Not bad
But the caveat: Everytime I stop the container my camera configuration is gone. Reading the Docker website there is a vehicle called data volume to persist data. But that approach seems a bit awkward for ZoneMinder.
What is the best way to persist the ZoneMinder config inside a docker container?
Re: Docker: saving configuration
Posted: Sun Apr 12, 2015 3:40 am
by cornbread
well if your docker fails everything will be gone just FYI if you don't pass in your configs. if you need to commit changes you've made inside of a docker do the following:
run: sudo docker ps
this will output something like this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e430db294535 hrwebasst/zoneminder:latest "/sbin/my_init" 6 days ago Up 3 days 0.0.0.0:80->80/tcp zoneminder2
in my example hrwebasst/zoneminder is the image you want to commit to and the container ID is e430db294535
you want to commit the id to the image like so:
sudo docker commit e430db294535 hrwebasst/zoneminder
whala!
Re: Docker: saving configuration
Posted: Fri Apr 17, 2015 2:22 pm
by koos
Sounds like a plan
Thanks for the advise, I'll see if I can get my setup persisted like this.
Cheers.
Re: Docker: saving configuration
Posted: Sat Jun 20, 2015 5:54 pm
by aptalca
Hi guys,
I created a docker container for zoneminder that actually saves all the data outside of the container in a folder of your choice. So when you update or reinstall or move the container, all data is preserved. It also includes mysql so you don't have to worry about setting it up separately. Run command is listed in the readme. Just change the folder location (/path/to/config variable) and set it to whatever port you want and you should be good.
As a new user I cannot post a link, but if you go to docker and search for aptalca/docker-zoneminder it should come up