Repository navigation
Expand file tree
/
Copy pathDockerfile.release
More file actions
49 lines (37 loc) · 1.71 KB
/
Copy pathDockerfile.release
File metadata and controls
49 lines (37 loc) · 1.71 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
FROM debian:bookworm-slim
LABEL maintainer="michiel@phplist.com"
RUN apt-get update && apt-get upgrade -y && apt-get install -y apt-utils \
apache2 php-mysql logrotate \
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 && 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/
COPY docker/phplist-crontab /etc/cron.d/
COPY docker/phplist-logrotate /etc/logrotate.d/phplist
COPY docker/docker-phplist-config-live.php /etc/phplist/config.php
COPY phplist-${VERSION}.tgz ./
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh && \
a2ensite docker-apache-phplist && \
a2enmod rewrite && \
a2enmod headers && \
a2disconf other-vhosts-access-log \
&& sed -i s/LogLevel.*/LogLevel\ warn/ /etc/apache2/apache2.conf
RUN tar zxf phplist-$VERSION.tgz && \
mv phplist-$VERSION/* /var/www/phpList3/ && \
rm -rf /phplist-$VERSION* && \
mkdir -p /var/tmp/phplistupdate && \
chown www-data /var/tmp/phplistupdate && \
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 && \
mkdir -p /var/www/phpList3/public_html/images && \
chown -R www-data: /var/www/phpList3 && \
apt -y remove exim4-base && apt -y auto-remove
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]