ZM 1.33 with Docker Complete Wipe

Forum for questions and support relating to 1.33.x development only.
Post Reply
Posts: 3
Joined: Sun Aug 11, 2019 9:28 pm

ZM 1.33 with Docker Complete Wipe

Post by ccody73 » Fri Sep 20, 2019 9:23 pm

Okay, I have completely bungled my Zoneminder (with Docker) install.
I am trying to wipe everything out and start over.
The mysql container (zm_db) seems to have other ideas.
I started (and then restarted with
.... and things got screwed up (my fault).
Well, this is a container. I "should" be able to remove the container, reboot, and start over cleanly.

This is not the case.
The reinstall of the Zoneminder db works fine, but there is something that is "stuck" about the mysql
The Docker Command to install the MySql Server and database Container:
sudo docker run -d --name zm_db --restart always -e TZ=America/Chicago \
-e MYSQL_USER=zmuser \
-e MYSQL_PASSWORD=zmpass \
-e MYSQL_ROOT_PASSWORD=mysqlpasswd \
--net net mysql/mysql-server:5.7

Then the reinstall for the Zoneminder Docker Container:

sudo docker run -d --name zm --restart always --shm-size 4096m \
-e TZ=America/Chicago -e ZM_DB_HOST=zm_db \
--net net -p 9080:80 quantumobject/docker-zoneminder

Previously, it at least got it installed and running.
Now I get a "healthy" zm_db" and Zoneminder will not start:

Starting pre-service scritps in /etc/my_init.d
*** Running: /etc/my_init.d/
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'' (using password: YES)
*** Failed with return value: 1

I do not seem to be able to access (or even find) mysql except for running a Console in Portainer.IO.
However it ignores all attempts to login (e.g. mysql -u zmuser -p zmpass)

What do I need to do?
I feel like I am at the point where I need to format the drive and start over with a OS reinstall

OS: CentOS Linux release 7.7.1908 (Core)

User avatar
Posts: 334
Joined: Sat May 21, 2016 2:20 am

Re: ZM 1.33 with Docker Complete Wipe

Post by snake » Sat Sep 21, 2019 2:29 pm

First off, I recommend docker-compose. Second, there is an official ZM docker in the git (utils?), no need to build from scratch. You might have to edit it for 1.33, but I think it's in the PPA, so doable.

Are you sure it's actually being deleted?

Some basic commands would suit you.
docker ps - list active sessions
docker kill - close session
docker rmi - remove underlying container

Docker works in such a way that it's not likely for something to get stuck. If you only kill session & remove the image, you should be able to start over from scratch.

This is basic Docker usage, so I would advise you pick up a book on the subject.

User avatar
Posts: 53
Joined: Sat Aug 25, 2018 3:24 pm
Location: Sri Lanka

Re: ZM 1.33 with Docker Complete Wipe

Post by bkjaya1952 » Fri Jan 17, 2020 3:18 pm

You can see the running containers by

sudo docker ps

You can see the docker images by

sudo docker images

If you want to delete the containers zm_db and zm

On the Terminal run

sudo docker rm zm_db zm

( If the containers are in running mode , you will have to stop those before deleting by the command

sudo docker stop zm_db zm )

Then ,If you want to remove the images also

sudo rmi mysql/mysql-server:5.7

sudo rmi quantumobject/docker-zoneminder

If you want to purge docker

sudo apt purge -y docker-engine docker docker-ce

sudo apt autoremove -y --purge docker-engine docker docker-ce

sudo rm -rf /var/lib/docker /etc/docker

sudo rm /etc/apparmor.d/docker

sudo groupdel docker

sudo rm -rf /var/run/docker.sock

If you install the docker zoneminder image mentioned in the link below , you don't have to have a separate container for mysql.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests