2015-05-30 13:47:20 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for dnscrypt-wrapper
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM debian:jessie
|
2017-05-08 01:05:07 +02:00
|
|
|
MAINTAINER kev <noreply@easypi.pro>
|
2015-05-30 13:47:20 +02:00
|
|
|
|
2017-10-02 05:37:44 +02:00
|
|
|
ENV LIBSODIUM_VERSION 1.0.15
|
|
|
|
ENV DNSCRYPT_VERSION 0.3
|
2015-06-12 12:02:11 +02:00
|
|
|
ENV RESOLVER_ADDR 8.8.8.8:53
|
|
|
|
ENV LISTEN_ADDR 0.0.0.0:443
|
2016-05-01 03:06:20 +02:00
|
|
|
ENV PROVIDER_NAME 2.dnscrypt-cert.easypi.info
|
2015-06-12 12:02:11 +02:00
|
|
|
|
2016-02-25 03:49:26 +02:00
|
|
|
RUN set -xe \
|
|
|
|
&& apt-get update \
|
2015-05-30 14:45:32 +02:00
|
|
|
&& apt-get install -y autoconf \
|
|
|
|
automake \
|
|
|
|
build-essential \
|
2015-05-30 13:47:20 +02:00
|
|
|
curl \
|
|
|
|
git \
|
2015-06-19 22:29:25 +02:00
|
|
|
libevent-2.0 \
|
2015-05-30 13:47:20 +02:00
|
|
|
libevent-dev \
|
|
|
|
&& mkdir libsodium \
|
|
|
|
&& cd libsodium \
|
2015-07-16 19:01:07 +02:00
|
|
|
&& curl -sSL https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VERSION.tar.gz | tar xz --strip 1 \
|
2015-05-30 13:47:20 +02:00
|
|
|
&& ./configure --prefix=/usr \
|
|
|
|
&& make install \
|
|
|
|
&& ldconfig \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -rf libsodium \
|
2015-07-16 19:01:07 +02:00
|
|
|
&& mkdir dnscrypt-wrapper \
|
2015-05-30 13:47:20 +02:00
|
|
|
&& cd dnscrypt-wrapper \
|
2015-07-16 19:01:07 +02:00
|
|
|
&& curl -sSL https://github.com/Cofyc/dnscrypt-wrapper/archive/v$DNSCRYPT_VERSION.tar.gz | tar xz --strip 1 \
|
2015-05-30 13:47:20 +02:00
|
|
|
&& make configure \
|
|
|
|
&& ./configure --prefix=/usr \
|
|
|
|
&& make install \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -rf dnscrypt-wrapper \
|
2015-06-17 02:45:02 +02:00
|
|
|
&& apt-get purge --auto-remove -y autoconf \
|
|
|
|
automake \
|
|
|
|
build-essential \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
libevent-dev \
|
2015-05-30 13:47:20 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2016-02-25 03:49:26 +02:00
|
|
|
RUN set -xe \
|
|
|
|
&& mkdir -p /var/lib/dnscrypt-wrapper \
|
2015-05-30 13:47:20 +02:00
|
|
|
&& cd /var/lib/dnscrypt-wrapper \
|
2015-07-16 19:34:44 +02:00
|
|
|
&& dnscrypt-wrapper --gen-provider-keypair > README.txt \
|
2015-07-16 19:20:08 +02:00
|
|
|
&& dnscrypt-wrapper --gen-crypt-keypair --crypt-secretkey-file=1.key \
|
|
|
|
&& dnscrypt-wrapper --gen-cert-file --crypt-secretkey-file=1.key --provider-cert-file=1.cert
|
2015-05-30 13:47:20 +02:00
|
|
|
|
|
|
|
WORKDIR /var/lib/dnscrypt-wrapper
|
|
|
|
VOLUME /var/lib/dnscrypt-wrapper
|
2015-05-30 15:21:24 +02:00
|
|
|
|
2015-05-30 13:47:20 +02:00
|
|
|
EXPOSE 443/tcp 443/udp
|
|
|
|
|
2015-07-16 19:20:08 +02:00
|
|
|
CMD dnscrypt-wrapper --resolver-address=${RESOLVER_ADDR} \
|
2015-05-30 16:22:28 +02:00
|
|
|
--listen-address=${LISTEN_ADDR} \
|
2015-05-30 15:21:24 +02:00
|
|
|
--provider-name=${PROVIDER_NAME} \
|
2015-07-16 19:20:08 +02:00
|
|
|
--crypt-secretkey-file=1.key \
|
|
|
|
--provider-cert-file=1.cert \
|
2015-05-30 16:22:28 +02:00
|
|
|
--verbose
|