Skip to content

Commit

Permalink
Upgrade to Java 17 (apache#353)
Browse files Browse the repository at this point in the history
* Upgrade from Java 11 to Java 17
* fix: rust-toolchain was renamed rust-toolchain.toml
* fix: Repo for centos moved to vault.centos.org
  • Loading branch information
Steve Vaughan Jr authored and GitHub Enterprise committed Aug 8, 2024
1 parent 9622c16 commit a91d77b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions dev/Dockerfile-stage1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ FROM docker-upstream.apple.com/centos:centos7.9.2009

USER root

# Fix repo
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

# Install Rust toolchain
RUN yum -y update
RUN yum -y install epel-release
Expand Down Expand Up @@ -34,8 +38,8 @@ RUN curl -k https://pages.github.pie.apple.com/crypto-services/trust-apple-corp-
RUN rpm --import https://java.apple.com/applejdk/RPM-GPG-KEY-AppleJDK
RUN curl -o /etc/yum.repos.d/AppleJDK.repo https://java.apple.com/applejdk/AppleJDK.repo
RUN yum -y update
RUN yum -y install applejdk-11
ENV JAVA_HOME="/usr/lib/jvm/applejdk-11"
RUN yum -y install applejdk-17
ENV JAVA_HOME="/usr/lib/jvm/applejdk-17"
ENV PATH="$JAVA_HOME/bin:${PATH}"

# Install rustup
Expand All @@ -46,7 +50,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup install nightly && cargo +nightly install cargo2junit

# Use Rust toolchain, and seed Rust
COPY rust-toolchain /rust-toolchain
COPY rust-toolchain.toml /rust-toolchain.toml
RUN cargo search

# llvm-toolset-7-clang is too old (clang 5) which cannot work with latest MacOSX sdk.
Expand Down
4 changes: 2 additions & 2 deletions dev/Dockerfile-ubi8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.apple.com/base-images/ubi8/java11-builder
FROM docker.apple.com/base-images/ubi8/java17-builder

USER root

Expand Down Expand Up @@ -30,7 +30,7 @@ RUN cd /tmp && curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Use Rust toolchain, and seed Rust
COPY rust-toolchain /rust-toolchain
COPY rust-toolchain.toml /rust-toolchain.toml
RUN cargo search

# Build OSXCross
Expand Down

0 comments on commit a91d77b

Please sign in to comment.