Dockerfile 5.13 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
ENV ATF_VERSION 0.21
ENV LUTOK_VERSION 0.4
Michal Nowak's avatar
Michal Nowak committed
7
ENV KYUA_GIT_COMMIT @KYUA_GIT_COMMIT@
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 \
12
	apt-get -y install apt-transport-https; \
Ondřej Surý's avatar
Ondřej Surý committed
13
	curl -sSL -o /etc/apt/trusted.gpg.d/llvm.asc https://apt.llvm.org/llvm-snapshot.gpg.key; \
14
	echo "deb http://apt.llvm.org/@VERSION@/ llvm-toolchain-@VERSION@ main" > /etc/apt/sources.list.d/llvm.list; \
15
	echo "deb http://apt.llvm.org/@VERSION@/ llvm-toolchain-@VERSION@-9 main" >> /etc/apt/sources.list.d/llvm.list; \
16
17
	echo "deb http://apt.llvm.org/@VERSION@/ llvm-toolchain-@VERSION@-10 main" >> /etc/apt/sources.list.d/llvm.list; \
	fi
Michał Kępień's avatar
Michał Kępień committed
18
RUN if [ -n "@CLANG@" ] && [ "@VERSION@" = "sid" ]; then \
19
	apt-get -y install apt-transport-https; \
20
21
22
23
	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; \
24
	fi
25
RUN if [ -n "@COCCINELLE@" ]; then \
Ondřej Surý's avatar
Ondřej Surý committed
26
27
	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; \
28
	fi
29
30
RUN apt-get -y update
RUN apt-get -y dist-upgrade
Witold Krecicki's avatar
Witold Krecicki committed
31
32
33
34
35
RUN apt-get -y install		\
	autoconf		\
	automake		\
	autotools-dev		\
	bash-completion		\
Ondřej Surý's avatar
Ondřej Surý committed
36
	bc			\
37
	bear			\
Witold Krecicki's avatar
Witold Krecicki committed
38
39
40
	bison			\
	build-essential		\
	ccache			\
41
	clang			\
42
	cppcheck		\
43
	docbook-xsl		\
44
	gdb			\
Witold Krecicki's avatar
Witold Krecicki committed
45
	git			\
46
	idn2			\
Witold Krecicki's avatar
Witold Krecicki committed
47
	libcap2-dev		\
Ondřej Surý's avatar
Ondřej Surý committed
48
	libcmocka-dev		\
Witold Krecicki's avatar
Witold Krecicki committed
49
50
51
	libdb-dev		\
	libgeoip-dev		\
	libidn2-0-dev		\
52
	libio-socket-inet6-perl	\
Witold Krecicki's avatar
Witold Krecicki committed
53
	libjson-c-dev		\
54
	libjson-perl		\
Witold Krecicki's avatar
Witold Krecicki committed
55
56
57
58
59
60
61
62
63
	libkrb5-dev		\
	libldap2-dev		\
	liblmdb-dev		\
	liblua5.1-0-dev		\
	liblua5.2-dev		\
	libnet-dns-perl		\
	libtool			\
	libsqlite3-dev		\
	libssl-dev		\
64
	libxml-simple-perl	\
Witold Krecicki's avatar
Witold Krecicki committed
65
	libxml2-dev		\
66
	libxml2-utils		\
Witold Krecicki's avatar
Witold Krecicki committed
67
68
69
70
	net-tools		\
	perl			\
	pkg-config		\
	procps			\
71
72
73
	python			\
	python-ply		\
	python-dnspython	\
Witold Krecicki's avatar
Witold Krecicki committed
74
75
76
	python3			\
	python3-ply		\
	python3-dnspython	\
77
78
	python3-sphinx		\
	python3-sphinx-rtd-theme	\
Witold Krecicki's avatar
Witold Krecicki committed
79
	sudo			\
80
	xsltproc		\
81
	zip			\
82
	zlib1g-dev
Ondřej Surý's avatar
Ondřej Surý committed
83
RUN if [ -n "@COCCINELLE@" ]; then apt -y install coccinelle; fi
84
RUN if [ "@VERSION@" != "jessie" ]; then apt-get -y install libmaxminddb-dev libuv1-dev; fi
85
86
RUN if [ -n "@CLANG@" ]; then \
	apt-get -y install \
87
88
89
90
91
92
		llvm-9 \
		lldb-9 \
		clang-9 \
		clang-tools-9 \
		clang-format-9 \
		clang-tidy-9; \
93
	fi
94
95
96
97
98
99
100
101
102
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
103
RUN if [ -n "@CLANG@" ] && [ "@ARCH@" != "arm64" ]; then \
104
105
106
107
108
109
110
111
	apt-get -y install \
		llvm-11 \
		lldb-11 \
		clang-11 \
		clang-tools-11 \
		clang-format-11 \
		clang-tidy-11; \
	fi
112
113
114
RUN if [ "@VERSION@" = "sid" ]; then \
	apt-get -y install \
		llvm \
115
		lldb \
116
117
118
		clang \
		clang-tools \
		clang-format \
119
		clang-tidy; \
120
	fi
Michal Nowak's avatar
Michal Nowak committed
121
RUN if [ "@VERSION@" = "sid" ]; then apt-get -y install python3-dpkt python3-lmdb python3-numpy python3-scipy python3-tabulate; fi
122
RUN if [ -n "@UNCRUSTIFY@" ]; then apt-get -y install uncrustify; fi
123
RUN if [ -n "@DNSTAP@" ]; then apt-get -y install libfstrm-dev libprotobuf-c-dev protobuf-c-compiler; fi
124
125
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
126
RUN if [ "@VERSION@" = "sid" ]; then apt-get -y install shellcheck; fi
127
128
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
129
RUN curl -sSL https://github.com/jmmv/atf/releases/download/atf-$ATF_VERSION/atf-$ATF_VERSION.tar.gz | tar -xz -C /usr/src
130
131
RUN cd /usr/src/atf-$ATF_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN ldconfig
132
RUN curl -sSL https://github.com/jmmv/lutok/releases/download/lutok-$LUTOK_VERSION/lutok-$LUTOK_VERSION.tar.gz | tar -xz -C /usr/src
133
134
RUN cd /usr/src/lutok-$LUTOK_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN ldconfig
Michal Nowak's avatar
Michal Nowak committed
135
136
RUN curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src
RUN cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && ./configure --prefix /usr && make && make install && cd .. && rm -rf /usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}"
137
RUN ldconfig
Michal Nowak's avatar
Michal Nowak committed
138
139
140
141
142
# FIXME: This is Debian bug https://bugs.debian.org/952596. Before
# it gets fixed we patch with a Fedora version of the upstream fix
# (the upstream one does not apply cleanly).
RUN if [ "@VERSION@" = "sid" ]; then \
	apt-get -y install abi-compliance-checker abi-dumper w3m; \
143
	curl -s https://src.fedoraproject.org/rpms/abi-dumper/raw/master/f/0001-Support-for-new-elfutils-Fedora-30.patch | patch /usr/bin/abi-dumper; \
Michal Nowak's avatar
Michal Nowak committed
144
	fi