-
-
Save tqbf/9a551848ba5b6d0ced847df6fb3985b6 to your computer and use it in GitHub Desktop.
Dockerfile to build knot-resolver with toolchain && utils intact
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian | |
ARG KNOT_DNS_VERSION=v2.9.0 | |
RUN apt-get update -qq && \ | |
apt-get -y -qqq install \ | |
git-core build-essential libtool autoconf pkg-config \ | |
libgnutls28-dev libprotobuf-dev libprotobuf-c-dev libfstrm-dev \ | |
build-essential pkg-config bsdmainutils liblmdb-dev \ | |
libluajit-5.1-dev libuv1-dev libprotobuf-dev libprotobuf-c-dev \ | |
libfstrm-dev luajit lua-http libssl-dev | |
RUN apt-get -y -qqq install meson | |
RUN apt-get -y -qqq install libgnutls30 \ | |
liblmdb0 luajit libluajit-5.1-2 libuv1 lua-http \ | |
lua-http lua-mmdb libfstrm0 lua-cqueues ca-certificates | |
RUN git clone -b $KNOT_DNS_VERSION --depth=1 https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot-dns && \ | |
cd /tmp/knot-dns && \ | |
autoreconf -if && \ | |
./configure --disable-static --disable-fastparser --disable-documentation \ | |
--disable-daemon --disable-utilities --with-lmdb=no && \ | |
make -j4 install && \ | |
ldconfig | |
RUN cd /tmp && \ | |
apt-get install -qqq -y curl && \ | |
mkdir root ; \ | |
curl -O https://secure.nic.cz/files/knot-resolver/knot-resolver-5.1.3.tar.xz && \ | |
tar xf knot-resolver-5.1.3.tar.xz && \ | |
mv knot-resolver-5.1.3 knot-resolver && \ | |
cd /tmp/knot-resolver && \ | |
meson build_docker --buildtype=plain --prefix=/usr --libdir=lib -Dc_args="-O2 -fstack-protector -g" && \ | |
DESTDIR=/tmp/root ninja -C build_docker install && \ | |
cp /tmp/root/usr/share/doc/knot-resolver/examples/config.docker /tmp/root/etc/knot-resolver/kresd.conf && \ | |
cd /tmp/root && tar cf - . | tar xf - -C / | |
COPY kresd.conf /etc/knot-resolver/kresd.conf | |
COPY run-knot.sh /root | |
ENTRYPOINT /root/run-knot.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment