Skip to content

Instantly share code, notes, and snippets.

@GavinRay97
Created September 21, 2022 15:00
Show Gist options
  • Save GavinRay97/778dd5c511030820020897568b63ee7f to your computer and use it in GitHub Desktop.
Save GavinRay97/778dd5c511030820020897568b63ee7f to your computer and use it in GitHub Desktop.
OpenJDK build environment
FROM quay.io/fedora/fedora:38
# Install requirements for building OpenJDK from source
RUN dnf install -y \
file \
diffutils \
alsa-lib-devel \
cups-devel \
fontconfig-devel \
freetype-devel \
libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel \
&& dnf group install -y "Development Tools" \
&& dnf group install -y "C Development Tools and Libraries"
# Fetch JDK 19 for bootstrapping from sdkman
RUN curl -s "https://get.sdkman.io" | bash
RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk install java 19-open"
ENV JAVA_HOME=/root/.sdkman/candidates/java/current
# Configure the build
RUN bash configure --build=x86_64-unknown-linux-gnu --openjdk-target=x86_64-unknown-linux-gnu
# Make the images
RUN make images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment