diff --git a/ci/Dockerfile b/ci/Dockerfile
index f1c016d52944f93f153e2831559d09af91f86989..888bc932f0ff49b2f6db56d8ea02d7c047090188 100644
--- a/ci/Dockerfile
+++ b/ci/Dockerfile
@@ -4,12 +4,15 @@ MAINTAINER Knot Resolver <knot-resolver@labs.nic.cz>
 WORKDIR /root
 CMD ["/bin/bash"]
 
+RUN echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
+
 # generic cleanup
 RUN apt-get update -qq
 RUN apt-get upgrade -y -qqq
 
 # Knot and Knot Resolver dependecies
-RUN apt-get install -y -qqq make cmake pkg-config git build-essential bsdmainutils libtool autoconf make pkg-config liburcu-dev libgnutls28-dev libedit-dev liblmdb-dev libcap-ng-dev libsystemd-dev libidn11-dev protobuf-c-compiler libfstrm-dev pkg-config libuv1-dev libcmocka-dev libluajit-5.1-dev lua-sec lua-socket lua-http
+RUN apt-get -t stretch-backports install -y git
+RUN apt-get install -y -qqq make cmake pkg-config build-essential bsdmainutils libtool autoconf make pkg-config liburcu-dev libgnutls28-dev libedit-dev liblmdb-dev libcap-ng-dev libsystemd-dev libidn11-dev protobuf-c-compiler libfstrm-dev pkg-config libuv1-dev libcmocka-dev libluajit-5.1-dev lua-sec lua-socket lua-http
 # documentation dependecies
 RUN apt-get install -y -qqq doxygen python3-sphinx python3-breathe python3-sphinx-rtd-theme