diff options
author | Samantha Sample <samsample@google.com> | 2019-07-26 10:56:43 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-26 10:57:53 -0700 |
commit | 444a9d9e545f01dc204f1863e91acb8700823c6e (patch) | |
tree | a812152214de367be6eebca02b8dee9c218196e1 /runsc/test/runtimes/java/Dockerfile | |
parent | 7052d21dc45be8ba5ba82117aedc0cb6ecb7c1b7 (diff) |
Publish Dockerfiles and test-runner binaries for running language tests.
By following the directions in the README file, these Dockerfiles can be
built and used to run native language tests for their respective runtimes.
PiperOrigin-RevId: 260174430
Diffstat (limited to 'runsc/test/runtimes/java/Dockerfile')
-rw-r--r-- | runsc/test/runtimes/java/Dockerfile | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/runsc/test/runtimes/java/Dockerfile b/runsc/test/runtimes/java/Dockerfile new file mode 100644 index 000000000..e162d7218 --- /dev/null +++ b/runsc/test/runtimes/java/Dockerfile @@ -0,0 +1,52 @@ +FROM ubuntu:bionic +# This hash is associated with a specific JDK release and needed for ensuring +# the same version is downloaded every time. +ENV LANG_HASH=af47e0398606 +ENV LANG_VER=11u-dev +ENV LANG_NAME=Java + +RUN apt-get update && apt-get install -y \ + autoconf \ + build-essential \ + curl\ + file \ + libasound2-dev \ + libcups2-dev \ + libfontconfig1-dev \ + libx11-dev \ + libxext-dev \ + libxrandr-dev \ + libxrender-dev \ + libxt-dev \ + libxtst-dev \ + make \ + unzip \ + zip + +WORKDIR /root +RUN curl -o go.tar.gz https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz +RUN tar -zxf go.tar.gz + +# Use curl instead of ADD to prevent redownload every time. +RUN curl -o jdk.tar.gz http://hg.openjdk.java.net/jdk-updates/jdk${LANG_VER}/archive/${LANG_HASH}.tar.gz +# Download Java version N-1 to be used as the Boot JDK to build Java version N. +RUN curl -o bootjdk.tar.gz https://download.java.net/openjdk/jdk10/ri/openjdk-10+44_linux-x64_bin_ri.tar.gz + +RUN tar -zxf jdk.tar.gz +RUN tar -zxf bootjdk.tar.gz + +# Specify the JDK to be used by jtreg. +ENV JT_JAVA=/root/jdk${LANG_VER}-${LANG_HASH}/build/linux-x86_64-normal-server-release/jdk +ENV LANG_DIR=/root/jdk${LANG_VER}-${LANG_HASH} + +WORKDIR ${LANG_DIR} + +RUN curl -o jtreg.tar.gz https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact/jtreg-4.2.0-tip.tar.gz +RUN tar -xzf jtreg.tar.gz +RUN bash configure --with-boot-jdk=/root/jdk-10 --with-jtreg=${LANG_DIR}/jtreg +RUN make clean +RUN make images + +COPY proctor-java.go ${LANG_DIR} + +ENTRYPOINT ["/root/go/bin/go", "run", "proctor-java.go"] |