add dockerfile
This commit is contained in:
commit
50aeffaf5e
1 changed files with 40 additions and 0 deletions
40
Dockerfile.openj9
Normal file
40
Dockerfile.openj9
Normal file
|
@ -0,0 +1,40 @@
|
|||
FROM ubuntu:24.04 AS build
|
||||
|
||||
# partly copied from mkdocker.sh
|
||||
# Copyright IBM Corp (Eclipse Public License 2.0)
|
||||
RUN apt update \
|
||||
&& apt upgrade -y \
|
||||
&& apt install -qq -y --no-install-recommends \
|
||||
ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file g++-13 gcc-13 gdb git \
|
||||
libasound2-dev libcups2-dev libdwarf-dev libelf-dev libexpat1-dev libffi-dev libfontconfig libfontconfig1-dev \
|
||||
libfreetype6-dev libnuma-dev libssl-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev \
|
||||
make nasm pkg-config python3 python3-dev systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /build
|
||||
RUN mkdir /build/bootjdk /build/dist \
|
||||
&& wget --progress=dot:mega -O jdk21.tar.gz \
|
||||
https://api.adoptopenjdk.net/v3/binary/latest/21/ga/linux/x64/jdk/openj9/normal/adoptopenjdk \
|
||||
&& tar -xzf jdk21.tar.gz --directory=/build/bootjdk --strip-components=1 \
|
||||
&& rm -f jdk21.tar.gz
|
||||
|
||||
RUN git clone --single-branch --depth 1 \
|
||||
https://github.com/ibmruntimes/openj9-openjdk-jdk21.git \
|
||||
/build/src
|
||||
|
||||
WORKDIR /build/src
|
||||
RUN bash get_source.sh
|
||||
RUN bash configure --with-boot-jdk=/build/bootjdk --with-mixedrefs=static --with-openssl=system
|
||||
RUN make all
|
||||
|
||||
RUN mv /build/src/build/linux-x86_64-server-release/images/* /build/dist/
|
||||
|
||||
# ------
|
||||
|
||||
FROM debian:12-slim AS run
|
||||
|
||||
COPY --from=build /build/dist/jdk/ /var/lib/jvm/openj9-jdk21
|
||||
RUN ln -s /var/lib/jvm/openj9-jdk21/bin/java /usr/bin/java
|
||||
ENV JAVA_HOME=/var/lib/jvm/openj9-jdk21
|
||||
|
||||
# ------
|
Loading…
Add table
Reference in a new issue