@@ -32,56 +32,20 @@ RUN echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras
3232ENV DEBIAN_FRONTEND noninteractive
3333ENV DEBCONF_TERSE true
3434
35- # hadolint ignore=DL3008
35+ # #####
36+ # Platform package dependency resolver
37+ # #####
38+ COPY pkg-resolver pkg-resolver
39+ RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
40+ && chmod a+r pkg-resolver/*.json
41+
42+ # #####
43+ # Install packages from apt
44+ # #####
45+ # hadolint ignore=DL3008,SC2046
3646RUN apt-get -q update \
37- && apt-get -q install -y --no-install-recommends \
38- ant \
39- apt-utils \
40- bats \
41- build-essential \
42- bzip2 \
43- clang \
44- cmake \
45- curl \
46- doxygen \
47- fuse \
48- g++ \
49- gcc \
50- git \
51- gnupg-agent \
52- hugo \
53- libbcprov-java \
54- libbz2-dev \
55- libcurl4-openssl-dev \
56- libfuse-dev \
57- libprotobuf-dev \
58- libprotoc-dev \
59- libsasl2-dev \
60- libsnappy-dev \
61- libssl-dev \
62- libtool \
63- libzstd-dev \
64- locales \
65- make \
66- maven \
67- nodejs \
68- node-yarn \
69- npm \
70- openjdk-11-jdk \
71- openjdk-8-jdk \
72- pinentry-curses \
73- pkg-config \
74- python3 \
75- python3-pip \
76- python3-pkg-resources \
77- python3-setuptools \
78- python3-wheel \
79- rsync \
80- shellcheck \
81- software-properties-common \
82- sudo \
83- valgrind \
84- zlib1g-dev \
47+ && apt-get -q install -y --no-install-recommends python3 \
48+ && apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py ubuntu:focal) \
8549 && apt-get clean \
8650 && rm -rf /var/lib/apt/lists/*
8751
@@ -97,89 +61,16 @@ ENV MAVEN_HOME /usr
9761ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
9862
9963# ######
100- # Install SpotBugs 4.2.2
64+ # Set env vars for SpotBugs 4.2.2
10165# ######
102- RUN mkdir -p /opt/spotbugs \
103- && curl -L -s -S https://github.com/spotbugs/spotbugs/releases/download/4.2.2/spotbugs-4.2.2.tgz \
104- -o /opt/spotbugs.tgz \
105- && tar xzf /opt/spotbugs.tgz --strip-components 1 -C /opt/spotbugs \
106- && chmod +x /opt/spotbugs/bin/*
10766ENV SPOTBUGS_HOME /opt/spotbugs
10867
10968# ######
110- # Install Boost 1.72 (1.71 ships with Focal)
69+ # Set env vars for Google Protobuf 3.7.1
11170# ######
112- # hadolint ignore=DL3003
113- RUN mkdir -p /opt/boost-library \
114- && curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download > boost_1_72_0.tar.bz2 \
115- && mv boost_1_72_0.tar.bz2 /opt/boost-library \
116- && cd /opt/boost-library \
117- && tar --bzip2 -xf boost_1_72_0.tar.bz2 \
118- && cd /opt/boost-library/boost_1_72_0 \
119- && ./bootstrap.sh --prefix=/usr/ \
120- && ./b2 --without-python install \
121- && cd /root \
122- && rm -rf /opt/boost-library
123-
124- # #####
125- # Install Google Protobuf 3.7.1 (3.6.1 ships with Focal)
126- # #####
127- # hadolint ignore=DL3003
128- RUN mkdir -p /opt/protobuf-src \
129- && curl -L -s -S \
130- https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz \
131- -o /opt/protobuf.tar.gz \
132- && tar xzf /opt/protobuf.tar.gz --strip-components 1 -C /opt/protobuf-src \
133- && cd /opt/protobuf-src \
134- && ./configure --prefix=/opt/protobuf \
135- && make "-j$(nproc)" \
136- && make install \
137- && cd /root \
138- && rm -rf /opt/protobuf-src
13971ENV PROTOBUF_HOME /opt/protobuf
14072ENV PATH "${PATH}:/opt/protobuf/bin"
14173
142- # ###
143- # Install pylint and python-dateutil
144- # ###
145- RUN pip3 install pylint==2.6.0 python-dateutil==2.8.1
146-
147- # ###
148- # Install bower
149- # ###
150- # hadolint ignore=DL3008
151- RUN npm install -g bower@1.8.8
152-
153- # ##
154- # Install hadolint
155- # ###
156- RUN curl -L -s -S \
157- https://github.com/hadolint/hadolint/releases/download/v1.11.1/hadolint-Linux-x86_64 \
158- -o /bin/hadolint \
159- && chmod a+rx /bin/hadolint \
160- && shasum -a 512 /bin/hadolint | \
161- awk '$1!="734e37c1f6619cbbd86b9b249e69c9af8ee1ea87a2b1ff71dccda412e9dac35e63425225a95d71572091a3f0a11e9a04c2fc25d9e91b840530c26af32b9891ca" {exit(1)}'
162-
163- # #####
164- # Intel ISA-L 2.29.0
165- # #####
166- # hadolint ignore=DL3003,DL3008
167- RUN mkdir -p /opt/isa-l-src \
168- && apt-get -q update \
169- && apt-get install -y --no-install-recommends automake yasm \
170- && apt-get clean \
171- && curl -L -s -S \
172- https://github.com/intel/isa-l/archive/v2.29.0.tar.gz \
173- -o /opt/isa-l.tar.gz \
174- && tar xzf /opt/isa-l.tar.gz --strip-components 1 -C /opt/isa-l-src \
175- && cd /opt/isa-l-src \
176- && ./autogen.sh \
177- && ./configure \
178- && make "-j$(nproc)" \
179- && make install \
180- && cd /root \
181- && rm -rf /opt/isa-l-src
182-
18374# ##
18475# Avoid out of memory errors in builds
18576# ##
@@ -188,6 +79,16 @@ ENV MAVEN_OPTS -Xms256m -Xmx3072m
18879# Skip gpg verification when downloading Yetus via yetus-wrapper
18980ENV HADOOP_SKIP_YETUS_VERIFICATION true
19081
82+ # ###
83+ # Install packages
84+ # ###
85+ RUN pkg-resolver/install-common-pkgs.sh
86+ RUN pkg-resolver/install-spotbugs.sh ubuntu:focal
87+ RUN pkg-resolver/install-boost.sh ubuntu:focal
88+ RUN pkg-resolver/install-protobuf.sh ubuntu:focal
89+ RUN pkg-resolver/install-hadolint.sh ubuntu:focal
90+ RUN pkg-resolver/install-intel-isa-l.sh ubuntu:focal
91+
19192# ##
19293# Everything past this point is either not needed for testing or breaks Yetus.
19394# So tell Yetus not to read the rest of the file:
0 commit comments