Dockerfile 4.63 KB
Newer Older
1
FROM @SOURCE_IMAGE@
2
3
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
4
ENV LIBUV_VERSION 1.33.1
5
6
7
ENV ATF_VERSION 0.21
ENV LUTOK_VERSION 0.4
ENV KYUA_VERSION 0.13
Ondřej Surý's avatar
Ondřej Surý committed
8
RUN apt-get -y update
9
RUN apt-get -y dist-upgrade
10
RUN apt-get -y install curl
11
RUN if [ -n "@CLANG@" ] && [ "@VERSION@" != "sid" ]; then \
Ondřej Surý's avatar
Ondřej Surý committed
12
	curl -sSL -o /etc/apt/trusted.gpg.d/llvm.asc https://apt.llvm.org/llvm-snapshot.gpg.key; \
13
	echo "deb http://apt.llvm.org/@VERSION@/ llvm-toolchain-@VERSION@ main" > /etc/apt/sources.list.d/llvm.list; \
14
	echo "deb http://apt.llvm.org/@VERSION@/ llvm-toolchain-@VERSION@-9 main" >> /etc/apt/sources.list.d/llvm.list; \
15
16
17
18
19
20
21
	echo "deb http://apt.llvm.org/@VERSION@/ llvm-toolchain-@VERSION@-10 main" >> /etc/apt/sources.list.d/llvm.list; \
	fi
RUN if [ -n "@CLANG" ] && [ "@VERSION@" = "sid" ]; then \
	curl -sSL -o /etc/apt/trusted.gpg.d/llvm.asc https://apt.llvm.org/llvm-snapshot.gpg.key; \
	echo "deb http://apt.llvm.org/unstable/ llvm-toolchain main" > /etc/apt/sources.list.d/llvm.list; \
	echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-9 main" >> /etc/apt/sources.list.d/llvm.list; \
	echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-10 main" >> /etc/apt/sources.list.d/llvm.list; \
22
	fi
23
RUN if [ -n "@COCCINELLE@" ]; then \
Ondřej Surý's avatar
Ondřej Surý committed
24
25
	curl -sSL -o /etc/apt/trusted.gpg.d/coccinelle.gpg https://packages.sury.org/coccinelle/apt.gpg; \
	echo "deb https://packages.sury.org/coccinelle/ @VERSION@ main" > /etc/apt/sources.list.d/coccinelle.list; \
26
	fi
27
28
RUN apt-get -y update
RUN apt-get -y dist-upgrade
Witold Krecicki's avatar
Witold Krecicki committed
29
30
31
32
33
RUN apt-get -y install		\
	autoconf		\
	automake		\
	autotools-dev		\
	bash-completion		\
Ondřej Surý's avatar
Ondřej Surý committed
34
	bc			\
35
	bear			\
Witold Krecicki's avatar
Witold Krecicki committed
36
37
38
	bison			\
	build-essential		\
	ccache			\
39
	clang			\
40
	cppcheck		\
41
	docbook-xsl		\
42
	gdb			\
Witold Krecicki's avatar
Witold Krecicki committed
43
	git			\
44
	idn2			\
Witold Krecicki's avatar
Witold Krecicki committed
45
	libcap2-dev		\
Ondřej Surý's avatar
Ondřej Surý committed
46
	libcmocka-dev		\
Witold Krecicki's avatar
Witold Krecicki committed
47
48
49
	libdb-dev		\
	libgeoip-dev		\
	libidn2-0-dev		\
50
	libio-socket-inet6-perl	\
Witold Krecicki's avatar
Witold Krecicki committed
51
	libjson-c-dev		\
52
	libjson-perl		\
Witold Krecicki's avatar
Witold Krecicki committed
53
54
55
56
57
58
59
60
61
	libkrb5-dev		\
	libldap2-dev		\
	liblmdb-dev		\
	liblua5.1-0-dev		\
	liblua5.2-dev		\
	libnet-dns-perl		\
	libtool			\
	libsqlite3-dev		\
	libssl-dev		\
62
	libxml-simple-perl	\
Witold Krecicki's avatar
Witold Krecicki committed
63
	libxml2-dev		\
64
	libxml2-utils		\
