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

Merge branch 'docker' into resolver_improvements

Conflicts:
	scripts/Dockerfile
parents 18e0e048 0383ca67
No related branches found
No related tags found
1 merge request!329Resolver improvements
......@@ -17,13 +17,15 @@ libssl-dev \
liburcu-dev \
pkg-config \
liblmdb-dev; \
# Fetch sources
mkdir /src; \
# Trim down the image
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
# Fetch and compile sources
RUN mkdir /src; \
git clone -b resolver_improvements 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
rm -rf /src
# Select entrypoint
WORKDIR /root
......
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 \
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
RUN mkdir /tests; \
# Link the tested executables
mkdir /src; \
ln -sfn /usr/local/sbin/knotd /src/knotd; \
ln -sfn /usr/local/bin/knotc /src/knotc; \
# Select entrypoint
WORKDIR /tests
ENTRYPOINT ["/tests/runtests.py"]
......@@ -27,3 +27,23 @@ Allow ptrace:
or
change file /etc/sysctl.d/10-ptrace.conf
kernel.yama.ptrace_scope = 0
Running in docker container:
----------------------------
There is a Dockerfile that can be used to build containers with the tests-extra,
the main benefit is that each test runs in an isolated container and can be run in parallel.
Run tests on the upstream branch:
---------------------------------
$ docker pull cznic/knot:tests-extra # Or build with 'docker build -t tests-extra .'
$ docker run -v $(pwd):/tests cznic/knot:tests-extra basic
Run tests on the local executables:
-----------------------------------
You can bind-mount the /src with the current working copy.
$ docker run -v $(pwd)../src:/src $(pwd):/tests cznic/knot-tests-extra basic
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment