Skip to content

Commit

Permalink
Use AdoptOpenJDK OpenJ9 build as the boot jdk
Browse files Browse the repository at this point in the history
AdoptOpenJDK OpenJ9 build is used as the boot jdk:
1) arm-linux-aarch64 (x64_linux):
https://api.adoptopenjdk.net/openjdk8-openj9/releases/x64_linux/latest/binary
2) arm-linux-gnueabihf (x64_linux):
https://api.adoptopenjdk.net/openjdk8-openj9/releases/x64_linux/latest/binary
3) ppc64le (ppc64le_linux):
https://api.adoptopenjdk.net/openjdk8-openj9/releases/ppc64le_linux/latest/binary
4) s390x (s390x_linux):
https://api.adoptopenjdk.net/openjdk8-openj9/releases/s390x_linux/latest/binary
5) x86_64 (x64_linux):
https://api.adoptopenjdk.net/openjdk8-openj9/releases/x64_linux/latest/binary

For s390x and ppc64le, the base image is changed to "ubuntu:16.04".

[skip ci]

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
  • Loading branch information
babsingh committed Apr 5, 2018
1 parent 4589894 commit 2ff0027
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 12 deletions.
16 changes: 13 additions & 3 deletions buildenv/docker/jdk9/aarch64_CC/arm-linux-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ RUN apt-get update \
libxt-dev \
libxtst-dev \
make \
openjdk-8-jdk \
pkg-config \
qemu \
realpath \
Expand All @@ -68,6 +67,13 @@ RUN cd /root \
&& tar -xzf freemarker.tgz freemarker-2.3.8/lib/freemarker.jar --strip=2 \
&& rm -f freemarker.tgz

# Download and install boot JDK from AdoptOpenJDK
RUN cd /root \
&& wget -O bootjdk8.tar.gz https://api.adoptopenjdk.net/openjdk8-openj9/releases/x64_linux/latest/binary \
&& tar -xzf bootjdk8.tar.gz \
&& rm -f bootjdk8.tar.gz \
&& ls | grep -i jdk | xargs -I % sh -c 'mv % bootjdk8'

# get the toolchain
RUN cd /root \
&& wget https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/aarch64-linux-gnu/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz \
Expand Down Expand Up @@ -122,11 +128,15 @@ RUN cd /root/debs \
# Env vars set here will be visibile in the running container, so can be
# used to convey configuration information to the build scripts.

# Set environment variable JAVA_HOME, and prepend ${JAVA_HOME}/bin to PATH
ENV JAVA_HOME="/root/bootjdk8"
ENV PATH="${JAVA_HOME}/bin:${PATH}"

# Directory containing the cross compilation tool chain
ENV OPENJ9_CC_DIR /root/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu
ENV OPENJ9_CC_DIR="/root/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu"

# Prefix for the cross compilation tools (without the trailing '-')
ENV OPENJ9_CC_PREFIX aarch64-linux-gnu
ENV OPENJ9_CC_PREFIX="aarch64-linux-gnu"

# Add the toolchain bin dir to the PATH for convenience
ENV PATH="${PATH}:${OPENJ9_CC_DIR}/bin"
Expand Down
16 changes: 13 additions & 3 deletions buildenv/docker/jdk9/armhf_CC/arm-linux-gnueabihf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ RUN apt-get update \
libxt-dev \
libxtst-dev \
make \
openjdk-8-jdk \
pkg-config \
qemu \
realpath \
Expand All @@ -68,6 +67,13 @@ RUN cd /root \
&& tar -xzf freemarker.tgz freemarker-2.3.8/lib/freemarker.jar --strip=2 \
&& rm -f freemarker.tgz

# Download and install boot JDK from AdoptOpenJDK
RUN cd /root \
&& wget -O bootjdk8.tar.gz https://api.adoptopenjdk.net/openjdk8-openj9/releases/x64_linux/latest/binary \
&& tar -xzf bootjdk8.tar.gz \
&& rm -f bootjdk8.tar.gz \
&& ls | grep -i jdk | xargs -I % sh -c 'mv % bootjdk8'

# get the toolchain
RUN cd /root \
&& wget https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz \
Expand Down Expand Up @@ -122,11 +128,15 @@ RUN cd /root/debs \
# Env vars set here will be visibile in the running container, so can be
# used to convey configuration information to the build scripts.

# Set environment variable JAVA_HOME, and prepend ${JAVA_HOME}/bin to PATH
ENV JAVA_HOME="/root/bootjdk8"
ENV PATH="${JAVA_HOME}/bin:${PATH}"

