gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/images/runtimes/java21/Dockerfile.x86_64 (about) 1 FROM ubuntu:jammy 2 3 RUN apt-get update && apt-get install -y \ 4 autoconf \ 5 build-essential \ 6 ca-certificates-java \ 7 curl \ 8 java-common \ 9 make \ 10 openjdk-21-jdk \ 11 unzip \ 12 zip 13 14 # Download the JDK source which contains the tests. 15 # Proctor expects this to be in /root/jdk. 16 WORKDIR /root 17 RUN set -ex \ 18 && curl -fsSL --retry 10 -o /tmp/jdk.tar.gz https://github.com/openjdk/jdk21u/archive/refs/tags/jdk-21.0.3-ga.tar.gz \ 19 && tar -zxzf /tmp/jdk.tar.gz \ 20 && mv jdk21u-jdk-21.0.3-ga /root/jdk \ 21 && rm -f /tmp/jdk.tar.gz 22 23 # Install jtreg 7.4 and add to PATH. 24 # 25 # NOTE: While upgrading jdk version, if this jtreg version does not build 26 # openjdk correctly, try using a recent version of jtreg that does work. 27 # 28 # ALSO NOTE: The installed location of the JDK is annoyingly path dependant, 29 # and is "/usr/lib/jvm/java-21-openjdk-amd64" on x86_64 but "-aarch64" on 30 # ARM64. The `build.sh` step below uses a wildcard to work around the fact that 31 # we don't know the full path. 32 ARG COMMIT=c40e6ea6d47dcdabba8715a6f70c55d89bdce693 33 RUN set -ex \ 34 && curl -fsSL --retry 10 -o jtreg.tar.gz https://github.com/openjdk/jtreg/archive/${COMMIT}.tar.gz \ 35 && tar -zxvf jtreg.tar.gz \ 36 && mv jtreg-${COMMIT} jtreg \ 37 && bash jtreg/make/build.sh --jdk /usr/lib/jvm/java-21-openjdk-* \ 38 && rm -f jtreg.tar.gz 39 40 ENV PATH="/root/jtreg/build/images/jtreg/bin:$PATH"