Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
layout: docs
toc_group: container-images
link_title: Container Images
permalink: /getting-started/container-images/
redirect_from: /docs/getting-started/container-images/
permalink: /docs/getting-started/container-images/
redirect_from: /getting-started/container-images/
---

## GraalVM Community Edition Container Images
Expand All @@ -17,7 +17,7 @@ These are: **native-image-community**, **jdk-community**, **truffleruby-communit
The container images are multi-arch, for x64 and AArch64 processor architectures, with a choice of Oracle Linux versions 8 or 9.

GraalVM is installed in _/usr/lib64/graalvm/graalvm-community-java&lt;$FeatureVersion&gt;/_ where `<$FeatureVersion>` is `17`, `21`, `24`, and so on.
For instance, GraalVM for JDK 24 is installed in _/usr/lib64/graalvm/graalvm-community-java24/_.
For instance, GraalVM for JDK 24 is installed in _/usr/lib64/graalvm/graalvm-community-java24/_.
All binaries, including `java`, `javac`, `native-image`, and other binaries are available as global commands via the `alternatives` command.

> Note: For GraalVM non-RPM based images (**graalvm-community**, **python-community**, **truffleruby-community**), the installation location is under _/opt/_ (_/opt/graalvm-community-java&lt;$FeatureVersion&gt;/_, _/opt/truffleruby-&lt;$GRAALVM_VERSION&gt;/_, and _/opt/graalpy-&lt;$GRAALVM_VERSION&gt;/_ respectively).
Expand All @@ -28,13 +28,13 @@ See a full list of GraalVM Community Edition container images [here](https://git

## 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.
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:
```bash
$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 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.
For example:
```
Expand All @@ -51,23 +51,23 @@ For example:
```bash
docker pull ghcr.io/graalvm/jdk-community:24
```

Alternatively, to use the container image as the base image in your Dockerfile, use:
```bash
FROM ghcr.io/graalvm/jdk-community:24
```
You have pulled a size compact GraalVM Community Edition container image with the GraalVM JDK and the Graal compiler preinstalled.

2. To pull the container image with the `native-image` utility for a specific JDK feature version, such as _24_, run:
2. To pull the container image with the `native-image` utility for a specific JDK feature version, such as _24_, run:
```bash
docker pull ghcr.io/graalvm/native-image-community:24
```

Alternatively, to pull the container image with the `native-image` utility with the `musl libc` toolchain to create fully statically linked executables, use:
```bash
docker pull ghcr.io/graalvm/native-image-community:24-muslib
```

Alternatively, to use the container image as the base image in your Dockerfile, use:
```bash
FROM ghcr.io/graalvm/native-image-community:24-muslib
Expand All @@ -88,7 +88,7 @@ For example:
```bash
java -version
```

To check the `native-image` version, run:
```bash
native-image --version
Expand All @@ -99,9 +99,9 @@ For example:
docker pull --platform linux/aarch64 ghcr.io/graalvm/native-image-community:24
```

## Oracle GraalVM Container Images
## Oracle GraalVM Container Images

Oracle GraalVM container images are published in the [Oracle Container Registry](https://container-registry.oracle.com/ords/ocr/ba/graalvm) under the [GraalVM Free Terms and Conditions (GFTC) license](https://www.oracle.com/downloads/licenses/graal-free-license.html).
Oracle GraalVM container images are published in the [Oracle Container Registry](https://container-registry.oracle.com/ords/ocr/ba/graalvm) under the [GraalVM Free Terms and Conditions (GFTC) license](https://www.oracle.com/downloads/licenses/graal-free-license.html).
Learn more at the [Oracle Help Center](https://docs.oracle.com/en/graalvm/jdk/24/docs/getting-started/container-images/).

### Related Documentation
Expand Down
7 changes: 2 additions & 5 deletions docs/reference-manual/native-image/guides/guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ layout: ni-docs-landing
toc_group: how-to-guides
link_title: Guides
permalink: /guides/
redirect_from:
- /native-image/guides/
- /reference-manual/native-image/guides/
---

# Guides

These guides help developers get started with GraalVM Native Image, acquaint them with available features, and describe potential usage scenarios.
These guides help developers get started with GraalVM Native Image, acquaint them with available features, and describe potential usage scenarios.
Here you will learn how to:

- [Access Environment Variables](access-environment-variables.md)
Expand All @@ -33,7 +30,7 @@ Here you will learn how to:
- [Include Resources in a Native Executable](include-resources.md)
- [Optimize a Native Executable with Profile-Guided Optimization](optimize-native-executable-with-pgo.md)
- [Optimize a Native Executable for File Size](optimize-file-size.md)
- [Optimize Size of a Native Executable using Build Reports](optimize-native-executable-size-using-build-report.md)
- [Optimize Size of a Native Executable Using Build Reports](optimize-native-executable-size-using-build-report.md)
- [Optimize Memory Footprint of a Native Executable](optimize-memory-footprint.md)
- [Specify Class Initialization Explicitly](specify-class-initialization.md)
- [Use Gradle to Build a Native Executable from a Java Application](https://graalvm.github.io/native-build-tools/latest/gradle-plugin-quickstart.html)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
layout: ni-docs
toc_group: how-to-guides
link_title: Optimize Size of a Native Executable using Build Reports
link_title: Optimize Size of a Native Executable Using Build Reports
permalink: /reference-manual/native-image/guides/optimize-native-executable-size-using-build-report/
---

# Optimize Size of a Native Executable using Build Reports
# Optimize Size of a Native Executable Using Build Reports

You can optimize your native executable by taking advantage of different tools provided with Native Image.
The guide demonstrates how to use the [*Build Report*](../BuildReport.md) tool to better understand the contents of a produced native executable, and how a small alteration in an application, without any semantic change, can influence the final binary size.
Expand Down Expand Up @@ -117,7 +117,7 @@ The words are delimited by commas and may be enclosed by an arbitrary number of
9. Next drill-down to the `time` package:

![Initial Code Breakdown - Drill-Down To Time Package](img/build-report-initial-code-breakdown-time.png)

Almost half of the package size comes from its `format` subpackage (similar to the situation in the `java.text` package).
So, `System.out.printf` is your first opportunity for improving the binary size.

Expand Down