Docker: saving configuration

Forum for questions and support relating to the 1.28.x releases only.
Locked
Ceaus
Posts: 1
Joined: Mon Apr 06, 2015 7:25 pm

Docker: saving configuration

Post 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 :D
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?
cornbread
Posts: 14
Joined: Wed May 08, 2013 12:44 am

Re: Docker: saving configuration

Post 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!
koos
Posts: 6
Joined: Mon Jan 31, 2011 9:10 am

Re: Docker: saving configuration

Post by koos »

Sounds like a plan :-)
Thanks for the advise, I'll see if I can get my setup persisted like this.

Cheers.
aptalca
Posts: 3
Joined: Sat Jun 20, 2015 5:48 pm

Re: Docker: saving configuration

Post 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
Locked