mirror of
https://github.com/lingble/Mailu.git
synced 2026-03-20 03:50:30 +00:00
Install py3-multidict from repository before installing socrate to avoid the need of gcc during build
(cherry picked from commit 09ee3ce95c)
# Conflicts:
# core/dovecot/Dockerfile
# core/nginx/Dockerfile
# core/postfix/Dockerfile
# core/rspamd/Dockerfile
# optional/postgresql/Dockerfile
# optional/unbound/Dockerfile
# webmails/rainloop/Dockerfile
# webmails/roundcube/Dockerfile
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
<<<<<<< HEAD
|
||||
# syntax=docker/dockerfile-upstream:1.4.3
|
||||
=======
|
||||
ARG DISTRO=alpine:3.10
|
||||
FROM $DISTRO
|
||||
# python3 shared with most images
|
||||
RUN apk add --no-cache \
|
||||
python3 py3-pip git bash py3-multidict \
|
||||
&& pip3 install --upgrade pip
|
||||
>>>>>>> 09ee3ce9 (Install py3-multidict from repository before installing socrate to avoid the need of gcc during build)
|
||||
|
||||
# dovecot image
|
||||
FROM base
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
<<<<<<< HEAD
|
||||
# syntax=docker/dockerfile-upstream:1.4.3
|
||||
=======
|
||||
ARG DISTRO=alpine:3.10
|
||||
FROM $DISTRO
|
||||
# python3 shared with most images
|
||||
RUN apk add --no-cache \
|
||||
python3 py3-pip git bash py3-multidict \
|
||||
&& pip3 install --upgrade pip
|
||||
>>>>>>> 09ee3ce9 (Install py3-multidict from repository before installing socrate to avoid the need of gcc during build)
|
||||
|
||||
# build static assets (intermediate)
|
||||
FROM base as static
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
<<<<<<< HEAD
|
||||
# syntax=docker/dockerfile-upstream:1.4.3
|
||||
=======
|
||||
ARG DISTRO=alpine:3.10
|
||||
FROM $DISTRO
|
||||
# python3 shared with most images
|
||||
RUN apk add --no-cache \
|
||||
python3 py3-pip git bash py3-multidict \
|
||||
&& pip3 install --upgrade pip
|
||||
>>>>>>> 09ee3ce9 (Install py3-multidict from repository before installing socrate to avoid the need of gcc during build)
|
||||
|
||||
# postfix image
|
||||
FROM base
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
<<<<<<< HEAD
|
||||
# syntax=docker/dockerfile-upstream:1.4.3
|
||||
=======
|
||||
ARG DISTRO=alpine:3.10
|
||||
FROM $DISTRO
|
||||
# python3 shared with most images
|
||||
RUN apk add --no-cache \
|
||||
python3 py3-pip git bash py3-multidict \
|
||||
&& pip3 install --upgrade pip
|
||||
>>>>>>> 09ee3ce9 (Install py3-multidict from repository before installing socrate to avoid the need of gcc during build)
|
||||
|
||||
# rspamd image
|
||||
FROM base
|
||||
|
||||
36
optional/postgresql/Dockerfile
Normal file
36
optional/postgresql/Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
ARG DISTRO=alpine:3.10
|
||||
FROM $DISTRO
|
||||
# python3 shared with most images
|
||||
RUN apk add --no-cache \
|
||||
python3 py3-pip bash py3-multidict \
|
||||
&& pip3 install --upgrade pip
|
||||
|
||||
# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube
|
||||
RUN pip3 install socrate
|
||||
|
||||
# Image specific layers under this line
|
||||
RUN apk add --no-cache \
|
||||
postgresql postgresql-libs busybox-suid sudo tar \
|
||||
&& apk add --virtual .build-deps gcc musl-dev postgresql-dev python3-dev \
|
||||
&& pip3 install psycopg2 anosql==0.3.1 \
|
||||
&& apk --purge del .build-deps
|
||||
|
||||
COPY start.py /start.py
|
||||
COPY basebackup.sh /basebackup.sh
|
||||
COPY conf /conf
|
||||
|
||||
COPY postgres_crontab /etc/postgres_crontab
|
||||
RUN crontab /etc/postgres_crontab
|
||||
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
RUN mkdir -p /data /backup /run/postgresql \
|
||||
&& chown -R postgres:postgres /run/postgresql \
|
||||
&& chmod 2777 /run/postgresql
|
||||
|
||||
VOLUME /data
|
||||
VOLUME /backup
|
||||
EXPOSE 5432
|
||||
|
||||
CMD /start.py
|
||||
HEALTHCHECK CMD psql -h 127.0.0.1 -d postgres -U health -c "select 1 as ok;" || exit 1
|
||||
@@ -1,4 +1,13 @@
|
||||
<<<<<<< HEAD
|
||||
# syntax=docker/dockerfile-upstream:1.4.3
|
||||
=======
|
||||
ARG DISTRO=alpine:3.10
|
||||
FROM $DISTRO
|
||||
# python3 shared with most images
|
||||
RUN apk add --no-cache \
|
||||
python3 py3-pip git bash py3-multidict \
|
||||
&& pip3 install --upgrade pip
|
||||
>>>>>>> 09ee3ce9 (Install py3-multidict from repository before installing socrate to avoid the need of gcc during build)
|
||||
|
||||
# resolver image
|
||||
FROM base
|
||||
|
||||
50
webmails/rainloop/Dockerfile
Normal file
50
webmails/rainloop/Dockerfile
Normal file
@@ -0,0 +1,50 @@
|
||||
ARG ARCH=""
|
||||
ARG QEMU=other
|
||||
|
||||
# NOTE: only add file if building for arm
|
||||
FROM ${ARCH}php:7.3-apache as build_arm
|
||||
ONBUILD COPY --from=balenalib/rpi-alpine:3.10 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
|
||||
|
||||
FROM ${ARCH}php:7.3-apache as build_other
|
||||
|
||||
FROM build_${QEMU}
|
||||
#Shared layer between rainloop and roundcube
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 curl python3-pip git python3-multidict \
|
||||
&& rm -rf /var/lib/apt/lists \
|
||||
&& echo "ServerSignature Off" >> /etc/apache2/apache2.conf
|
||||
|
||||
# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube
|
||||
RUN pip3 install socrate
|
||||
|
||||
ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.13.0/rainloop-community-1.13.0.zip
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
unzip python3-jinja2 \
|
||||
&& rm -rf /var/www/html/ \
|
||||
&& mkdir /var/www/html \
|
||||
&& cd /var/www/html \
|
||||
&& curl -L -O ${RAINLOOP_URL} \
|
||||
&& unzip -q *.zip \
|
||||
&& rm -f *.zip \
|
||||
&& rm -rf data/ \
|
||||
&& find . -type d -exec chmod 755 {} \; \
|
||||
&& find . -type f -exec chmod 644 {} \; \
|
||||
&& chown -R www-data: * \
|
||||
&& apt-get purge -y unzip \
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
|
||||
COPY include.php /var/www/html/include.php
|
||||
COPY php.ini /php.ini
|
||||
|
||||
COPY application.ini /application.ini
|
||||
COPY default.ini /default.ini
|
||||
|
||||
COPY start.py /start.py
|
||||
|
||||
EXPOSE 80/tcp
|
||||
VOLUME ["/data"]
|
||||
|
||||
CMD /start.py
|
||||
|
||||
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
||||
49
webmails/roundcube/Dockerfile
Normal file
49
webmails/roundcube/Dockerfile
Normal file
@@ -0,0 +1,49 @@
|
||||
# NOTE: only add file if building for arm
|
||||
ARG ARCH=""
|
||||
ARG QEMU=other
|
||||
FROM ${ARCH}php:7.3-apache as build_arm
|
||||
ONBUILD COPY --from=balenalib/rpi-alpine:3.10 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
|
||||
|
||||
FROM ${ARCH}php:7.3-apache as build_other
|
||||
|
||||
FROM build_${QEMU}
|
||||
#Shared layer between rainloop and roundcube
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 curl python3-pip git python3-multidict \
|
||||
&& rm -rf /var/lib/apt/lists \
|
||||
&& echo "ServerSignature Off" >> /etc/apache2/apache2.conf
|
||||
|
||||
# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube
|
||||
RUN pip3 install socrate
|
||||
|
||||
ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.3.10/roundcubemail-1.3.10-complete.tar.gz
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
zlib1g-dev libzip4 libzip-dev \
|
||||
python3-jinja2 \
|
||||
&& docker-php-ext-install zip \
|
||||
&& echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \
|
||||
&& rm -rf /var/www/html/ \
|
||||
&& cd /var/www \
|
||||
&& curl -L -O ${ROUNDCUBE_URL} \
|
||||
&& tar -xf *.tar.gz \
|
||||
&& rm -f *.tar.gz \
|
||||
&& mv roundcubemail-* html \
|
||||
&& cd html \
|
||||
&& rm -rf CHANGELOG INSTALL LICENSE README.md UPGRADING composer.json-dist installer \
|
||||
&& sed -i 's,mod_php5.c,mod_php7.c,g' .htaccess \
|
||||
&& sed -i 's,^php_value.*post_max_size,#&,g' .htaccess \
|
||||
&& sed -i 's,^php_value.*upload_max_filesize,#&,g' .htaccess \
|
||||
&& chown -R www-data: logs temp \
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
|
||||
COPY php.ini /php.ini
|
||||
COPY config.inc.php /var/www/html/config/
|
||||
COPY start.py /start.py
|
||||
|
||||
EXPOSE 80/tcp
|
||||
VOLUME ["/data"]
|
||||
|
||||
CMD /start.py
|
||||
|
||||
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
||||
Reference in New Issue
Block a user