docker-zabbix icon indicating copy to clipboard operation
docker-zabbix copied to clipboard

Can't run zabbix after container stop/commit

Open ghost opened this issue 9 years ago • 3 comments

When i configure zabbix, i stop a container and commit it. Then i can't run zabbix anymore. I thought the problem was in mysql_secure_installation script, because it runs anytime when i'm tring to start or restart mysql. Anyway, after run mysql_secure_installation script i've changed a credentials for mysql root password and added it to /bin/docker-zabbix script. Anyway after commiting a container mysql doesn't contain zabbix database. It just dissapear. Can't find a solution.

ghost avatar May 31 '16 09:05 ghost

Just comment the volumes out:

VOLUME ["/var/lib/mysql", "/usr/lib/zabbix/alertscripts", "/usr/lib/zabbix/externalscripts", "/etc/zabbix/zabbix_agentd.d"]

change to

#VOLUME ["/var/lib/mysql", "/usr/lib/zabbix/alertscripts", "/usr/lib/zabbix/externalscripts", "/etc/zabbix/zabbix_agentd.d"]

The usage of "volumes" causing the database is stored outsite of the container in a temporary folder on the host. If you commit and start a new folder is created on the host (its a folder with an dynamic id number).

If you comment this out the whole db is stored within the container. If you commit or save or export the db is stored within...

(not tested yet)

Franselbaer avatar Oct 31 '16 21:10 Franselbaer

@Franselbaer Thanks!

ghost avatar Nov 10 '16 08:11 ghost

@Franselbaer In which file could find the "[VOLUME......"?

Someone234 avatar Apr 20 '17 03:04 Someone234