-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
47 lines (37 loc) · 1.81 KB
/
Dockerfile
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
FROM php:7.4-fpm
ENV DEBIAN_FRONTEND=noninteractive
# Install php extension build deps
RUN apt-get update -y \
&& apt-get upgrade -yq --no-install-recommends --no-install-suggests \
&& apt-get install -yq --no-install-recommends --no-install-suggests libldb-dev libldap2-dev libcurl4-openssl-dev libicu-dev libpq-dev postgresql-client netcat \
&& sed -i -e '$a\deb http://deb.debian.org/debian bullseye main' /etc/apt/sources.list \
&& apt-get update -y \
&& apt-get install -yq --no-install-recommends --no-install-suggests ssmtp \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \
&& ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \
&& sed -i -e 's/^.*FromLineOverride=.*$/FromLineOverride=YES/' /etc/ssmtp/ssmtp.conf \
&& ( echo "sendmail_path = /usr/sbin/ssmtp -t" > /usr/local/etc/php/conf.d/docker-php-mail.ini )
RUN docker-php-ext-install pdo_pgsql pgsql ldap intl
# Install Caddy
RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/caddyserver/caddy/releases/download/v1.0.4/caddy_v1.0.4_linux_amd64.tar.gz" \
| tar --no-same-owner -C /usr/bin/ -xz caddy \
&& chmod 0755 /usr/bin/caddy \
&& /usr/bin/caddy -version
# Install dns-ui
RUN mkdir -p /srv/dns-ui \
&& cd /srv/dns-ui \
&& curl --silent --show-error --fail --location \
-o - "https://github.com/operasoftware/dns-ui/archive/master.tar.gz" \
| tar --strip-components=1 -xz \
&& chown -R www-data:www-data .
COPY Caddyfile /etc/Caddyfile
COPY config.ini /srv/dns-ui/config/config.ini.orig
COPY entrypoint.sh /entrypoint
WORKDIR /srv/dns-ui/public_html
STOPSIGNAL SIGTERM
ENTRYPOINT ["/entrypoint"]
VOLUME /data