Commit 1b92bede authored by Marek Vavruša's avatar Marek Vavruša

docker: updated Dockerfile

parent 86cacabc
FROM cznic/knot:latest
FROM cznic/knot:resolver-compat
MAINTAINER Marek Vavrusa <marek.vavrusa@nic.cz>
# Install libuv
RUN mkdir /src; \
git clone https://github.com/libuv/libuv.git /src/libuv; \
cd /src/libuv; \
sh autogen.sh && ./configure && make && make install && ldconfig; \
rm -rf /src/libuv
# Environment
ENV THREADS 4
ENV BUILD_PKGS git-core make gcc libtool autoconf pkg-config liblmdb-dev libcmocka-dev libssl-dev
# Install knot-resolver
RUN apt-get -q -y update; \
apt-get install -q -y \
libcmocka-dev; \
git clone https://gitlab.labs.nic.cz/knot/resolver.git /src/knot-resolver; \
cd /src/knot-resolver; \
autoreconf -if && ./configure && make && make check && make install && ldconfig && \
# Trim down the image
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /src/knot-resolver
# Expose port
EXPOSE 53
# Select entrypoint
WORKDIR /root
CMD ["/usr/local/sbin/kresolved", "-a", "0.0.0.0#53"]
# Expose port
EXPOSE 53
# Install dependencies and sources
RUN apt-get -q -y update && \
apt-get install -q -y ${BUILD_PKGS} && \
# Install libuv
git clone https://github.com/libuv/libuv.git /libuv-src && \
cd /libuv-src && \
sh autogen.sh && \
./configure && \
make -j${THREADS} && \
make install && \
ldconfig && \
# Install knot-resolver
git clone https://gitlab.labs.nic.cz/knot/resolver.git /resolver-src && \
cd /resolver-src && \
sh ./bootstrap && \
./configure && \
make -j${THREADS} && \
make check && \
make install && \
ldconfig && \
# Trim down the image
rm -rf /libuv-src && \
rm -rf /resolver-src && \
apt-get purge -q -y ${BUILD_PKGS} && \
apt-get autoremove -q -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment