-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathDockerfile
38 lines (28 loc) · 1.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Uncomment the distro that you wish to build for
#ARG RELEASE=almalinux:8.10
#ARG RELEASE=oraclelinux:8.10
#ARG RELEASE=rockylinux/rockylinux:8.10
#ARG RELEASE=rockylinux/rockylinux:9.4
ARG RELEASE=ubuntu:20.04
#ARG RELEASE=ubuntu:22.04
# DO NOT EDIT BELOW THIS LINE
# Let's build for the version set above
FROM $RELEASE
# Install some necessary dependencies
RUN if [ -f "/usr/bin/apt-get" ]; then apt-get update && apt-get -y install git lsb-release; fi
RUN if [ -f "/usr/bin/dnf" ]; then dnf -y install dnf-plugins-core git redhat-lsb-core; fi
# Clone Zimbra Build Scripts
RUN git clone https://github.com/ianw1974/zimbra-build-scripts /home/git/zimbra-build-scripts
WORKDIR /home/git/zimbra-build-scripts
# Set Zimbra build version
#RUN cp config.build.9 config.build
# Remove sudo from build script
RUN sed -i 's/sudo\ //g' ./zimbra-build-helper.sh
# Install and pre-configure timezone (needed on Ubuntu 20.04)
RUN if [ -f "/usr/bin/apt-get" ]; then DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata ; fi
# Install dependencies
RUN ./zimbra-build-helper.sh --install-deps
# Volume to retrieve builds
VOLUME /home/git/zimbra/BUILDS/
# Build Zimbra
ENTRYPOINT ["/home/git/zimbra-build-scripts/zimbra-build-helper.sh", "--build-zimbra"]