You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.1 KiB
Docker

FROM centos:7.6.1810
ARG GCC_VERSION=10.2-2020.11
ENV MAVEN_VERSION 3.9.1
ENV SOURCE_DIR /root/source
ENV WORKSPACE_DIR /root/workspace
ENV PROJECT_DIR /root/workspace/project
# We want to have git 2.x for the maven scm plugin and also for boringssl
RUN yum install -y http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
RUN yum -y install epel-release
# Install requirements
RUN yum install -y \
apr-devel \
autoconf \
automake \
bzip2 \
git \
glibc-devel \
golang \
gnupg \
libtool \
lsb-core \
ninja-build \
make \
perl \
tar \
unzip \
wget \
zip
RUN mkdir $SOURCE_DIR
WORKDIR $SOURCE_DIR
# Install Java
RUN yum install -y java-1.8.0-openjdk-devel golang
ENV JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk/"
# Install aarch64 gcc 10.2 toolchain
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-a/$GCC_VERSION/binrel/gcc-arm-$GCC_VERSION-x86_64-aarch64-none-linux-gnu.tar.xz && \
tar xvf gcc-arm-$GCC_VERSION-x86_64-aarch64-none-linux-gnu.tar.xz && mv gcc-arm-$GCC_VERSION-x86_64-aarch64-none-linux-gnu /opt/
ENV PATH="/opt/gcc-arm-$GCC_VERSION-x86_64-aarch64-none-linux-gnu/bin:${PATH}"
# Install CMake
RUN yum install -y cmake3 && ln -s /usr/bin/cmake3 /usr/bin/cmake
# install rust and setup PATH and install correct toolchain
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="$HOME/.cargo/bin:${PATH}"
RUN /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
# Setup the correct linker
RUN echo '[target.aarch64-unknown-linux-gnu]' >> /root/.cargo/config
RUN echo 'linker = "aarch64-none-linux-gnu-gcc"' >> /root/.cargo/config
# Downloading and installing SDKMAN!
RUN curl -s "https://get.sdkman.io" | bash
# Installing Java and Maven, removing some unnecessary SDKMAN files
RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \
yes | sdk install maven $MAVEN_VERSION && \
rm -rf $HOME/.sdkman/archives/* && \
rm -rf $HOME/.sdkman/tmp/*"
# Cleanup
RUN rm -rf $SOURCE_DIR
RUN yum clean all && \
rm -rf /var/cache/yum
# Prepare our own build
ENV PATH /root/.sdkman/candidates/maven/current:$PATH