| FROM rockylinux:8 AS rockylinux8-nojdk | |
| ARG TARGETARCH | |
| # Install required packages. | |
| COPY google-cloud-sdk.repo /etc/yum.repos.d/google-cloud-sdk.repo | |
| RUN dnf -y install 'dnf-command(config-manager)' && \ | |
| dnf config-manager --set-enabled powertools && \ | |
| dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ | |
| dnf -y install \ | |
| bind-utils \ | |
| clang \ | |
| clang-tools-extra \ | |
| dpkg-dev \ | |
| ed \ | |
| file \ | |
| gcc \ | |
| gcc-c++ \ | |
| git \ | |
| glibc-langpack-en \ | |
| glibc-locale-source \ | |
| gnupg2 \ | |
| google-cloud-cli \ | |
| iproute \ | |
| lcov \ | |
| llvm \ | |
| openssl-perl \ | |
| patch \ | |
| python38 \ | |
| python38-PyYAML \ | |
| python38-requests \ | |
| python38-six \ | |
| rpm-build \ | |
| sudo \ | |
| unzip \ | |
| which \ | |
| zip \ | |
| && \ | |
| dnf clean all | |
| # Allow using sudo inside the container. | |
| RUN echo "ALL ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers | |
| # Ensure that Bazel can use its beloved ISO-8859-1 locale. | |
| RUN localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1 | |
| # Bazelisk | |
| COPY --from=tools --chmod=0755 bazelisk-linux-${TARGETARCH} /usr/local/bin/bazel | |
| # Buildifier | |
| COPY --from=tools --chmod=0755 buildifier-linux-${TARGETARCH} /usr/local/bin/buildifier | |
| FROM rockylinux8-nojdk AS rockylinux8-nojdk-devtoolset10 | |
| RUN dnf -y install gcc-toolset-10 scl-utils && dnf clean all | |
| FROM rockylinux8-nojdk AS rockylinux8-java8 | |
| RUN dnf -y install java-1.8.0-openjdk-devel && dnf clean all | |
| FROM rockylinux8-nojdk AS rockylinux8-java11 | |
| RUN dnf -y install https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \ | |
| dnf -y install zulu11-jdk && \ | |
| dnf clean all | |
| FROM rockylinux8-nojdk-devtoolset10 AS rockylinux8-java11-devtoolset10 | |
| RUN dnf -y install https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \ | |
| dnf -y install zulu11-jdk && \ | |
| dnf clean all | |
| FROM rockylinux8-nojdk-devtoolset10 AS rockylinux8 | |
| RUN dnf -y install https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \ | |
| dnf -y install zulu21-jdk && \ | |
| dnf clean all | |
| FROM rockylinux8-java11-devtoolset10 AS rockylinux8-releaser | |
| # dpkg-source needs a GNU tar version >= 1.28.0 because of --sort=name. | |
| # Technically this is no longer necessary as we moved from CentOS 7 to | |
| # Rocky Linux 8, since the latter comes with tar 1.3.0. | |
| # However, I'm keeping it for now for consistency reasons. | |
| RUN pushd /usr/local/src && \ | |
| curl -fsSL http://ftp.gnu.org/gnu/tar/tar-1.34.tar.bz2 | tar xvj && \ | |
| cd tar-1.34 && \ | |
| FORCE_UNSAFE_CONFIGURE=1 ./configure && \ | |
| make -j && \ | |
| make install && \ | |
| popd && \ | |
| rm -rf /usr/local/src/tar-1.34 && \ | |
| ln -s tar /usr/local/bin/gtar |