aboutsummaryrefslogtreecommitdiffstats
path: root/terminaldweller.com/doh2/Dockerfile
blob: 5b759947703bf9706d8cf1f9d316f3858735787e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM alpine:3.17 as builder
ENV GOPROXY=https://goproxy.io
RUN apk update && apk upgrade
RUN apk add go git
ENV GOPROXY=https://goproxy.io
RUN git clone https://github.com/AdguardTeam/dnsproxy && cd dnsproxy && go build -mod=vendor

FROM alpine:3.17 as certbuilder
RUN apk add openssl
WORKDIR /certs
RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=doh2.terminaldweller.com" -keyout server.key -out server.cert

# FROM gcr.io/distroless/static-debian10
FROM alpine:3.17
COPY --from=certbuilder /certs /certs
COPY --from=builder /dnsproxy/dnsproxy /dnsproxy/dnsproxy
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]