44 lines
890 B
Docker
44 lines
890 B
Docker
FROM alpine:3.13 AS builder
|
|
|
|
COPY tmp/unbound/ tmp/unbound
|
|
RUN \
|
|
apk update && \
|
|
apk add alpine-sdk && \
|
|
apk add nghttp2-libs && \
|
|
apk add nghttp2-dev && \
|
|
apk add openssl-dev && \
|
|
apk add expat-dev && \
|
|
apk add libevent-dev && \
|
|
cd tmp/unbound && \
|
|
./configure --with-libnghttp2 --with-libevent --prefix /opt/unbound && \
|
|
make && \
|
|
make install
|
|
|
|
|
|
|
|
FROM alpine:3.13
|
|
COPY --from=builder /opt/unbound/ /opt/unbound
|
|
|
|
RUN \
|
|
apk add --no-cache openssl && \
|
|
apk add --no-cache nghttp2-libs && \
|
|
apk add --no-cache expat && \
|
|
apk add --no-cache libevent && \
|
|
mv /opt/unbound/etc/unbound/unbound.conf /opt/unbound/etc/unbound/unbound.conf-dist && \
|
|
ln -s /opt/unbound/etc/unbound /etc/unbound
|
|
|
|
COPY unbound.conf /opt/unbound/etc/unbound/unbound.conf
|
|
|
|
EXPOSE 53/udp
|
|
EXPOSE 53/tcp
|
|
EXPOSE 853/tcp
|
|
|
|
VOLUME /opt/unbound/etc/unbound
|
|
|
|
CMD [ "/usr/sbin/unbound" ]
|
|
|
|
|
|
|
|
|
|
|