blob: eea37749b03a8a9b270de5acec51b9b3e95f9082 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
FROM centos:7.6.1810
RUN yum -y install epel-release
RUN yum -y install gcc gcc-c++ kernel-devel make autoconf automake libtool which \
java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel\
docker \
python-pip \
file python-devel \
git \
jq \
#Install protobuf
RUN mkdir -p /usr/local/src/ && \
cd /usr/local/src/ && \
curl -sL | tar xz && \
cd protobuf-2.5.0 && \
./ && \
./configure --prefix=/usr && \
make && \
make install && \
protoc --version
#Findbug install
RUN mkdir -p /opt && \
curl -sL | tar -xz && \
mv findbugs-* /opt/findbugs
#Install apache-ant
RUN mkdir -p /opt && \
curl -sL '' | tar -xz && \
mv apache-ant* /opt/ant
#Install apache-maven
RUN curl -sL '' | tar -xz && \
mv apache-maven* /opt/maven
#Install docker-compose (for smoketests)
RUN pip install --upgrade pip
RUN pip install docker-compose
ENV PATH=$PATH:/opt/findbugs/bin:/opt/maven/bin:/opt/ant/bin
#This is a dirty but powerful hack. We don't know which uid will be used inside the container.
#But for the kerberized unit test we need real users. We assume that the uid will be something
# between 1 and 5000 and generate all the required users in advance.
RUN groupadd -g 1000 default && \
mkdir -p /home/user && \
chmod 777 /home/user && \
for i in $(seq 1 5000); do adduser jenkins$i -u $i -g default -d /home/user -N; done
RUN echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN ln -s /home/user/.m2 /root/.m2
#blockade test
RUN pip install virtualenv && virtualenv /opt/blockade && /opt/blockade/bin/pip install pytest==2.8.7 blockade
ENV PATH=$PATH:/opt/blockade/bin
RUN cd /usr/local/bin && \
curl -LO$(curl -s && \
chmod +x ./kubectl
RUN pip install robotframework
RUN curl -sL | tar zxf - && mv mailsend-go-dir/mailsend-go /usr/local/bin/ && rm -rf mailsend-go-dir
RUN curl -L | tar zx && mv flekszible /usr/local/bin && chmod +x /usr/local/bin/flekszible
RUN curl -LSs | tar zxf - hugo && mv hugo /usr/local/bin/ && chmod +x /usr/local/bin/hugo
USER jenkins1000
#This is a very huge local maven cache. Usually the mvn repository is not safe to be
#shared between builds as concurrent "mvn install" executions are not handled very well.
#A simple workaround is to provide all the required 3rd party lib in the docker image
#It will be cached by docker, and any additional dependency can be downloaded, artifacts
#can be installed
#To be sure that we have no dev bits from this build, we will remove org.apache.hadoop files
#from the local maven repository.
RUN cd /tmp && git clone --depth=1 -b master && \
cd /tmp/hadoop-ozone && mvn -B package dependency:go-offline -DskipTests=true && \
rm -rf /home/user/.m2/repository/org/apache/hadoop/*hdds* && \
rm -rf /home/user/.m2/repository/org/apache/hadoop/*ozone* && \
rm -rf /tmp/hadoop-ozone && \
find /home/user/.m2/repository -exec chmod go+wx {} \; # ozone master: 78255ddc7