Dockerfile 4.83 KB
Newer Older
1
FROM @SOURCE_IMAGE@
2
3
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
4
5
ENV ATF_VERSION 0.21
ENV LUTOK_VERSION 0.4
Michal Nowak's avatar
Michal Nowak committed
6
ENV KYUA_GIT_COMMIT @KYUA_GIT_COMMIT@
Ondřej Surý's avatar
Ondřej Surý committed
7
RUN apt-get -y update
8
RUN apt-get -y dist-upgrade
9
RUN apt-get -y install curl
10
RUN if [ -n "@CLANG@" ] && [ "@VERSION@" != "sid" ]; then \
11
	apt-get -y install apt-transport-https; \
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
	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
17
RUN if [ -n "@CLANG@" ] && [ "@VERSION@" = "sid" ]; then \
18
	apt-get -y install apt-transport-https; \
19
20
21
22
	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; \
23
	fi
24
RUN if [ -n "@COCCINELLE@" ]; then \
Ondřej Surý's avatar
Ondřej Surý committed
25
26
	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; \
27
	fi
28
29
RUN apt-get -y update
RUN apt-get -y dist-upgrade
Witold Krecicki's avatar
Witold Krecicki committed
30
31
32
33
34
RUN apt-get -y install		\
	autoconf		\
	automake		\
	autotools-dev		\
	bash-completion		\
Ondřej Surý's avatar
Ondřej Surý committed
35
	bc			\
36
	bear			\
Witold Krecicki's avatar
Witold Krecicki committed
37
38
39
	bison			\
	build-essential		\
	ccache			\
40
	clang			\
41
	cppcheck		\
42
	docbook-xsl		\
43
	gdb			\
Witold Krecicki's avatar
Witold Krecicki committed
44
	git			\
45
	idn2			\
Witold Krecicki's avatar
Witold Krecicki committed
46
	libcap2-dev		\
Ondřej Surý's avatar
Ondřej Surý committed
47
	libcmocka-dev		\
Witold Krecicki's avatar
Witold Krecicki committed
48
49
50
	libdb-dev		\
	libgeoip-dev		\
	libidn2-0-dev		\
51
	libio-socket-inet6-perl	\
Witold Krecicki's avatar
Witold Krecicki committed
52
	libjson-c-dev		\
53
	libjson-perl		\
Witold Krecicki's avatar
Witold Krecicki committed
54
55
56
57
58
	libkrb5-dev		\
	libldap2-dev		\
	liblmdb-dev		\
	liblua5.1-0-dev		\
	liblua5.2-dev		\
59
	libmaxminddb-dev	\
Witold Krecicki's avatar
Witold Krecicki committed
60
61
62
63
	libnet-dns-perl		\
	libtool			\
	libsqlite3-dev		\
	libssl-dev		\
64
	libuv1-dev		\
65
	libxml-simple-perl	\
Witold Krecicki's avatar
Witold Krecicki committed
66
	libxml2-dev		\
67
	libxml2-utils		\
Witold Krecicki's avatar
Witold Krecicki committed
68
69
70
71
	net-tools		\
	perl			\
	pkg-config		\
	procps			\
72
73
74
	python			\
	python-ply		\
	python-dnspython	\
Witold Krecicki's avatar
Witold Krecicki committed
75
76
77
	python3			\
	python3-ply		\
	python3-dnspython	\
78
79
	python3-sphinx		\
	python3-sphinx-rtd-theme	\
Witold Krecicki's avatar
Witold Krecicki committed
80
	sudo			\
81
	xsltproc		\
82
	zip			\
83
	zlib1g-dev
Ondřej Surý's avatar
Ondřej Surý committed
84
RUN if [ -n "@COCCINELLE@" ]; then apt -y install coccinelle; 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
RUN curl -sSL https://github.com/jmmv/atf/releases/download/atf-$ATF_VERSION/atf-$ATF_VERSION.tar.gz | tar -xz -C /usr/src
128
129
RUN cd /usr/src/atf-$ATF_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN ldconfig
130
RUN curl -sSL https://github.com/jmmv/lutok/releases/download/lutok-$LUTOK_VERSION/lutok-$LUTOK_VERSION.tar.gz | tar -xz -C /usr/src
131
132
RUN cd /usr/src/lutok-$LUTOK_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN ldconfig
Michal Nowak's avatar
Michal Nowak committed
133
134
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}"
135
RUN ldconfig
Michal Nowak's avatar
Michal Nowak committed
136
137
138
139
140
# 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; \
141
	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
142
	fi
143
RUN if [ "@VERSION@" = "sid" ]; then pip3 install compiledb; fi