-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
110 lines (79 loc) · 3.55 KB
/
Dockerfile
File metadata and controls
110 lines (79 loc) · 3.55 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Image intermesh/groupoffice
# To build test image:
# Disable build kit to make docker compose use the local image
# DOCKER_BUILDKIT=0 && docker buildx build --load . -t intermesh/groupoffice:local
# DOCKER_BUILDKIT=0 && docker compose build serviceusingtesting
FROM php:8.4-apache
ENV MYSQL_USER=groupoffice
ENV MYSQL_DATABASE=groupoffice
ENV MYSQL_HOST=db
EXPOSE 80
EXPOSE 443
ARG DEBIAN_FRONTEND=noninteractive
# Install PHP build deps, Filesearch utils and mariadb-client is needed for mysqldump in multi_instance module
# dnsutils is used for nslookups by maildomains module
RUN apt-get update --allow-releaseinfo-change
RUN apt-get dist-upgrade -y
# needed for compiling
RUN apt-get install -y libxml2-dev libpng-dev libfreetype6-dev libjpeg62-turbo-dev libldap2-dev \
libzip-dev zlib1g-dev libicu-dev
# needed for runtime
RUN apt-get install -y catdoc unzip tar imagemagick tesseract-ocr tesseract-ocr-eng poppler-utils \
exiv2 zip tnef ssl-cert mariadb-client dnsutils libldap-common \
libzip5
#sysvshm sysvsem sysvmsg pcntl are for z-push
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-configure ldap
RUN docker-php-ext-install -j$(nproc) soap pdo pdo_mysql calendar gd sysvshm sysvsem sysvmsg ldap intl pcntl zip bcmath exif
# heif support
RUN apt-get install -y \
libheif-dev \
libheif1 \
libmagickwand-dev \
libgomp1 \
imagemagick
RUN pecl install imagick && docker-php-ext-enable imagick
RUN curl -sSLf \
-o /usr/local/bin/install-php-extensions \
https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions sourceguardian
#mem cached
#RUN yes "" | pecl install memcached && \
# echo "extension=memcached.so" > $PHP_INI_DIR/conf.d/docker-php-ext-memcached.ini
RUN pecl install apcu
RUN docker-php-ext-enable apcu
# cleanup
RUN apt purge -y binutils binutils-common cpp dpkg-dev g++ gcc \
libitm1 liblsan0 libmpc3 libmpfr6 \
libpng-tools libubsan1 libxml2-dev libpng-dev libfreetype6-dev libjpeg62-turbo-dev libldap2-dev \
libzip-dev zlib1g-dev libicu-dev patch libmagickwand-dev libheif-dev --autoremove
RUN apt clean
RUN rm -rf /var/lib/apt/lists/*
RUN a2enmod ssl
# SSL volume can be used to replace SSL config and certificates
COPY ./etc/ssl/groupoffice/apache.conf /etc/ssl/groupoffice/apache.conf
COPY ./etc/ssl/openssl.cnf /etc/ssl/openssl.cnf
VOLUME /etc/ssl/groupoffice
COPY ./etc/php.ini $PHP_INI_DIR
#configure apache
ADD ./etc/apache2/sites-available/000-default.conf $APACHE_CONFDIR/sites-available/000-default.conf
RUN mkdir -p /etc/groupoffice/multi_instance && chown -R www-data:www-data /etc/groupoffice
#default group-office config
ADD ./etc/groupoffice/docker-config.php.tpl /usr/local/share/groupoffice-docker-config.php.tpl
ADD ./etc/groupoffice/config.php /etc/groupoffice/config.php
#For persistant configuration
VOLUME /etc/groupoffice
RUN mkdir -p /var/lib/groupoffice/multi_instance && chown -R www-data:www-data /var/lib/groupoffice
#Group-Office data:
VOLUME /var/lib/groupoffice
COPY docker-go-entrypoint.sh /usr/local/bin/
ARG VERSION=26.0.24
ARG PACKAGE=groupoffice-$VERSION
#Download package from GitHub
ADD https://github.com/Intermesh/groupoffice/releases/download/v$VERSION/$PACKAGE.tar.gz /tmp/
RUN tar zxvfC /tmp/$PACKAGE.tar.gz /tmp/ \
&& rm /tmp/$PACKAGE.tar.gz \
&& mv /tmp/$PACKAGE /usr/local/share/groupoffice
CMD ["apache2-foreground"]
ENTRYPOINT ["docker-go-entrypoint.sh"]