1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-03-31 21:55:23 +02:00

34 lines
946 B
Docker
Raw Normal View History

FROM alpine:3.10
2018-11-18 18:35:13 +02:00
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip bash \
2018-11-18 18:35:13 +02:00
&& pip3 install --upgrade pip
# Shared layer between rspamd, postfix, dovecot, unbound and nginx
RUN pip3 install jinja2
# Image specific layers under this line
RUN apk add --no-cache \
postgresql postgresql-libs busybox-suid sudo tar \
2018-11-18 18:35:13 +02:00
&& apk add --virtual .build-deps gcc musl-dev postgresql-dev python3-dev \
2019-01-07 12:55:59 +02:00
&& pip3 install psycopg2 anosql==0.3.1 \
2018-11-18 18:35:13 +02:00
&& apk --purge del .build-deps
COPY start.py /start.py
COPY basebackup.sh /basebackup.sh
2018-11-18 18:35:13 +02:00
COPY conf /conf
COPY postgres_crontab /etc/postgres_crontab
RUN crontab /etc/postgres_crontab
2018-11-18 18:35:13 +02:00
ENV LANG en_US.UTF-8
2018-11-22 07:46:57 +02:00
RUN mkdir -p /data /backup /run/postgresql \
&& chown -R postgres:postgres /run/postgresql \
2018-11-18 23:48:20 +02:00
&& chmod 2777 /run/postgresql
VOLUME /data
2018-11-22 07:46:57 +02:00
VOLUME /backup
2018-11-18 23:48:20 +02:00
EXPOSE 5432
2018-11-18 18:35:13 +02:00
CMD /start.py
2018-11-30 13:54:12 +02:00
HEALTHCHECK CMD psql -h 127.0.0.1 -d postgres -U health -c "select 1 as ok;" || exit 1