diff --git a/scripts/Dockerfile b/scripts/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..64f554562e07a1292539ddbfdb9a2c153f5c6868 --- /dev/null +++ b/scripts/Dockerfile @@ -0,0 +1,34 @@ +FROM debian:jessie +MAINTAINER Marek Vavrusa <marek.vavrusa@nic.cz> + +# Nprocs +ENV THREADS 2 + +# Install dependencies and sources +RUN apt-get -y update; \ +apt-get install -y \ +build-essential \ +git-core \ +libtool \ +autoconf \ +flex \ +bison \ +libssl-dev \ +liburcu-dev \ +pkg-config \ +liblmdb-dev; \ +# Fetch sources +mkdir /src; \ +git clone https://gitlab.labs.nic.cz/labs/knot.git /src/knot; \ +# Compile sources in the right order +cd /src/knot && autoreconf -if && ./configure && make -j${THREADS} && make install && ldconfig; \ +# Trim down the image +apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /src + +# Select entrypoint +WORKDIR /root +ENTRYPOINT "/usr/local/sbin/knotd" +CMD ["--help"] + +# Expose port +EXPOSE 53