summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorTomas Krizek <tomas.krizek@nic.cz>2018-07-27 13:28:46 +0200
committerPetr Špaček <petr.spacek@nic.cz>2018-08-01 09:46:33 +0200
commitf8735e2a8d56037d27fab48e1bf92bc49a2ff8a8 (patch)
treedb0acef7e0361b0cf6eb319415c7421955f8ab6e /ci
parentci/debian-unstable: simplify image (diff)
downloadknot-resolver-f8735e2a8d56037d27fab48e1bf92bc49a2ff8a8.tar.xz
knot-resolver-f8735e2a8d56037d27fab48e1bf92bc49a2ff8a8.zip
ci: update dockerfiles to support different knot versions
Diffstat (limited to 'ci')
-rw-r--r--ci/README.md14
-rw-r--r--ci/debian-stable/Dockerfile5
-rw-r--r--ci/debian-unstable/Dockerfile5
3 files changed, 20 insertions, 4 deletions
diff --git a/ci/README.md b/ci/README.md
new file mode 100644
index 00000000..7b495ae1
--- /dev/null
+++ b/ci/README.md
@@ -0,0 +1,14 @@
+Docker Build
+------------
+
+* debian-stable / debian-unstable
+
+```
+$ export KNOT_BRANCH=2.6
+$ docker build -t registry.labs.nic.cz/knot/knot-resolver/ci/debian-stable:knot-$KNOT_BRANCH --build-arg KNOT_BRANCH=$KNOT_BRANCH debian-stable
+$ docker build -t registry.labs.nic.cz/knot/knot-resolver/ci/debian-unstable:knot-$KNOT_BRANCH --build-arg KNOT_BRANCH=$KNOT_BRANCH debian-unstable
+
+$ docker login registry.labs.nic.cz
+$ docker push registry.labs.nic.cz/knot/knot-resolver/ci/debian-stable:knot-$KNOT_BRANCH
+$ docker push registry.labs.nic.cz/knot/knot-resolver/ci/debian-unstable:knot-$KNOT_BRANCH
+```
diff --git a/ci/debian-stable/Dockerfile b/ci/debian-stable/Dockerfile
index 09374425..9aa700a8 100644
--- a/ci/debian-stable/Dockerfile
+++ b/ci/debian-stable/Dockerfile
@@ -1,5 +1,6 @@
FROM debian:stable
MAINTAINER Knot Resolver <knot-resolver@labs.nic.cz>
+ARG KNOT_BRANCH=master
WORKDIR /root
CMD ["/bin/bash"]
@@ -33,11 +34,11 @@ RUN pip3 install -r /tmp/deckard-req.txt
# build and install latest version of Knot DNS
# (kresd depends on libknot and libdnssec)
-RUN git clone --depth=1 --branch=2.6 https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot
+RUN git clone --depth=1 --branch=$KNOT_BRANCH https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot
WORKDIR /tmp/knot
RUN pwd
RUN autoreconf -if
-RUN ./configure
+RUN ./configure --prefix=/usr
RUN make
RUN make install
RUN ldconfig
diff --git a/ci/debian-unstable/Dockerfile b/ci/debian-unstable/Dockerfile
index 69a2932d..3c473e89 100644
--- a/ci/debian-unstable/Dockerfile
+++ b/ci/debian-unstable/Dockerfile
@@ -1,5 +1,6 @@
FROM debian:unstable
MAINTAINER Knot Resolver <knot-resolver@labs.nic.cz>
+ARG KNOT_BRANCH=master
WORKDIR /root
CMD ["/bin/bash"]
@@ -13,11 +14,11 @@ RUN apt-get install -y -qqq make cmake pkg-config git build-essential bsdmainuti
# build and install latest version of Knot DNS
# (kresd depends on libknot and libdnssec)
-RUN git clone --depth=1 --branch=2.6 https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot
+RUN git clone --depth=1 --branch=$KNOT_BRANCH https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot
WORKDIR /tmp/knot
RUN pwd
RUN autoreconf -if
-RUN ./configure
+RUN ./configure --prefix=/usr
RUN make
RUN make install
RUN ldconfig