2020-11-26 22:13:55 +08:00
|
|
|
# Inspired by the original Rainloop dockerfile from youtous on GitLab
|
2022-05-13 21:32:18 +08:00
|
|
|
FROM php:8.1-fpm-bullseye
|
2020-11-26 22:13:55 +08:00
|
|
|
|
|
|
|
ARG FILES_ZIP
|
2022-05-13 21:37:51 +08:00
|
|
|
|
|
|
|
# can be x86_64 or aarch64
|
|
|
|
ARG ARCH=x86_64
|
|
|
|
|
2020-11-26 22:13:55 +08:00
|
|
|
LABEL org.label-schema.description="SnappyMail webmail client image using nginx, php-fpm based on Debian Buster"
|
|
|
|
|
2020-12-02 21:58:31 +08:00
|
|
|
ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDERR=true MEMORY_LIMIT=128M SECURE_COOKIES=true
|
2020-11-26 22:13:55 +08:00
|
|
|
ENV fpm.pool.clear_env=false
|
|
|
|
|
|
|
|
# Install dependencies such as nginx
|
|
|
|
RUN mkdir -p /usr/share/man/man1/ /usr/share/man/man3/ /usr/share/man/man7/ && \
|
|
|
|
apt-get update -q --fix-missing && \
|
|
|
|
apt-get -y upgrade && \
|
|
|
|
apt-get install --no-install-recommends -y \
|
|
|
|
apt-transport-https gnupg openssl wget curl ca-certificates nginx supervisor sudo \
|
|
|
|
unzip libzip-dev libxml2-dev libldb-dev libldap2-dev \
|
|
|
|
sqlite3 libsqlite3-dev libsqlite3-0 libpq-dev postgresql-client mariadb-client logrotate \
|
2020-12-01 02:13:00 +08:00
|
|
|
zip mlocate libpcre3-dev libicu-dev \
|
2020-11-26 22:13:55 +08:00
|
|
|
build-essential chrpath libssl-dev \
|
|
|
|
libxft-dev libfreetype6 libfreetype6-dev \
|
|
|
|
libpng-dev libjpeg62-turbo-dev \
|
|
|
|
libfontconfig1 libfontconfig1-dev \
|
|
|
|
&& \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Install PHP extensions
|
|
|
|
RUN php -m && \
|
2022-05-13 21:37:51 +08:00
|
|
|
docker-php-ext-configure ldap --with-libdir=lib/$ARCH-linux-gnu/ && \
|
2020-11-26 22:13:55 +08:00
|
|
|
docker-php-ext-configure intl && \
|
2022-03-06 01:02:34 +08:00
|
|
|
docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
2020-11-26 22:13:55 +08:00
|
|
|
docker-php-ext-install ldap opcache pdo_mysql pdo_pgsql zip intl gd && \
|
|
|
|
php -m
|
|
|
|
|
|
|
|
# Install snappymail
|
|
|
|
WORKDIR /tmp
|
|
|
|
COPY ${FILES_ZIP} .
|
|
|
|
RUN mkdir /snappymail && \
|
|
|
|
unzip -q ${FILES_ZIP} -d /snappymail && \
|
|
|
|
find /snappymail -type d -exec chmod 755 {} \; && \
|
|
|
|
find /snappymail -type f -exec chmod 644 {} \; && \
|
|
|
|
rm -rf ${FILES_ZIP}
|
|
|
|
|
|
|
|
# Install other content
|
|
|
|
COPY files /
|
|
|
|
RUN chmod +x /entrypoint.sh && chmod +x /logrotate-loop.sh
|
|
|
|
VOLUME /snappymail/data
|
|
|
|
EXPOSE 8888
|
2020-12-01 02:13:00 +08:00
|
|
|
CMD ["/entrypoint.sh"]
|