A Zimbra Docker image, based in ZCS 8.8.9 and CentOS 7.
10K+
In this Repository you will find how to install Zimbra on Docker
Keep posted of the changes in the next Zimbra Wiki - https://wiki.zimbra.com/wiki/Deploy_Zimbra_Collaboration_using_docker
Depend of your OS, you need to install Docker in different ways, take a look into the official Website - https://docs.docker.com/engine/installation/
One of the advantages of using docker is that the host OS does not matter, the containers will work on any platform.
The first step is to pull this image into your docker environment, for that just run the next:
docker pull busybox42/zimbra-docker-centos
Now that we have an image called busybox42/zimbra-docker-centos we can do a docker run with some special parameters, like this:
docker run -p 25:25 -p 80:80 -p 465:465 -p 587:587 -p 110:110 -p 143:143 -p 993:993 -p 995:995 -p 443:443 -p 8080:8080 -p 8443:8443 -p 7071:7071 -p 9071:9071 -h zimbra-docker.zimbra.io --dns 127.0.0.1 --dns 8.8.8.8 -i -t -e PASSWORD=Zimbra2017 busybox42/zimbra-docker-centos
As you can see we tell the container the ports we want to expose, and on which port, we also specify the container hostname, the password foir the Zimbra Administrator Account, and the image to use.
That's it! You can visit now the IP of your Docker Machine using HTTPS, or try the Admin Console with HTTPS and port 7071.
If you like to contribute to the project, you are free to do so, just fork this repo and submit your changes.
The content of the Dockerfile and the start.sh is based on the next Script - ZimbraEasyInstall. The Dockerfile creates a CentOS 7 image and install on it all the OS dependencies which Zimbra needs, when the container is launched, automatically starts with the start.sh script which creates an autoconfig file which is injected during the zimbra Installation.
Download from github, you will need git installed on your OS
git clone https://github.com/busybox42/zimbra-docker-centos.git
For those who want to use wget, follow the next instructions to download the Zimbra-docker package. You might need wget and unzip installed on your OS
wget https://github.com/busybox42/zimbra-docker-centos/archive/master.zip
unzip master.zip
The Makefile in the docker/ directory provides you with a convenient way to build your docker image. You will need make on your OS. Just run
cd zimbra-docker-centos/docker
sudo make
The default image name is zimbra_docker.
Now, to deploy the container based on the previous image. As well as publish the Zimbra Collaboration ports, the hostname and the proper DNS, as you want to use bind as a local DNS nameserver within the container, also we will send the password that we want to our Zimbra Server like admin password, mailbox, LDAP, etc.: Syntax:
docker run -p PORTS -h HOSTNAME.DOMAIN --dns DNSSERVER -i -t -e PASSWORD=YOURPASSWORD NAMEOFDOCKERIMAGE
Example:
docker run -p 25:25 -p 80:80 -p 465:465 -p 587:587 -p 110:110 -p 143:143 -p 993:993 -p 995:995 -p 443:443 -p 8080:8080 -p 8443:8443 -p 7071:7071 -p 9071:9071 -h zimbra-docker.zimbra.io --dns 127.0.0.1 --dns 8.8.8.8 -i -t -e PASSWORD=Zimbra2017 zimbra_docker_centos
Depending out your limits settings you may need to add a --ulimits option. Example:
docker run -p 25:25 -p 80:80 -p 465:465 -p 587:587 -p 110:110 -p 143:143 -p 993:993 -p 995:995 -p 443:443 -p 8080:8080 -p 8443:8443 -p 7071:7071 -p 9071:9071 -h zimbra-docker.zimbra.io --dns 127.0.0.1 --dns 8.8.8.8 -i -t -e PASSWORD=Zimbra2017 --ulimit nofile=524288:524288 zimbra_docker_centos
This will create the container in few seconds, and run automatically the start.sh:
The script takes a few minutes, dependent on the your Internet Speed, and resources.
After the Zimbra automated installation, if you close or quit the bash console from the container, the docker container might exit and keep in stopped state, you just need to run the next commands to start your Zimbra Container:
docker ps -a
docker start YOURCONTAINERID
docker exec -it YOURCONTAINERID bash
su - zimbra
zmcontrol restart
Content type
Image
Digest
Size
128.1 MB
Last updated
over 6 years ago
docker pull busybox42/zimbra-docker-centos