Skip to content

Commit

Permalink
Move zimbra_all Dockerfile to subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanta committed Jul 1, 2021
1 parent 7ffafb4 commit 8d4e662
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
opt/zimbra-install/zcs-9.0.0_OSE_RHEL8_latest-zextras.tgz
zimbra_all/opt/zimbra-install/zcs-9.0.0_OSE_RHEL8_latest-zextras.tgz
9 changes: 6 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
### Zimra-docker ChangeLog

##### v0.1/v0.2 - the initial version:
+ Build a Docker image
+ Run a new Zimbra docker container
##### v0.4
+ Move zimbra_all to subfolder for the next (multi-server) images

##### v0.3
+ Add docker-compose capacibility (thanks to Vo Trung Huy aka. [huyrevison2010](https://github.com/huyrevison2010))

##### v0.1/v0.2 - the initial version:
+ Build a Docker image
+ Run a new Zimbra docker container
42 changes: 1 addition & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
# zimbra-docker
The project to build a Zimbra 9 (built by Zextras) Docker image based on Rocky Linux 8.

Check out the built image on Docker Hub: https://hub.docker.com/r/iwayvietnam/zimbra_all
Check out the prebuilt image on Docker Hub: https://hub.docker.com/r/iwayvietnam/zimbra_all

### How to build a new Docker image
##### Firstly, of course, install Docker and setup to manage Docker as a non-root user
See: https://docs.docker.com/engine/install/

##### Pull the latest Rocky Linux based docker image
```bash
$ docker pull rockylinux/rockylinux
```
##### Checkout this git repo
```bash
* $ git clone https://github.com/iwayvietnam/zimbra-docker.git && cd zimbra-docker
```
##### Download the latest Zimbra 9 (built by Zextras)
```bash
$ wget -O opt/zimbra-install/zcs-9.0.0_OSE_RHEL8_latest-zextras.tgz \
https://download.zextras.com/zcs-9.0.0_OSE_RHEL8_latest-zextras.tgz
```
##### Build Zimbra a new docker image
```bash
$ docker build --rm -t zimbra_all .
```
### How to start a new Zimbra container from prebuilt Docker image
##### Create a new Docker network dedicated for Zimbra
```bash
Expand Down Expand Up @@ -55,25 +34,6 @@ $ docker run --name zimbra-iwaytest2 -it \
-e PASSWORD=Zimbra2021 iwayvietnam/zimbra_all
```
(and WAIT...)
### How to start with Docker compose
##### Require : Install docker-compose for your server
##### Create storage for docker-compose
```bash
$ cd docker-compose && mkdir zimbra-storage
```
##### Run docker-compose
```bash
$ docker-compose up -d
```
##### Command check status
```bash
$ docker-compose status
```
##### Command check logs
```bash
$ docker-compose logs -f
```
(and WAIT...)

### LICENSE
This work is released under GNU General Public License v3 or above.
19 changes: 19 additions & 0 deletions docker-compose/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### How to start with Docker compose
##### Require : Install docker-compose for your server
##### Create storage for docker-compose
```bash
$ cd docker-compose && mkdir zimbra-storage
```
##### Run docker-compose
```bash
$ docker-compose up -d
```
##### Command check status
```bash
$ docker-compose status
```
##### Command check logs
```bash
$ docker-compose logs -f
```
(and WAIT...)
44 changes: 44 additions & 0 deletions zimbra_all/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#<one line to give the program's name and a brief idea of what it does.>
# Copyright (C) 2021 iWayVietnam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

#################################################################
# Dockerfile to build Zimbra 9 (built by Zextras) container images
# Based on Rocky Linux 8
#################################################################
FROM rockylinux/rockylinux
MAINTAINER Truong Anh Tuan <[email protected]>

RUN yum -y update && yum -y install \
perl \
glibc-langpack-en \
net-tools \
openssh-clients \
bind-utils \
rsyslog \
wget

RUN ln -s -f /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime

ENV LANGUAGE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

VOLUME ["/opt/zimbra"]

EXPOSE 25 80 465 587 110 143 993 995 443 3443 9071

COPY opt /opt/

CMD ["/bin/bash", "/opt/build.sh", "-d"]
21 changes: 21 additions & 0 deletions zimbra_all/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### How to build a new Docker image
##### Firstly, of course, install Docker and setup to manage Docker as a non-root user
See: https://docs.docker.com/engine/install/

##### Pull the latest Rocky Linux based docker image
```bash
$ docker pull rockylinux/rockylinux
```
##### Checkout this git repo
```bash
* $ git clone https://github.com/iwayvietnam/zimbra-docker.git && cd zimbra-docker/zimbra_all
```
##### Download the latest Zimbra 9 (built by Zextras)
```bash
$ wget -O opt/zimbra-install/zcs-9.0.0_OSE_RHEL8_latest-zextras.tgz \
https://download.zextras.com/zcs-9.0.0_OSE_RHEL8_latest-zextras.tgz
```
##### Build Zimbra a new docker image
```bash
$ docker build --rm -t iwayvietnam/zimbra_all .
```
4 changes: 3 additions & 1 deletion opt/build.sh → zimbra_all/opt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ echo "Installing Zimbra Collaboration injecting the configuration"
/opt/zimbra/libexec/zmsetup.pl -c /opt/zimbra-install/installParameters

su - zimbra -c 'zmcontrol restart'
echo "You can access now to your Zimbra Collaboration Server"
echo "You can access now to your Zimbra Collaboration Server $HOSTNAME.$DOMAIN"

rm -Rf /opt/zimbra-install

if [[ $1 == "-d" ]]; then
while true; do sleep 1000; done
Expand Down
File renamed without changes.

0 comments on commit 8d4e662

Please sign in to comment.