Commit 301833d7 authored by Marek Vavruša's avatar Marek Vavruša

docker: cleanup in tests-extra

parent 2ee3e600
......@@ -22,7 +22,6 @@ cd /knot-src && \
autoreconf -if && \
./configure --disable-static && \
make -j${THREADS} && \
make check && \
make install && \
ldconfig && \
# Trim down the image
......
FROM cznic/knot:latest
MAINTAINER Marek Vavrusa <marek.vavrusa@nic.cz>
# Install dependencies and sources
RUN apt-get -q -y update; \
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/*
# Environment
ENV RUNTIME_PKGS gawk python3 python3-pip bind9 bind9utils valgrind lsof gdb
# Prepare the tests
RUN mkdir /tests; \
# Link the tested executables
mkdir /src; \
ln -sfn /usr/local/sbin/knotd /src/knotd; \
ln -sfn /usr/local/sbin/knotc /src/knotc
# Copy test cases
COPY . /knot-src/tests-extra
# Select entrypoint
WORKDIR /tests
ENTRYPOINT ["/tests/runtests.py"]
WORKDIR /knot-src/tests-extra
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:
---------------------------------
$ 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:
-----------------------------------
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
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