Dockerfile 767 Bytes
Newer Older
Marek Vavruša's avatar
Marek Vavruša committed
1 2 3
FROM cznic/knot:latest
MAINTAINER Marek Vavrusa <marek.vavrusa@nic.cz>

4 5
# Environment
ENV RUNTIME_PKGS gawk python3 python3-pip bind9 bind9utils valgrind lsof gdb
6

7 8
# Copy test cases
COPY . /knot-src/tests-extra
Marek Vavruša's avatar
Marek Vavruša committed
9 10

# Select entrypoint
11 12 13
WORKDIR /knot-src/tests-extra
ENTRYPOINT ["/knot-src/tests-extra/runtests.py"]

14
# Install dependencies and sources
15 16 17 18 19 20 21 22 23 24 25
RUN apt-get -q -y update && \
apt-get install -q -y ${RUNTIME_PKGS} && \
pip3 install -r /knot-src/tests-extra/requirements.txt && \
# Link the prebuilt executables
mkdir -p /knot-src/src && \
ln -sfn /usr/local/sbin/knotd /knot-src/src/knotd && \
ln -sfn /usr/local/sbin/knotc /knot-src/src/knotc && \
# Trim down the image
apt-get autoremove -q -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*