Public Repository

Last pushed: 3 years ago
Short Description
Docker image for ZPanelCP v10.1.3
Full Description

Pull image

docker pull infoglans/zpanelcp:10.1.3

To start container in shell, run

docker run -it infoglans/zpanelcp:10.1.3

To start ZPanelCP, there are few options needs to be specified

  • Bind mysql data directory to host: -v /data/mysql:/var/lib/mysql
  • Bind www directory to host: -v /data/www:/var/zpanel/hostdata
  • Publishing ports: -p 80:80 -p 21:21 -p 25:25 -p 2222:2222

Port 2222 is of SSH. Default root password is 5Lqa#FYf. Please kindly change the password

Specify this environment variables to docker to set passwords

  • zadminNewPass: ZPanel Admin password
  • postfixpassword: Postfix Mysql password
  • mysqlPassword: MySQL root password
  • externalIp: The host's external IP. It's needed for FTP passive mode. If It's not given the container will try to determine automatically.

To FTP work properly, you need to forward passive ports to container using the following command as docker does not support publishing the port range

iptables -t nat -I PREROUTING -p tcp --dport 60000:62000 -j DNAT --to CONTAINER_IP:60000-62000

Everything together,

docker run --name=zpanelcp \
    -v /data/mysql:/var/lib/mysql \
    -v /data/www:/var/zpanel/hostdata \
    -p 80:80 -p 21:21 -p 25:25 -p 2222:2222 -p 443:443 -p 20:20 -p 110 -p 143 -p 3306:3306 \
    -e zadminNewPass='abc123' \
    -e postfixpassword='xyz123' \
    -e mysqlPassword='pqr456' \
    infoglans/zpanelcp:10.1.3 bash /opt/

Container id

docker ps

Login to container

docker exec -it [container-id] bash

Docker Pull Command