Skip to content

Commit

Permalink
Replace usage of mirrorlist with baseurl (#878)
Browse files Browse the repository at this point in the history
Motivation:

We can't use the default mirrorlist anymore as it will fail and so fail
the docker build

Modifications:

Use baseurl with the correct vault

Result:

Docker image can be build again
  • Loading branch information
normanmaurer authored Aug 5, 2024
1 parent c9231f2 commit fcda2f7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docker/Dockerfile.cross_compile_aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ ENV GCC_VERSION $gcc_version
ENV OPENSSL_VERSION $openssl_version
ENV MAVEN_VERSION 3.9.1
ENV APR_VERSION $apr_version
ENV CMAKE_VERSION_BASE 3.26
ENV CMAKE_VERSION $CMAKE_VERSION_BASE.4

RUN mkdir $SOURCE_DIR
WORKDIR $SOURCE_DIR

# Update to use the vault
RUN sed -i -e 's/^mirrorlist/#mirrorlist/g' -e 's/^#baseurl=http:\/\/mirror.centos.org\/centos\/$releasever\//baseurl=https:\/\/linuxsoft.cern.ch\/centos-vault\/\/7.6.1810\//g' /etc/yum.repos.d/CentOS-Base.repo

# 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

Expand All @@ -31,9 +36,6 @@ RUN set -x && \
mv gcc-arm-$GCC_VERSION-x86_64-aarch64-none-linux-gnu /
ENV PATH="/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

# Cross compile Apache Apr for aarch64 - static
RUN set -x && \
wget --no-check-certificate https://downloads.apache.org//apr/apr-$APR_VERSION.tar.gz && \
Expand Down Expand Up @@ -69,6 +71,9 @@ RUN set -x && \
make && make install && \
popd

# Install cmake
RUN curl -s https://cmake.org/files/v$CMAKE_VERSION_BASE/cmake-$CMAKE_VERSION-linux-x86_64.tar.gz --output cmake-$CMAKE_VERSION-linux-x86_64.tar.gz && tar zvxf cmake-$CMAKE_VERSION-linux-x86_64.tar.gz && mv cmake-$CMAKE_VERSION-linux-x86_64 /opt/ && echo 'PATH=/opt/cmake-$CMAKE_VERSION-linux-x86_64/bin:$PATH' >> ~/.bashrc

# Downloading and installing SDKMAN!
RUN curl -s "https://get.sdkman.io" | bash

Expand Down

0 comments on commit fcda2f7

Please sign in to comment.