Dockerfile 872 Bytes
Newer Older
1
ARG DISTRO=alpine:3.14.5
2
FROM $DISTRO
3
ARG VERSION
DjVinnii's avatar
DjVinnii committed
4
5
6

ENV TZ Etc/UTC

7
8
LABEL version=$VERSION

9
10
# python3 shared with most images
RUN apk add --no-cache \
DjVinnii's avatar
DjVinnii committed
11
    python3 py3-pip git bash py3-multidict tzdata \
12
  && pip3 install --upgrade pip
13
14

# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube
ofthesun9's avatar
ofthesun9 committed
15
RUN pip3 install socrate==0.2.0
16

17
# Image specific layers under this line
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
RUN apk add --no-cache unbound curl bind-tools \
  && curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache \
  && chown root:unbound /etc/unbound \
  && chmod 775 /etc/unbound \
  && apk del --no-cache curl \
  && /usr/sbin/unbound-anchor -a /etc/unbound/trusted-key.key | true

COPY start.py /start.py
COPY unbound.conf /unbound.conf

EXPOSE 53/udp 53/tcp

CMD /start.py

HEALTHCHECK CMD dig @127.0.0.1 || exit 1
Florent Daigniere's avatar
Florent Daigniere committed
33
RUN echo $VERSION >> /version