I am new in docker technology.
I want to install zabbix server using docker-compose.yml with only one container and connect it with host machine database(mysql) and also host machine apache2/nginx for zabbix frontend.
Is it possible? Please help.
From the official Zabbix blog tutorial:
Clone the zabbix-docker repository:
git clone https://github.com/zabbix/zabbix-docker.git
cd zabbix-docker
Inside the zabbix-docker
directory:
agent docker-compose_v3_centos_mysql_latest.yaml docker-compose_v3_ol_pgsql_local.yaml kubernetes.yaml snmptraps
agent2 docker-compose_v3_centos_mysql_local.yaml docker-compose_v3_ubuntu_mysql_latest.yaml LICENSE web-apache-mysql
build.sh docker-compose_v3_centos_pgsql_latest.yaml docker-compose_v3_ubuntu_mysql_local.yaml proxy-mysql web-apache-pgsql
docker-compose_v3_alpine_mysql_latest.yaml docker-compose_v3_centos_pgsql_local.yaml docker-compose_v3_ubuntu_pgsql_latest.yaml proxy-sqlite3 web-nginx-mysql
docker-compose_v3_alpine_mysql_local.yaml docker-compose_v3_ol_mysql_latest.yaml docker-compose_v3_ubuntu_pgsql_local.yaml README.md web-nginx-pgsql
docker-compose_v3_alpine_pgsql_latest.yaml docker-compose_v3_ol_mysql_local.yaml generate-stackbrew-library.sh server-mysql web-service
docker-compose_v3_alpine_pgsql_local.yaml docker-compose_v3_ol_pgsql_latest.yaml java-gateway server-pgsql zabbix-appliance
Files ‘docker-compose-v2’ on the left are for an older Docker Compose version. Normally, if you have a fresh installation, you will not need them.
We will be using Docker Compose v3. What is the difference between those files with docker-compose-v3 in their name?
_alpine_
_centos_
_ubuntu_
_mysql_
_pgsql_
_latest.yaml
_local.yaml
Local means that we will be building an image locally from our local Docker files.
Latest means that we will be pulling it from the repository.
Checkout the version of Zabbix you want:
git checkout 5.0
Run one of the docker-compose
files 1:
docker-compose -f docker-compose_v3_alpine_mysql_latest.yaml up -d
1 Checkout the available ports, otherwise the services may fail to start.
Read their turorial for more information.