Select Git revision
platforms.ts
Dockerfile 877 B
FROM docker.io/library/golang:1.18.3-alpine
ARG VERSION=master
RUN true \
&& apk add --no-cache --virtual .build-utils git make \
&& git clone https://git.shivering-isles.com/github-mirror/m13253/dns-over-https.git --depth 1 -b "$VERSION" \
&& cd dns-over-https \
&& make \
&& make install \
&& rm -rf /go/dns-over-https/doh-server \
&& apk del .build-utils \
&& adduser -h /etc/dns-over-https -S doh \
&& chown -R doh /etc/dns-over-https \
&& chmod -R 0700 /etc/dns-over-https \
&& true
COPY ./entrypoint.sh /usr/local/bin/entrypoint
USER doh
ENTRYPOINT ["entrypoint"]
ENV DOH_HEALTHCHECK_DOMAIN="ci-test.dns.shivering-isles.com"
HEALTHCHECK CMD curl "http://localhost:8053/dns-query?name=${DOH_HEALTHCHECK_DOMAIN}&type=A" | grep "127.0.0.123"
EXPOSE 8053
CMD ["doh-server", "-conf", "/etc/dns-over-https/doh-server.conf"]