diff --git a/Dockerfile b/Dockerfile index 0aa9d31b891d9b6a5e9303a031399e1d2f44e708..c6369c4af4484bbfab23cdcaf82923b5515c21f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,19 @@ -FROM cznic/knot-resolver +FROM alpine:latest RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \ + echo '@community http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \ apk add --update --no-cache \ + bash \ dma@testing \ + gosu@testing \ iproute2 \ + knot-resolver@community \ knot-utils \ mailx \ - mtr -COPY entrypoint /entrypoint + mtr \ + && \ + ln -s /usr/bin/kdig /usr/local/bin/dig && \ + ln -s /usr/bin/khost /usr/local/bin/host +COPY entrypoint /usr/local/sbin/entrypoint WORKDIR / -ENTRYPOINT [ "/entrypoint" ] +ENTRYPOINT [ "entrypoint" ] CMD [ "bash", "--login" ] diff --git a/entrypoint b/entrypoint index 6523ccbc7f0daecaca08eee2502ce0ab274aac22..658be8223280589de533bd1d010c9ab254442603 100755 --- a/entrypoint +++ b/entrypoint @@ -1,5 +1,5 @@ #!/bin/sh -set -eu -echo "net = { '127.0.0.1', '::1'}" | nohup kresd -f1 & +set -eux +kresd --addr '127.0.0.1' --noninteractive & echo 'nameserver 127.0.0.1' > /etc/resolv.conf -eval "exec $@" +eval "exec gosu nobody:nobody $@"