Skip to content
Snippets Groups Projects
Select Git revision
  • 9a24117aa936f2d827e97c817d8026433780ec47
  • master default protected
  • renovate/m13253-dns-over-https-2.x
3 results

Dockerfile

Blame
  • Dockerfile 877 B
    FROM docker.io/library/golang:1.21.0-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"]