diff --git a/agent/alpine/docker-entrypoint.sh b/agent/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/agent/alpine/docker-entrypoint.sh +++ b/agent/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/agent/centos/docker-entrypoint.sh b/agent/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/agent/centos/docker-entrypoint.sh +++ b/agent/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/agent/ubuntu/docker-entrypoint.sh b/agent/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/agent/ubuntu/docker-entrypoint.sh +++ b/agent/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/java-gateway/alpine/docker-entrypoint.sh b/java-gateway/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/java-gateway/alpine/docker-entrypoint.sh +++ b/java-gateway/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/java-gateway/centos/docker-entrypoint.sh b/java-gateway/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/java-gateway/centos/docker-entrypoint.sh +++ b/java-gateway/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/java-gateway/ubuntu/docker-entrypoint.sh b/java-gateway/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/java-gateway/ubuntu/docker-entrypoint.sh +++ b/java-gateway/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/proxy-mysql/alpine/docker-entrypoint.sh b/proxy-mysql/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/proxy-mysql/alpine/docker-entrypoint.sh +++ b/proxy-mysql/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/proxy-mysql/centos/docker-entrypoint.sh b/proxy-mysql/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/proxy-mysql/centos/docker-entrypoint.sh +++ b/proxy-mysql/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/proxy-mysql/ubuntu/docker-entrypoint.sh b/proxy-mysql/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/proxy-mysql/ubuntu/docker-entrypoint.sh +++ b/proxy-mysql/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/proxy-sqlite3/alpine/docker-entrypoint.sh b/proxy-sqlite3/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/proxy-sqlite3/alpine/docker-entrypoint.sh +++ b/proxy-sqlite3/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/proxy-sqlite3/centos/docker-entrypoint.sh b/proxy-sqlite3/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/proxy-sqlite3/centos/docker-entrypoint.sh +++ b/proxy-sqlite3/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/proxy-sqlite3/ubuntu/docker-entrypoint.sh b/proxy-sqlite3/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/proxy-sqlite3/ubuntu/docker-entrypoint.sh +++ b/proxy-sqlite3/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/server-mysql/alpine/docker-entrypoint.sh b/server-mysql/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/server-mysql/alpine/docker-entrypoint.sh +++ b/server-mysql/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/server-mysql/centos/docker-entrypoint.sh b/server-mysql/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/server-mysql/centos/docker-entrypoint.sh +++ b/server-mysql/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/server-mysql/ubuntu/docker-entrypoint.sh b/server-mysql/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/server-mysql/ubuntu/docker-entrypoint.sh +++ b/server-mysql/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/server-pgsql/alpine/docker-entrypoint.sh b/server-pgsql/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/server-pgsql/alpine/docker-entrypoint.sh +++ b/server-pgsql/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/server-pgsql/centos/docker-entrypoint.sh b/server-pgsql/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/server-pgsql/centos/docker-entrypoint.sh +++ b/server-pgsql/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/server-pgsql/ubuntu/docker-entrypoint.sh b/server-pgsql/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/server-pgsql/ubuntu/docker-entrypoint.sh +++ b/server-pgsql/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-apache-mysql/alpine/docker-entrypoint.sh b/web-apache-mysql/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-apache-mysql/alpine/docker-entrypoint.sh +++ b/web-apache-mysql/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-apache-mysql/centos/docker-entrypoint.sh b/web-apache-mysql/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-apache-mysql/centos/docker-entrypoint.sh +++ b/web-apache-mysql/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-apache-mysql/ubuntu/docker-entrypoint.sh b/web-apache-mysql/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-apache-mysql/ubuntu/docker-entrypoint.sh +++ b/web-apache-mysql/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-apache-pgsql/alpine/docker-entrypoint.sh b/web-apache-pgsql/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-apache-pgsql/alpine/docker-entrypoint.sh +++ b/web-apache-pgsql/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-apache-pgsql/centos/docker-entrypoint.sh b/web-apache-pgsql/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-apache-pgsql/centos/docker-entrypoint.sh +++ b/web-apache-pgsql/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-apache-pgsql/ubuntu/docker-entrypoint.sh b/web-apache-pgsql/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-apache-pgsql/ubuntu/docker-entrypoint.sh +++ b/web-apache-pgsql/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-nginx-mysql/alpine/docker-entrypoint.sh b/web-nginx-mysql/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-nginx-mysql/alpine/docker-entrypoint.sh +++ b/web-nginx-mysql/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-nginx-mysql/centos/docker-entrypoint.sh b/web-nginx-mysql/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/web-nginx-mysql/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-nginx-mysql/ubuntu/docker-entrypoint.sh b/web-nginx-mysql/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-nginx-pgsql/alpine/docker-entrypoint.sh b/web-nginx-pgsql/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-nginx-pgsql/alpine/docker-entrypoint.sh +++ b/web-nginx-pgsql/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-nginx-pgsql/centos/docker-entrypoint.sh b/web-nginx-pgsql/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-nginx-pgsql/centos/docker-entrypoint.sh +++ b/web-nginx-pgsql/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/web-nginx-pgsql/ubuntu/docker-entrypoint.sh b/web-nginx-pgsql/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/zabbix-appliance/alpine/Dockerfile b/zabbix-appliance/alpine/Dockerfile index 46cdd29a8..aa91258c3 100644 --- a/zabbix-appliance/alpine/Dockerfile +++ b/zabbix-appliance/alpine/Dockerfile @@ -181,6 +181,7 @@ WORKDIR /var/lib/zabbix VOLUME ["/etc/ssl/nginx"] VOLUME ["/usr/lib/zabbix/alertscripts", "/usr/lib/zabbix/externalscripts", "/var/lib/zabbix/enc", "/var/lib/zabbix/mibs", "/var/lib/zabbix/modules"] VOLUME ["/var/lib/zabbix/snmptraps", "/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbix/ssl/keys", "/var/lib/zabbix/ssl/ssl_ca"] +VOLUME ["/var/lib/mysql/"] COPY ["conf/etc/supervisor/", "/etc/supervisor/"] COPY ["conf/etc/zabbix/nginx.conf", "/etc/zabbix/"] diff --git a/zabbix-appliance/alpine/docker-entrypoint.sh b/zabbix-appliance/alpine/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/zabbix-appliance/alpine/docker-entrypoint.sh +++ b/zabbix-appliance/alpine/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/zabbix-appliance/centos/Dockerfile b/zabbix-appliance/centos/Dockerfile index 06ae7d991..3863ff8cb 100644 --- a/zabbix-appliance/centos/Dockerfile +++ b/zabbix-appliance/centos/Dockerfile @@ -181,6 +181,7 @@ WORKDIR /var/lib/zabbix VOLUME ["/etc/ssl/nginx"] VOLUME ["/usr/lib/zabbix/alertscripts", "/usr/lib/zabbix/externalscripts", "/var/lib/zabbix/enc", "/var/lib/zabbix/mibs", "/var/lib/zabbix/modules"] VOLUME ["/var/lib/zabbix/snmptraps", "/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbix/ssl/keys", "/var/lib/zabbix/ssl/ssl_ca"] +VOLUME ["/var/lib/mysql/"] COPY ["conf/etc/supervisor/", "/etc/supervisor/"] COPY ["conf/etc/zabbix/nginx.conf", "/etc/zabbix/"] diff --git a/zabbix-appliance/centos/docker-entrypoint.sh b/zabbix-appliance/centos/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/zabbix-appliance/centos/docker-entrypoint.sh +++ b/zabbix-appliance/centos/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/zabbix-appliance/rhel/Dockerfile b/zabbix-appliance/rhel/Dockerfile index deb6d9b87..bacd14d6a 100644 --- a/zabbix-appliance/rhel/Dockerfile +++ b/zabbix-appliance/rhel/Dockerfile @@ -207,6 +207,7 @@ WORKDIR /var/lib/zabbix VOLUME ["/etc/ssl/nginx"] VOLUME ["/usr/lib/zabbix/alertscripts", "/usr/lib/zabbix/externalscripts", "/var/lib/zabbix/enc", "/var/lib/zabbix/mibs", "/var/lib/zabbix/modules"] VOLUME ["/var/lib/zabbix/snmptraps", "/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbix/ssl/keys", "/var/lib/zabbix/ssl/ssl_ca"] +VOLUME ["/var/lib/mysql/"] COPY ["conf/etc/supervisor/", "/etc/supervisor/"] COPY ["conf/etc/zabbix/nginx.conf", "/etc/zabbix/"] diff --git a/zabbix-appliance/rhel/docker-entrypoint.sh b/zabbix-appliance/rhel/docker-entrypoint.sh index e1bc06889..e2e521c10 100755 --- a/zabbix-appliance/rhel/docker-entrypoint.sh +++ b/zabbix-appliance/rhel/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR" diff --git a/zabbix-appliance/ubuntu/Dockerfile b/zabbix-appliance/ubuntu/Dockerfile index 312f184fa..d8e92ffd4 100644 --- a/zabbix-appliance/ubuntu/Dockerfile +++ b/zabbix-appliance/ubuntu/Dockerfile @@ -211,6 +211,7 @@ WORKDIR /var/lib/zabbix VOLUME ["/etc/ssl/nginx"] VOLUME ["/usr/lib/zabbix/alertscripts", "/usr/lib/zabbix/externalscripts", "/var/lib/zabbix/enc", "/var/lib/zabbix/mibs", "/var/lib/zabbix/modules"] VOLUME ["/var/lib/zabbix/snmptraps", "/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbix/ssl/keys", "/var/lib/zabbix/ssl/ssl_ca"] +VOLUME ["/var/lib/mysql/"] COPY ["conf/etc/supervisor/", "/etc/supervisor/"] COPY ["conf/etc/zabbix/nginx.conf", "/etc/zabbix/"] diff --git a/zabbix-appliance/ubuntu/docker-entrypoint.sh b/zabbix-appliance/ubuntu/docker-entrypoint.sh index 65fd9e869..e8e0809f7 100755 --- a/zabbix-appliance/ubuntu/docker-entrypoint.sh +++ b/zabbix-appliance/ubuntu/docker-entrypoint.sh @@ -75,7 +75,7 @@ configure_db_mysql() { chown -R mysql:mysql "$MYSQL_DATA_DIR" echo "** Installing initial MySQL database schemas" - mysql_install_db --user=mysql 2>&1 1>/dev/null + mysql_install_db --user=mysql --datadir="$MYSQL_DATA_DIR" 2>&1 else echo "**** MySQL data directory is not empty. Using already existing installation." chown -R mysql:mysql "$MYSQL_DATA_DIR"