# Directory containing the cross compilation tool chain
ENV OPENJ9_CC_DIR /root/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf
ENV OPENJ9_CC_DIR="/root/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf"

# Prefix for the cross compilation tools (without the trailing '-')
ENV OPENJ9_CC_PREFIX arm-linux-gnueabihf
ENV OPENJ9_CC_PREFIX="arm-linux-gnueabihf"

# Add the toolchain bin dir to the PATH for convenience
ENV PATH="${PATH}:${OPENJ9_CC_DIR}/bin"
Expand Down
15 changes: 13 additions & 2 deletions buildenv/docker/jdk9/ppc64le/ubuntu16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017, 2017 IBM Corp. and others
# Copyright (c) 2017, 2018 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -22,7 +22,7 @@
# docker build -t=openj9 .
# docker run -it openj9

FROM ppc64le/ibmjava:8-sdk
FROM ubuntu:16.04

# Install required OS tools
RUN apt-get update \
Expand Down Expand Up @@ -74,4 +74,15 @@ RUN cd /root \
&& tar -xzf freemarker.tgz freemarker-2.3.8/lib/freemarker.jar --strip=2 \
&& rm -f freemarker.tgz

# Download and install boot JDK from AdoptOpenJDK
RUN cd /root \
&& wget -O bootjdk8.tar.gz https://api.adoptopenjdk.net/openjdk8-openj9/releases/ppc64le_linux/latest/binary \
&& tar -xzf bootjdk8.tar.gz \
&& rm -f bootjdk8.tar.gz \
&& ls | grep -i jdk | xargs -I % sh -c 'mv % bootjdk8'

# Set environment variable JAVA_HOME, and prepend ${JAVA_HOME}/bin to PATH
ENV JAVA_HOME="/root/bootjdk8"
ENV PATH="${JAVA_HOME}/bin:${PATH}"

WORKDIR /root
15 changes: 13 additions & 2 deletions buildenv/docker/jdk9/s390x/ubuntu16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017, 2017 IBM Corp. and others
# Copyright (c) 2017, 2018 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -22,7 +22,7 @@
# docker build -t=openj9 .
# docker run -it openj9

FROM s390x/ibmjava:8-sdk
FROM ubuntu:16.04

# Install required OS tools
RUN apt-get update \
Expand Down Expand Up @@ -73,4 +73,15 @@ RUN cd /root \
&& tar -xzf freemarker.tgz freemarker-2.3.8/lib/freemarker.jar --strip=2 \
&& rm -f freemarker.tgz

# Download and install boot JDK from AdoptOpenJDK
RUN cd /root \
&& wget -O bootjdk8.tar.gz https://api.adoptopenjdk.net/openjdk8-openj9/releases/s390x_linux/latest/binary \
&& tar -xzf bootjdk8.tar.gz \
&& rm -f bootjdk8.tar.gz \
&& ls | grep -i jdk | xargs -I % sh -c 'mv % bootjdk8'

# Set environment variable JAVA_HOME, and prepend ${JAVA_HOME}/bin to PATH
ENV JAVA_HOME="/root/bootjdk8"
ENV PATH="${JAVA_HOME}/bin:${PATH}"

WORKDIR /root
14 changes: 12 additions & 2 deletions buildenv/docker/jdk9/x86_64/ubuntu16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017, 2017 IBM Corp. and others
# Copyright (c) 2017, 2018 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -48,7 +48,6 @@ RUN apt-get update \
libxt-dev \
libxtst-dev \
make \
openjdk-8-jdk \
pkg-config \
realpath \
ssh \
Expand All @@ -75,4 +74,15 @@ RUN cd /root \
&& tar -xzf freemarker.tgz freemarker-2.3.8/lib/freemarker.jar --strip=2 \
&& rm -f freemarker.tgz

# Download and install boot JDK from AdoptOpenJDK
RUN cd /root \
&& wget -O bootjdk8.tar.gz https://api.adoptopenjdk.net/openjdk8-openj9/releases/x64_linux/latest/binary \
&& tar -xzf bootjdk8.tar.gz \
&& rm -f bootjdk8.tar.gz \
&& ls | grep -i jdk | xargs -I % sh -c 'mv % bootjdk8'

# Set environment variable JAVA_HOME, and prepend ${JAVA_HOME}/bin to PATH
ENV JAVA_HOME="/root/bootjdk8"
ENV PATH="${JAVA_HOME}/bin:${PATH}"

WORKDIR /root

0 comments on commit 2ff0027

Please sign in to comment.