-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (21 loc) · 840 Bytes
/
Dockerfile
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
FROM alpine:3.14 AS builder
ENV VERSION "2.1.5"
ARG TARGETARCH
ENV URL "https://github.com/jedisct1/dnscrypt-proxy/releases/download/${VERSION}/dnscrypt-proxy-linux_${TARGETARCH}-${VERSION}.tar.gz"
RUN apk update \
&& apk add curl
COPY get.sh .
RUN sh get.sh
#RUN curl -L ${URL} -o dnscrypt-proxy.tar.gz \
#&& tar xvfz dnscrypt-proxy.tar.gz \
#&& cp linux-${TARGETARCH}/dnscrypt-proxy . \
#&& cp linux-${TARGETARCH}/example-dnscrypt-proxy.toml . \
#&& sed "s/^listen_addresses.*/listen_addresses = [':5300']/" example-dnscrypt-proxy.toml > dnscrypt-proxy.toml
FROM alpine:3.14
WORKDIR /opt/dnscrypt-proxy
COPY --from=builder dnscrypt-proxy .
COPY --from=builder dnscrypt-proxy.toml .
EXPOSE 5300/tcp
EXPOSE 5300/udp
ENTRYPOINT ["/opt/dnscrypt-proxy/dnscrypt-proxy"]
CMD ["-config", "/opt/dnscrypt-proxy/dnscrypt-proxy.toml"]