2016-04-21 20:24:37 +02:00
|
|
|
FROM jedisct1/phusion-baseimage-latest:16.04
|
2015-07-06 01:39:54 +02:00
|
|
|
MAINTAINER Frank Denis
|
|
|
|
ENV SERIAL 1
|
|
|
|
|
2015-07-12 15:00:59 +02:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2015-12-28 00:00:34 +01:00
|
|
|
ENV BUILD_DEPS autoconf file gcc git libc-dev make pkg-config
|
2015-07-06 01:39:54 +02:00
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
apt-get update && apt-get install -y \
|
|
|
|
$BUILD_DEPS \
|
|
|
|
bsdmainutils \
|
|
|
|
ldnsutils \
|
|
|
|
--no-install-recommends
|
|
|
|
|
2016-06-09 18:52:38 +02:00
|
|
|
ENV LIBRESSL_VERSION 2.4.1
|
|
|
|
ENV LIBRESSL_SHA256 121922b13169cd47a85e3e77f0bc129f8d04247193b42491cb1fab9074e80477
|
2015-07-06 01:39:54 +02:00
|
|
|
ENV LIBRESSL_DOWNLOAD_URL http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz
|
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
mkdir -p /tmp/src && \
|
|
|
|
cd /tmp/src && \
|
|
|
|
curl -sSL $LIBRESSL_DOWNLOAD_URL -o libressl.tar.gz && \
|
|
|
|
echo "${LIBRESSL_SHA256} *libressl.tar.gz" | sha256sum -c - && \
|
|
|
|
tar xzf libressl.tar.gz && \
|
|
|
|
rm -f libressl.tar.gz && \
|
|
|
|
cd libressl-${LIBRESSL_VERSION} && \
|
|
|
|
./configure --disable-dependency-tracking --prefix=/opt/libressl && \
|
|
|
|
make check && make install && \
|
|
|
|
rm -fr /opt/libressl/share/man && \
|
|
|
|
echo /opt/libressl/lib > /etc/ld.so.conf.d/libressl.conf && ldconfig && \
|
|
|
|
rm -fr /tmp/*
|
|
|
|
|
2016-06-11 16:05:05 +02:00
|
|
|
ENV UNBOUND_VERSION 1.5.9
|
|
|
|
ENV UNBOUND_SHA256 01328cfac99ab5b8c47115151896a244979e442e284eb962c0ea84b7782b6990
|
2016-04-19 08:19:45 +02:00
|
|
|
ENV UNBOUND_DOWNLOAD_URL https://www.unbound.net/downloads/unbound-${UNBOUND_VERSION}.tar.gz
|
2015-07-06 01:39:54 +02:00
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y \
|
|
|
|
libevent-2.0 \
|
|
|
|
libevent-dev \
|
|
|
|
libexpat1 \
|
|
|
|
libexpat1-dev \
|
|
|
|
--no-install-recommends && \
|
|
|
|
mkdir -p /tmp/src && \
|
|
|
|
cd /tmp/src && \
|
|
|
|
curl -sSL $UNBOUND_DOWNLOAD_URL -o unbound.tar.gz && \
|
|
|
|
echo "${UNBOUND_SHA256} *unbound.tar.gz" | sha256sum -c - && \
|
|
|
|
tar xzf unbound.tar.gz && \
|
|
|
|
rm -f unbound.tar.gz && \
|
|
|
|
cd unbound-${UNBOUND_VERSION} && \
|
|
|
|
groupadd _unbound && \
|
|
|
|
useradd -g _unbound -s /etc -d /dev/null _unbound && \
|
|
|
|
./configure --disable-dependency-tracking --prefix=/opt/unbound --with-pthreads \
|
|
|
|
--with-username=_unbound --with-ssl=/opt/libressl --with-libevent \
|
|
|
|
--enable-event-api && \
|
|
|
|
make install && \
|
|
|
|
mv /opt/unbound/etc/unbound/unbound.conf /opt/unbound/etc/unbound/unbound.conf.example && \
|
|
|
|
rm -fr /opt/unbound/share/man && \
|
|
|
|
apt-get purge -y --auto-remove \
|
|
|
|
libexpat-dev \
|
|
|
|
libevent-dev && \
|
|
|
|
apt-get autoremove -y && apt-get clean && \
|
|
|
|
rm -fr /tmp/* /var/tmp/*
|
|
|
|
|
2016-04-19 08:19:45 +02:00
|
|
|
ENV LIBSODIUM_VERSION 1.0.10
|
|
|
|
ENV LIBSODIUM_SHA256 71b786a96dd03693672b0ca3eb77f4fb08430df307051c0d45df5353d22bc4be
|
2015-07-06 01:39:54 +02:00
|
|
|
ENV LIBSODIUM_DOWNLOAD_URL https://download.libsodium.org/libsodium/releases/libsodium-${LIBSODIUM_VERSION}.tar.gz
|
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
mkdir -p /tmp/src && \
|
|
|
|
cd /tmp/src && \
|
|
|
|
curl -sSL $LIBSODIUM_DOWNLOAD_URL -o libsodium.tar.gz && \
|
|
|
|
echo "${LIBSODIUM_SHA256} *libsodium.tar.gz" | sha256sum -c - && \
|
|
|
|
tar xzf libsodium.tar.gz && \
|
|
|
|
rm -f libsodium.tar.gz && \
|
|
|
|
cd libsodium-${LIBSODIUM_VERSION} && \
|
2016-04-19 08:19:45 +02:00
|
|
|
./configure --disable-dependency-tracking --enable-minimal --prefix=/opt/libsodium && \
|
2015-07-06 01:39:54 +02:00
|
|
|
make check && make install && \
|
|
|
|
echo /opt/libsodium/lib > /etc/ld.so.conf.d/libsodium.conf && ldconfig && \
|
|
|
|
rm -fr /tmp/*
|
|
|
|
|
2015-07-27 22:45:21 +02:00
|
|
|
ENV DNSCRYPT_PROXY_VERSION 1.6.0
|
|
|
|
ENV DNSCRYPT_PROXY_SHA256 7703a41a1040fc30b19fdfbbaba36b411e66d998584b0e2fa5088f734f4f86be
|
2016-04-19 08:19:45 +02:00
|
|
|
ENV DNSCRYPT_PROXY_DOWNLOAD_URL https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-${DNSCRYPT_PROXY_VERSION}.tar.gz
|
2015-07-06 01:39:54 +02:00
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
mkdir -p /tmp/src && \
|
|
|
|
cd /tmp/src && \
|
|
|
|
curl -sSL $DNSCRYPT_PROXY_DOWNLOAD_URL -o dnscrypt-proxy.tar.gz && \
|
|
|
|
echo "${DNSCRYPT_PROXY_SHA256} *dnscrypt-proxy.tar.gz" | sha256sum -c - && \
|
2015-07-06 11:24:45 +02:00
|
|
|
tar xzf dnscrypt-proxy.tar.gz && \
|
2015-07-06 01:39:54 +02:00
|
|
|
rm -f dnscrypt-proxy.tar.gz && \
|
|
|
|
cd dnscrypt-proxy-${DNSCRYPT_PROXY_VERSION} && \
|
|
|
|
mkdir -p /opt/dnscrypt-proxy/empty && \
|
|
|
|
groupadd _dnscrypt-proxy && \
|
|
|
|
useradd -g _dnscrypt-proxy -s /etc -d /opt/dnscrypt-proxy/empty _dnscrypt-proxy && \
|
|
|
|
env CPPFLAGS=-I/opt/libsodium/include LDFLAGS=-L/opt/libsodium/lib \
|
|
|
|
./configure --disable-dependency-tracking --prefix=/opt/dnscrypt-proxy && \
|
|
|
|
make install && \
|
|
|
|
rm -fr /opt/dnscrypt-proxy/share && \
|
|
|
|
rm -fr /tmp/* /var/tmp/*
|
|
|
|
|
2015-08-08 15:56:02 +02:00
|
|
|
ENV DNSCRYPT_WRAPPER_VERSION 0.2
|
|
|
|
ENV DNSCRYPT_WRAPPER_SHA256 d26f9d6329653b71bed5978885385b45f16596021f219f46e49da60d5813054e
|
2015-07-06 11:24:45 +02:00
|
|
|
ENV DNSCRYPT_WRAPPER_DOWNLOAD_URL https://github.com/Cofyc/dnscrypt-wrapper/releases/download/v${DNSCRYPT_WRAPPER_VERSION}/dnscrypt-wrapper-v${DNSCRYPT_WRAPPER_VERSION}.tar.bz2
|
2015-07-06 01:39:54 +02:00
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y \
|
|
|
|
libevent-2.0 \
|
|
|
|
libevent-dev \
|
|
|
|
--no-install-recommends && \
|
|
|
|
mkdir -p /tmp/src && \
|
|
|
|
cd /tmp/src && \
|
2015-07-06 11:24:45 +02:00
|
|
|
curl -sSL $DNSCRYPT_WRAPPER_DOWNLOAD_URL -o dnscrypt-wrapper.tar.bz2 && \
|
|
|
|
echo "${DNSCRYPT_WRAPPER_SHA256} *dnscrypt-wrapper.tar.bz2" | sha256sum -c - && \
|
|
|
|
tar xjf dnscrypt-wrapper.tar.bz2 && \
|
|
|
|
cd dnscrypt-wrapper-v${DNSCRYPT_WRAPPER_VERSION} && \
|
2015-07-06 01:39:54 +02:00
|
|
|
mkdir -p /opt/dnscrypt-wrapper/empty && \
|
|
|
|
groupadd _dnscrypt-wrapper && \
|
|
|
|
useradd -g _dnscrypt-wrapper -s /etc -d /opt/dnscrypt-wrapper/empty _dnscrypt-wrapper && \
|
|
|
|
groupadd _dnscrypt-signer && \
|
|
|
|
useradd -g _dnscrypt-signer -G _dnscrypt-wrapper -s /etc -d /dev/null _dnscrypt-signer && \
|
|
|
|
make configure && \
|
|
|
|
./configure --prefix=/opt/dnscrypt-wrapper --with-sodium=/opt/libsodium && \
|
|
|
|
make install && \
|
|
|
|
apt-get purge -y --auto-remove libevent-dev && \
|
|
|
|
apt-get autoremove -y && apt-get clean && \
|
|
|
|
rm -fr /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
apt-get purge -y --auto-remove $BUILD_DEPS && \
|
|
|
|
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
RUN mkdir -p \
|
|
|
|
/etc/service/unbound \
|
|
|
|
/etc/service/watchdog
|
|
|
|
|
2015-07-08 00:19:02 +02:00
|
|
|
COPY entrypoint.sh /
|
2015-07-06 01:39:54 +02:00
|
|
|
|
2015-07-08 00:19:02 +02:00
|
|
|
COPY unbound.sh /etc/service/unbound/run
|
|
|
|
COPY unbound-check.sh /etc/service/unbound/check
|
2015-07-06 01:39:54 +02:00
|
|
|
|
2015-07-08 00:19:02 +02:00
|
|
|
COPY dnscrypt-wrapper.sh /etc/service/dnscrypt-wrapper/run
|
2015-07-06 01:39:54 +02:00
|
|
|
|
2015-07-08 00:19:02 +02:00
|
|
|
COPY key-rotation.sh /etc/service/key-rotation/run
|
|
|
|
COPY watchdog.sh /etc/service/watchdog/run
|
2015-07-06 01:39:54 +02:00
|
|
|
|
|
|
|
VOLUME ["/opt/dnscrypt-wrapper/etc/keys"]
|
|
|
|
|
2015-11-28 13:52:35 +01:00
|
|
|
EXPOSE 443/udp 443/tcp
|
2015-07-06 01:39:54 +02:00
|
|
|
|
|
|
|
CMD ["start"]
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|