Skip to content
Snippets Groups Projects
Commit 301833d7 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

docker: cleanup in tests-extra

parent 2ee3e600
Branches
Tags
2 merge requests!330Knsupdate pubkey processing fix,!328Dockerfiles for Knot DNS & tests
...@@ -22,7 +22,6 @@ cd /knot-src && \ ...@@ -22,7 +22,6 @@ cd /knot-src && \
autoreconf -if && \ autoreconf -if && \
./configure --disable-static && \ ./configure --disable-static && \
make -j${THREADS} && \ make -j${THREADS} && \
make check && \
make install && \ make install && \
ldconfig && \ ldconfig && \
# Trim down the image # Trim down the image
......
FROM cznic/knot:latest FROM cznic/knot:latest
MAINTAINER Marek Vavrusa <marek.vavrusa@nic.cz> MAINTAINER Marek Vavrusa <marek.vavrusa@nic.cz>
# Install dependencies and sources # Environment
RUN apt-get -q -y update; \ ENV RUNTIME_PKGS gawk python3 python3-pip bind9 bind9utils valgrind lsof gdb
apt-get install -q -y \
gawk \
python3 \
python3-pip \
bind9 \
bind9utils \
valgrind \
lsof \
gdb; \
pip3 install dnspython3; \
pip3 install psutil; \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
# Prepare the tests # Copy test cases
RUN mkdir /tests; \ COPY . /knot-src/tests-extra
# Link the tested executables
mkdir /src; \
ln -sfn /usr/local/sbin/knotd /src/knotd; \
ln -sfn /usr/local/sbin/knotc /src/knotc
# Select entrypoint # Select entrypoint
WORKDIR /tests WORKDIR /knot-src/tests-extra
ENTRYPOINT ["/tests/runtests.py"] ENTRYPOINT ["/knot-src/tests-extra/runtests.py"]
# Install dependencies and sources
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/*
...@@ -39,12 +39,11 @@ Run tests on the upstream branch: ...@@ -39,12 +39,11 @@ Run tests on the upstream branch:
--------------------------------- ---------------------------------
$ docker pull cznic/knot:tests-extra # Or build with 'docker build -t tests-extra .' $ docker pull cznic/knot:tests-extra # Or build with 'docker build -t tests-extra .'
$ docker run -it -v $(pwd):/tests cznic/knot:tests-extra basic $ docker run -it -v cznic/knot:tests-extra basic
Run tests on the local executables: Run tests on the local executables:
----------------------------------- -----------------------------------
You can bind-mount the /src with the current working copy. You can bind-mount the /src with the current working copy.
$ docker run -t -v $(pwd)../src:/src $(pwd):/tests cznic/knot-tests-extra basic $ docker run -it -v $(pwd)/..:/knot-src cznic/knot:tests-extra basic
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