diff --git a/Dockerfile b/Dockerfile index 7cf951b5ae5d1c827c9332cc6787287df29317cf..114fe2b69742432ca8f68be5498781a8cf4eb746 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,12 @@ RUN true \ && git clone https://github.com/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 /go/dns-over-https/doh-server -S doh \ + && 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 @@ -23,4 +27,4 @@ HEALTHCHECK CMD curl "http://localhost:8053/dns-query?name=${DOH_HEALTHCHECK_DOM EXPOSE 8053 -CMD ["./dns-over-https/doh-server/doh-server"] +CMD ["doh-server", "-conf", "/etc/dns-over-https/doh-server.conf"] diff --git a/entrypoint.sh b/entrypoint.sh index 80ce4bd064d97f8e4380296f0bbb28f60b79863e..dea6b90006c218f86bb423f32daedb73ae18fb12 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,8 +4,7 @@ if [ "$UPSTREAM_NAME" != "" ]; then UPSTREAM="$(getent hosts "$UPSTREAM_NAME" | awk '{print $1}'):53" fi -#cat > ./dns-over-https/doh-server/doh-server.conf <<EOF -cat > ./doh-server.conf <<EOF +cat > /etc/dns-over-https/doh-server.conf <<EOF # HTTP listen port listen = [