|
|
|
@ -1,13 +1,14 @@
|
|
|
|
|
FROM jedisct1/alpine-runit:latest
|
|
|
|
|
FROM ubuntu:19.04
|
|
|
|
|
LABEL maintainer="Frank Denis"
|
|
|
|
|
SHELL ["/bin/sh", "-x", "-c"]
|
|
|
|
|
ENV SERIAL 3
|
|
|
|
|
|
|
|
|
|
ENV CFLAGS=-Ofast
|
|
|
|
|
ENV BUILD_DEPS curl make gcc musl-dev git libevent-dev expat-dev shadow autoconf file openssl-dev byacc linux-headers
|
|
|
|
|
ENV RUNTIME_DEPS bash util-linux coreutils findutils grep openssl ldns ldns-tools libevent expat libexecinfo coreutils drill ca-certificates
|
|
|
|
|
ENV BUILD_DEPS curl make build-essential git libevent-dev libexpat1-dev autoconf file libssl-dev byacc
|
|
|
|
|
ENV RUNTIME_DEPS bash util-linux coreutils findutils grep openssl ldnsutils libevent-dev expat coreutils ca-certificates runit runit-systemd
|
|
|
|
|
|
|
|
|
|
RUN apk --no-cache upgrade && apk add --no-cache $RUNTIME_DEPS
|
|
|
|
|
RUN apt-get update; apt-get -qy dist-upgrade; apt-get -qy clean
|
|
|
|
|
RUN apt-get install -qy --no-install-recommends $RUNTIME_DEPS
|
|
|
|
|
RUN update-ca-certificates 2> /dev/null || true
|
|
|
|
|
|
|
|
|
|
ENV UNBOUND_GIT_URL https://github.com/jedisct1/unbound.git
|
|
|
|
@ -15,7 +16,7 @@ ENV UNBOUND_GIT_REVISION 35ac577d99d56869f2f87dcc7b5e36b8996df5ca
|
|
|
|
|
|
|
|
|
|
WORKDIR /tmp
|
|
|
|
|
|
|
|
|
|
RUN apk add --no-cache $BUILD_DEPS && \
|
|
|
|
|
RUN apt-get install -qy --no-install-recommends $BUILD_DEPS && \
|
|
|
|
|
git clone --depth=1000 "$UNBOUND_GIT_URL" && \
|
|
|
|
|
cd unbound && \
|
|
|
|
|
git checkout "$UNBOUND_GIT_REVISION" && \
|
|
|
|
@ -25,16 +26,16 @@ RUN apk add --no-cache $BUILD_DEPS && \
|
|
|
|
|
--with-username=_unbound --with-libevent --enable-event-api && \
|
|
|
|
|
make -j"$(getconf _NPROCESSORS_ONLN)" install && \
|
|
|
|
|
mv /opt/unbound/etc/unbound/unbound.conf /opt/unbound/etc/unbound/unbound.conf.example && \
|
|
|
|
|
apk del --purge $BUILD_DEPS && \
|
|
|
|
|
apt-get -qy purge $BUILD_DEPS && \
|
|
|
|
|
rm -fr /opt/unbound/share/man && \
|
|
|
|
|
rm -fr /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
|
|
ENV RUSTFLAGS "-C target-feature=-crt-static -C link-arg=-s"
|
|
|
|
|
ENV RUSTFLAGS "-C link-arg=-s"
|
|
|
|
|
|
|
|
|
|
RUN apk add --no-cache $BUILD_DEPS && \
|
|
|
|
|
RUN apt-get install -qy --no-install-recommends $BUILD_DEPS && \
|
|
|
|
|
curl -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain nightly
|
|
|
|
|
|
|
|
|
|
RUN source $HOME/.cargo/env && \
|
|
|
|
|
RUN export PATH="$HOME/.cargo/bin:$PATH" && \
|
|
|
|
|
cargo install encrypted-dns && \
|
|
|
|
|
mkdir -p /opt/encrypted-dns/sbin && \
|
|
|
|
|
mkdir -p /opt/encrypted-dns/etc/keys && \
|
|
|
|
@ -44,7 +45,7 @@ RUN source $HOME/.cargo/env && \
|
|
|
|
|
useradd -g _encrypted-dns -s /etc -d /opt/encrypted-dns/empty _encrypted-dns && \
|
|
|
|
|
chown _encrypted-dns:_encrypted-dns /opt/encrypted-dns/etc/keys && \
|
|
|
|
|
chmod 700 /opt/encrypted-dns/etc/keys && \
|
|
|
|
|
apk del --purge $BUILD_DEPS && \
|
|
|
|
|
apt-get -qy purge $BUILD_DEPS && \
|
|
|
|
|
rm -fr ~/.cargo ~/.rustup && \
|
|
|
|
|
rm -fr /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
|
|