Skip to content

Latest commit

 

History

History
108 lines (80 loc) · 4.71 KB

graalvm-ce-container-images.md

File metadata and controls

108 lines (80 loc) · 4.71 KB
layout toc_group link_title permalink
docs
container-images
Container Images
/docs/getting-started/container-images/

GraalVM Community Edition Container Images

To support container-based development, GraalVM Community Edition container images are published in the GitHub Container Registry.

Repositories

There are different GraalVM Community Edition container images provided depending on the architecture and the Java version. The container image repositories for the latest GraalVM versions (GraalVM for JDK 17, GraalVM for JDK 20, and GraalVM for JDK 21) have a -community suffix. These are: native-image-community, jdk-community, truffleruby-community, nodejs-community, and graalpy-community. The container images are multi-arch, for AMD64 and AArch64 processor architectures, with a choice of Oracle Linux versions 7, 8, or 9.

GraalVM is installed in /usr/lib64/graalvm/graalvm-java<$FeatureVersion> where <$FeatureVersion> is 17, 21, etc. For instance, GraalVM for JDK 21 is installed in /usr/lib64/graalvm/graalvm-java21. All binaries, including java, javac, native-image, and other binaries are available as global commands via the alternatives command.

See a full list of GraalVM Community Edition container images here.

Tags

Each repository provides multiple tags that let you choose the level of stability you need including the Java version, build number, and the Oracle Linux version. Image tags use the following naming convention:

$version[-muslib(for native image only)][-$platform][-$buildnumber]

The following tags are listed from the most-specific tag (at the top) to the least-specific tag (at the bottom). The most-specific tag is unique and always points to the same image, while the less-specific tags point to newer image variants over time.

21.0.0-ol9-20230919
21.0.0-ol9
21.0.0
21-ol9
21

Pulling Images

  1. To pull the container image for GraalVM JDK for a specific JDK feature version, e.g, 21, run:

    docker pull ghcr.io/graalvm/jdk-community:21

    Alternatively, to use the container image as the base image in your Dockerfile, use:

    FROM ghcr.io/graalvm/jdk-community:21

    You have pulled a size compact GraalVM Community Edition container image with the GraalVM JDK and the Graal compiler pre-installed.

  2. To pull the container image with the native-image utility for a specific JDK feature version, e.g, 21, run:

    docker pull ghcr.io/graalvm/native-image-community:21

    Alternatively, to pull the container image with the native-image utility with the musl libc toolchain to create fully statically linked executables, use:

    docker pull ghcr.io/graalvm/native-image-community:21-muslib

    Alternatively, to use the container image as the base image in your Dockerfile, use:

    FROM ghcr.io/graalvm/native-image-community:21-muslib
  3. To verify, start the container and enter the Bash session:

    docker run -it --rm --entrypoint /bin/bash ghcr.io/graalvm/native-image-community:21

    To check the version of GraalVM and its installed location, run the env command from the Bash prompt:

    env

    The output shows the environment variable JAVA_HOME pointing to the installed GraalVM version and location.

    To check the Java version, run:

    java -version

    To check the native-image version, run:

    native-image --version
  4. Calling docker pull without specifying a processor architecture pulls container images for the processor architecture that matches your Docker client. To pull container images for a different platform architecture, specify the desired platform architecture with the --platform option and either linux/amd64 or linux/aarch64 as follows:

    docker pull --platform linux/aarch64 ghcr.io/graalvm/native-image-community:21

Oracle GraalVM Container Images

Oracle GraalVM container images are published in the Oracle Container Registry under the GraalVM Free Terms and Conditions (GFTC) license. Learn more at Oracle Help Center.

Learn More