Commit abb0608e authored by nimrod's avatar nimrod
Browse files

Move from the knot image to Alpine.

The builds have been broken for a while. Because the knot image is based
on Debian. Use Alpine instead (not because I'm sure the image will be
smaller or better, but it's less work to keep the existing Alpine
stuff).
Also, run as a limited user.
parent 3a2cedf7
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
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" ]
+3 −3
Original line number Diff line number Diff line
#!/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 $@"