Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

Can't run zabbix after container stop/commit #29

Open
ghost opened this issue May 31, 2016 · 3 comments
Open

Can't run zabbix after container stop/commit #29

ghost opened this issue May 31, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented May 31, 2016

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.

@Franselbaer
Copy link

Franselbaer commented Oct 31, 2016

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)

@ghost
Copy link
Author

ghost commented Nov 10, 2016

@Franselbaer Thanks!

@Someone234
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants