Skip to content

Commit

Permalink
Revert "[Docker] Attempt to use updated docker build for Rocky."
Browse files Browse the repository at this point in the history
This reverts commit e2128c7.
  • Loading branch information
mikeb01 committed Oct 10, 2024
1 parent e2128c7 commit 54c9b5d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 41 deletions.
1 change: 0 additions & 1 deletion cppbuild/rocky-docker-build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ docker build --tag rocky8-aeron \
--build-arg USER_ID="$(id -u)" \
--build-arg GROUP_ID="$(id -g)" \
--build-arg GCC_VERSION="${GCC_VERSION}" \
--target essentials-test \
"${SOURCE_DIR}/cppbuild/rocky"

docker run --rm --shm-size=1G --network host \
Expand Down
67 changes: 27 additions & 40 deletions cppbuild/rocky/Dockerfile
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

0 comments on commit 54c9b5d

Please sign in to comment.