2 # Licensed to the Apache Software Foundation (ASF) under one or more
3 # contributor license agreements. See the NOTICE file distributed with
4 # this work for additional information regarding copyright ownership.
5 # The ASF licenses this file to You under the Apache License, Version 2.0
6 # (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 # Image for building HBase releases. Based on Ubuntu 18.04.
25 # Install extra needed repos and refresh.
27 # This is all in a single "RUN" command so that if anything changes, "apt update" is run to fetch
28 # the most current package versions (instead of potentially using old versions cached by docker).
29 RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y update \
30 && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install --no-install-recommends \
34 libcurl4-openssl-dev='7.58.0-*' \
35 libxml2-dev='2.9.4+dfsg1-*' \
38 python-pip='9.0.1-*' \
39 subversion='1.9.7-*' \
42 && rm -rf /var/lib/apt/lists/* \
43 && update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
45 python-dateutil==2.8.1
47 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
50 ARG MAVEN_VERSION=3.6.3
51 ARG SHA=c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0
52 ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries
53 RUN mkdir -p /opt/maven \
54 && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
55 && echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
56 && tar -xzf /tmp/apache-maven.tar.gz -C /opt/maven --strip-components=1 \
57 && rm -f /tmp/apache-maven.tar.gz \
58 && ln -s /opt/maven/bin/mvn /usr/bin/mvn
60 # Install Apache Yetus
61 ENV YETUS_VERSION 0.12.0
62 RUN curl -L "https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=/yetus/${YETUS_VERSION}/apache-yetus-${YETUS_VERSION}-bin.tar.gz" | \
64 ENV YETUS_HOME /opt/apache-yetus-${YETUS_VERSION}
68 RUN groupadd hbase-rm && \
69 useradd --create-home --shell /bin/bash -p hbase-rm -u $UID $RM_USER && \
70 mkdir /home/$RM_USER/.gnupg && \
71 chown -R $RM_USER:hbase-rm /home/$RM_USER && \
72 chmod -R 700 /home/$RM_USER
74 USER $RM_USER:hbase-rm
75 WORKDIR /home/$RM_USER/hbase-rm/
77 ENTRYPOINT [ "./do-release.sh" ]