-
-
Notifications
You must be signed in to change notification settings - Fork 271
/
Dockerfile.release
51 lines (35 loc) · 1.49 KB
/
Dockerfile.release
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
FROM debian:bookworm-slim
LABEL maintainer="michiel@phplist.com"
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y apt-utils \
apache2 php-mysql \
libapache2-mod-php php-curl php-gd \
cron php-imap php-xml php-zip php-mbstring
RUN useradd -d /var/www/phpList3 phplist
ARG VERSION=unknown
RUN echo VERSION=${VERSION}
RUN rm -rf /var/www/phpList3 && mkdir -p /var/www/phpList3
RUN rm -rf /etc/phplist && mkdir /etc/phplist
COPY docker/docker-apache-phplist.conf /etc/apache2/sites-available
COPY docker/security.conf /etc/apache2/conf-available
COPY docker/docker-entrypoint.sh /usr/local/bin/
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh
RUN a2ensite docker-apache-phplist
RUN a2enmod rewrite
RUN a2enmod headers
RUN a2disconf other-vhosts-access-log
RUN sed -i s/LogLevel.*/LogLevel\ warn/ /etc/apache2/apache2.conf
COPY docker/phplist-crontab /etc/cron.d/
COPY docker/docker-phplist-config-live.php /etc/phplist/config.php
COPY phplist-${VERSION}.tgz ./
RUN tar zxf phplist-$VERSION.tgz
RUN mv phplist-$VERSION/* /var/www/phpList3/
RUN rm -rf /phplist-$VERSION*
RUN mkdir -p /var/tmp/phplistupdate && chown www-data /var/tmp/phplistupdate
RUN rm -f /etc/apache2/sites-enabled/000-default.conf && \
cd /var/www/ && find . -type d -name .git -print0 | xargs -0 rm -rf && \
find . -type d -print0 | xargs -0 chmod 755 && \
find . -type f -print0 | xargs -0 chmod 644
RUN chown -R www-data: /var/www/phpList3
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]