From c81052b70888eb18dca82e33444ebbd9910f5ebc Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Sat, 14 Jan 2023 08:00:53 +0330 Subject: update --- terminaldweller.com/doh2/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 terminaldweller.com/doh2/Dockerfile (limited to 'terminaldweller.com/doh2/Dockerfile') diff --git a/terminaldweller.com/doh2/Dockerfile b/terminaldweller.com/doh2/Dockerfile new file mode 100644 index 0000000..5b75994 --- /dev/null +++ b/terminaldweller.com/doh2/Dockerfile @@ -0,0 +1,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"] -- cgit v1.2.3