-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 1.36 KB
/
Dockerfile
File metadata and controls
41 lines (32 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM debian:stretch-slim
LABEL maintainer="Stephen Price <stephen@stp5.net>"
ENV DNSCRYPT_PROXY_VERSION=2.0.42 \
DNSCRYPT_PROXY_SHA256=a9869b8694e6ea1d22e8a5c1339ddc9541399db5203e63d92e823a004a9b2ccd
ENV UID 1000
ENV GID 1000
ENV TIMEZONE UTC
RUN apt-get update \
&& apt-get install -y curl libcap2-bin
RUN mkdir /tmp/dnscrypt-proxy \
&& curl -fsSL https://github.com/DNSCrypt/dnscrypt-proxy/releases/download/${DNSCRYPT_PROXY_VERSION}/dnscrypt-proxy-linux_x86_64-${DNSCRYPT_PROXY_VERSION}.tar.gz -o /tmp/dnscrypt-proxy/dnscrypt-proxy.tar.gz \
&& cd /tmp/dnscrypt-proxy \
&& echo "${DNSCRYPT_PROXY_SHA256} *dnscrypt-proxy.tar.gz" | sha256sum -c - \
&& tar zxf dnscrypt-proxy.tar.gz \
&& addgroup --gid ${GID} dnscrypt \
&& adduser --system --uid ${UID} --gid ${GID} --home /dnscrypt dnscrypt \
&& mv linux-x86_64/dnscrypt-proxy /dnscrypt/dnscrypt-proxy \
&& chown dnscrypt.dnscrypt /dnscrypt/dnscrypt-proxy \
&& setcap 'cap_net_bind_service=+ep' /dnscrypt/dnscrypt-proxy \
&& cd / \
&& rm -rf /tmp/dnscrypt-proxy \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 53/tcp 53/udp
ENV SERVER_NAMES="'scaleway-fr', 'google', 'yandex', 'cloudflare'"
ENV REQUIRE_DNSSEC=false
ENV LOG_LEVEL=2
USER dnscrypt
ADD ./dnscrypt-proxy.toml /dnscrypt/dnscrypt-proxy.toml
ADD ./run.sh /dnscrypt/run.sh
WORKDIR /dnscrypt
CMD ["./run.sh"]