Hello everyone,
I’m running into a deployment issue here I’m hoping someone can help me out with.
I have Docker CE running on an Oracle Linux host and I want to deploy Zabbix using containers, but want the web interface container to listen on an IP address that is separate from the Docker host. I successfully created all containers to run a Zabbix instance and verified it all works and is listening on the correct ports, except the web interface runs on the Docker host itself.
[xxxxx@xxxxx ~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b9ea89cc0e60 zabbix/zabbix-web-apache-pgsql:latest "docker-entrypoint.s…" 3 seconds ago Up 2 seconds 0.0.0.0:80->8080/tcp, [::]:80->8080/tcp, 0.0.0.0:443->8443/tcp, [::]:443->8443/tcp zabbix-web-apache-pgsql
f478b651cd5f zabbix/zabbix-server-pgsql:latest "/usr/bin/docker-ent…" 7 days ago Up 4 hours 0.0.0.0:10051->10051/tcp, :::10051->10051/tcp zabbix-server-pgsql
72a7fe9b3241 postgres:latest "docker-entrypoint.s…" 7 days ago Up 4 hours 5432/tcp postgres-server
e3fa517b5ed7 portainer/portainer-ce:latest "/portainer" 3 months ago Up 4 hours 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp, 9000/tcp portainer
[xxxxx@xxxxx ~]$
So, I created a ipvlan network using the following command:
docker network create -d ipvlan --subnet=xxx.xxx.xxx.xxx/19 --gateway=xxx.xxx.xxx.xxx -o parent=eno4 ipvlan-network
And then I started the web interface container using the following command, specifying the IP address on the ipvlan network that I want it to use:
docker run --name zabbix-web-apache-pgsql -t -e ZBX_SERVER_HOST="zabbix-server-pgsql" -e DB_SERVER_HOST="postgres-server" -e POSTGRES_USER="xxxxx" -e POSTGRES_PASSWORD="xxxxx" -e POSTGRES_DB="zabbix" --network=ipvlan-network --ip xxx.xxx.xxx.xxx -p 443:8443 -p 80:8080 -v /etc/ssl/apache2:/etc/ssl/apache2:ro --restart unless-stopped -d zabbix/zabbix-web-apache-pgsql:latest
The container starts successfully, but there aren’t any ports listed.
[xxxxx@xxxxx ~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
199cef922cc3 zabbix/zabbix-web-apache-pgsql:latest "docker-entrypoint.s…" 10 seconds ago Up 9 seconds zabbix-web-apache-pgsql
f478b651cd5f zabbix/zabbix-server-pgsql:latest "/usr/bin/docker-ent…" 7 days ago Up 4 hours 0.0.0.0:10051->10051/tcp, :::10051->10051/tcp zabbix-server-pgsql
72a7fe9b3241 postgres:latest "docker-entrypoint.s…" 7 days ago Up 4 hours 5432/tcp postgres-server
e3fa517b5ed7 portainer/portainer-ce:latest "/portainer" 3 months ago Up 4 hours 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp, 9000/tcp portainer
[xxxxx@xxxxx ~]$
Not only that, I can’t access the web interface using the IP address that I assigned to the container. It doesn’t appear to be listening at all.
Can anyone please give me some pointers?