Skip to content

Instantly share code, notes, and snippets.

@tivrfoa
Forked from GavinRay97/Dockerfile
Created September 25, 2022 10:11
Show Gist options
  • Save tivrfoa/6183fad877042e1452e2d371187595a0 to your computer and use it in GitHub Desktop.
Save tivrfoa/6183fad877042e1452e2d371187595a0 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