Witold Krecicki's avatar
Witold Krecicki committed
65
66
67
68
	net-tools		\
	perl			\
	pkg-config		\
	procps			\
69
70
71
	python			\
	python-ply		\
	python-dnspython	\
Witold Krecicki's avatar
Witold Krecicki committed
72
73
74
	python3			\
	python3-ply		\
	python3-dnspython	\
75
76
	python3-sphinx		\
	python3-sphinx-rtd-theme	\
Witold Krecicki's avatar
Witold Krecicki committed
77
	sudo			\
78
	xsltproc		\
79
	zip			\
80
	zlib1g-dev
Ondřej Surý's avatar
Ondřej Surý committed
81
RUN if [ -n "@COCCINELLE@" ]; then apt -y install coccinelle; fi
82
RUN if [ "@VERSION@" != "jessie" ]; then apt-get -y install libmaxminddb-dev libuv1-dev; fi
83
84
RUN if [ -n "@CLANG@" ]; then \
	apt-get -y install \
85
86
87
88
89
90
		llvm-9 \
		lldb-9 \
		clang-9 \
		clang-tools-9 \
		clang-format-9 \
		clang-tidy-9; \
91
	fi
92
93
94
95
96
97
98
99
100
RUN if [ -n "@CLANG@" ]; then \
	apt-get -y install \
		llvm-10 \
		lldb-10 \
		clang-10 \
		clang-tools-10 \
		clang-format-10 \
		clang-tidy-10; \
	fi
101
102
103
104
105
106
107
108
109
RUN if [ -n "@CLANG@" ]; then \
	apt-get -y install \
		llvm-11 \
		lldb-11 \
		clang-11 \
		clang-tools-11 \
		clang-format-11 \
		clang-tidy-11; \
	fi
110
111
112
RUN if [ "@VERSION@" = "sid" ]; then \
	apt-get -y install \
		llvm \
113
		lldb \
114
115
116
		clang \
		clang-tools \
		clang-format \
117
		clang-tidy; \
118
	fi
Michal Nowak's avatar
Michal Nowak committed
119
120
121
122
123
124
# At least python3-lmdb in Debian sid is too old for respdiff
# (reported as https://bugs.debian.org/951336).
RUN if [ "@VERSION@" = "sid" ]; then \
	apt-get -y install python3-pip; \
	pip3 install -r https://gitlab.labs.nic.cz/knot/respdiff/raw/master/requirements.txt; \
	fi
125
RUN if [ -n "@UNCRUSTIFY@" ]; then apt-get -y install uncrustify; fi
126
RUN if [ -n "@DNSTAP@" ]; then apt-get -y install libfstrm-dev libprotobuf-c-dev protobuf-c-compiler; fi
127
128
RUN if [ "@SOFTHSM@" -ge "2" ]; then apt-get -y install libsofthsm2 softhsm2; fi
RUN if [ "@SOFTHSM@" -lt "2" ]; then apt-get -y install libsofthsm softhsm; fi
129
130
RUN if [ "@VERSION@" = "jessie" ]; then curl -sSL https://github.com/libuv/libuv/archive/v$LIBUV_VERSION.tar.gz | tar -xz -C /usr/src; fi
RUN if [ "@VERSION@" = "jessie" ]; then cd /usr/src/libuv-$LIBUV_VERSION && ./autogen.sh && ./configure --prefix /usr && make && make install; fi
131
RUN curl -sSL https://github.com/jmmv/atf/releases/download/atf-$ATF_VERSION/atf-$ATF_VERSION.tar.gz | tar -xz -C /usr/src
132
133
RUN cd /usr/src/atf-$ATF_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN ldconfig
134
RUN curl -sSL https://github.com/jmmv/lutok/releases/download/lutok-$LUTOK_VERSION/lutok-$LUTOK_VERSION.tar.gz | tar -xz -C /usr/src
135
136
RUN cd /usr/src/lutok-$LUTOK_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN ldconfig
137
RUN curl -sSL https://github.com/jmmv/kyua/releases/download/kyua-$KYUA_VERSION/kyua-$KYUA_VERSION.tar.gz | tar -xz -C /usr/src
138
RUN cd /usr/src/kyua-$KYUA_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
139
RUN ldconfig