Hi
Nice to see that we have docker. Can anyone help please.
I use zoneminder in virtualbox at the moment and want to use it in a container. I found some instructions and pulled the files and tried to get it to work. It looks like its not connecting to SQL. I've fanny around changing settings and didn't get anywhere. Can someone give me the settings that this requires. These are the instruction I found, I didn't install docker but used the new docker GUI.
Great work guys
== Real Introduction ==
Docker is amazing, with this you will set up two different "containers" (you can think of these as chroots on steroids or VMs without the VM )
So why docker? Well did you want to deal with dependency issues or weird setup problems? Or did you want to deploy without an internet connection, or possibly download an exact working image at work/home then deploy off-site without internet? '''No problem'''
= Install Docker =
You can get full instructions [https://docs.docker.com/installation/ here] or this command should work for you.
wget -qO- https://get.docker.com/ | sh
= Quick and dirty ZM 1.28.x install =
sudo docker run -d -e MYSQL_ROOT_PASSWORD=uberpass -e MYSQL_DATABASE=zm -e MYSQL_USER=zm -e MYSQL_PASSWORD=my-secret-pass --name=zm-mysql mysql
sudo docker run -d --name=zoneminder --link=zm-mysql:mysql -p 443:443 --privileged=true hrwebasst/docker-zoneminder
'''How hard was that? Now you can browse to https://SERVER/zm'''
Notice that we don't need to give the zoneminder docker any information as the ENV vars are passed to it through the link.
= Advanced information =
In those above two commands the Environment Vars with the '-e' flag are creating database and connecting with those so you can modify them to your hearts content before running the commands.
Here is how I run the servers:
sudo docker run -d --restart=always --name=mysql -v /var/local/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=uberpass -e MYSQL_DATABASE=zm -e MYSQL_USER=zm -e MYSQL_PASSWORD=uberpass mysql
sudo docker run -d --restart=always --name=zoneminder -v /var/local/zm/images:/usr/share/zoneminder/images -v /var/local/zm/events:/usr/share/zoneminder/events --link=mysql:mysql -p 443:443 --privileged=true hrwebasst/docker-zoneminder
We've now passed a few folders into the containers and told them to always restart. The -v flags pass in local directories to destination folders in the containers. We are also telling them to always restart.