-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[Docker] Attempt to use updated docker build for Rocky."
This reverts commit e2128c7.
- Loading branch information
Showing
2 changed files
with
27 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,34 @@ | ||
ARG VERSION="8.9" | ||
FROM rockylinux:${VERSION} as builder | ||
|
||
ARG GCC_VERSION="10" | ||
|
||
RUN yum update -y && yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \ | ||
yum update -y && yum install -y \ | ||
scl-utils \ | ||
gcc-toolset-${GCC_VERSION}-gcc \ | ||
gcc-toolset-${GCC_VERSION}-gcc-c++ \ | ||
make \ | ||
tar \ | ||
zlib-devel \ | ||
libuuid-devel \ | ||
git \ | ||
findutils \ | ||
openssl-devel \ | ||
zulu8-jdk | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/java-8-zulu-openjdk \ | ||
BUILD_JAVA_HOME=/usr/lib/jvm/java-8-zulu-openjdk \ | ||
BUILD_JAVA_VERSION=8 \ | ||
GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail" \ | ||
GCC_VERSION=${GCC_VERSION} | ||
FROM rockylinux:8 | ||
|
||
ARG USER_ID | ||
ARG GROUP_ID | ||
ARG CMAKE_VERSION=3.14.7 | ||
ARG GCC_VERSION | ||
|
||
ARG USER_ID="1000" | ||
ARG GROUP_ID="1000" | ||
RUN groupadd --gid $GROUP_ID --non-unique --system athena | ||
RUN adduser --uid $USER_ID --system --create-home --gid $GROUP_ID athena | ||
RUN adduser --uid $USER_ID --system --gid $GROUP_ID athena | ||
|
||
USER athena | ||
WORKDIR /opt/aeron | ||
# Install dev tools | ||
RUN yum install -y scl-utils && \ | ||
yum install -y "gcc-toolset-${GCC_VERSION}-gcc" "gcc-toolset-${GCC_VERSION}-gcc-c++" make findutils git | ||
|
||
FROM builder as essentials-test | ||
ENTRYPOINT scl enable "gcc-toolset-${GCC_VERSION}" -- cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package | ||
# Install Java | ||
RUN yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \ | ||
yum install --disableplugin=subscription-manager -y zulu-8 | ||
|
||
FROM builder as essentials-build | ||
# Install CMake | ||
WORKDIR /opt/tools | ||
RUN curl -o cmake.tar.gz -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && \ | ||
tar xf cmake.tar.gz | ||
|
||
ADD --chown=athena:athena . /opt/aeron | ||
RUN git config --global user.email "[email protected]" | ||
RUN git config --global user.name "Athena (Build Master)" | ||
RUN git config --global core.autocrlf false | ||
RUN git update-index -q --refresh | ||
RUN scl enable "gcc-toolset-${GCC_VERSION}" -- cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package | ||
ENV PATH="$PATH:/opt/tools/cmake-${CMAKE_VERSION}-Linux-x86_64/bin" \ | ||
JAVA_HOME=/usr/lib/jvm/zulu-8 \ | ||
BUILD_JAVA_HOME=/usr/lib/jvm/zulu-8 \ | ||
BUILD_JAVA_VERSION=8 \ | ||
GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail" \ | ||
GCC_VERSION=${GCC_VERSION} | ||
|
||
FROM scratch AS essentials-artifacts | ||
COPY --from=essentials-build /opt/aeron/cppbuild/Release/*.tar.gz / | ||
USER athena | ||
|
||
WORKDIR /opt/aeron | ||
ENTRYPOINT scl enable "gcc-toolset-${GCC_VERSION}" -- cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package |