├── LICENSE.md
├── README.md
├── SECURITY.md
├── graalpy-community
├── Dockerfile.ol8
├── Dockerfile.ol8-slim
├── Dockerfile.ol9
└── Dockerfile.ol9-slim
├── graalvm-community
├── Dockerfile.ol8-java23
├── Dockerfile.ol9-java23
└── README.md
├── rpm-compact
├── jdk-community
│ ├── Dockerfile.ol8-java23
│ └── Dockerfile.ol9-java23
└── native-image-community
│ ├── Dockerfile.ol8-java23
│ ├── Dockerfile.ol8-java23-muslib
│ ├── Dockerfile.ol9-java23
│ └── Dockerfile.ol9-java23-muslib
└── truffleruby-community
├── Dockerfile.ol8
├── Dockerfile.ol8-slim
├── Dockerfile.ol9
├── Dockerfile.ol9-slim
└── README.md
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The GraalVM Dockerfiles in [`container repository`](https://github.com/graalvm/container) are licensed under the Universal Permissive License (UPL), Version 1 (https://opensource.org/licenses/UPL). This license applies to the Dockerfile only, and not to any resulting Docker Image.
2 |
3 | Copyright (c) 2021 Oracle and/or its affiliates.
4 |
5 | The Universal Permissive License (UPL), Version 1.0
6 |
7 | Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associate documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both
8 |
9 | (a) the Software, and
10 |
11 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors),
12 |
13 | without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms.
14 |
15 | This license is subject to the following condition:
16 |
17 | The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | **********************************************
22 |
23 | The GraalVM CE Docker Image that is generated by the GraalVM CE Dockerfile contains an exact image of GraalVM Community Edition 21. The file contained in the Docker Image are licensed under various open source terms as described herein and in the GraalVM CE Docker Image itself.
24 |
25 | The GraalVM CE Docker image uses [Oracle Linux](https://hub.docker.com/_/oraclelinux/) as its base image. See [Oracle Linux End-User License Agreement](https://oss.oracle.com/ol9/EULA).
26 |
27 | GraalVM CE 21 consists of multiple modules. The GraalVM software as a whole, as well as the JVMCI and VisualVM modules, are released under version 2 of the GNU General Public License with the “Classpath” Exception. See https://github.com/oracle/graal/blob/master/LICENSE. The Ruby, R and Python language components are licensed under separate terms. See https://github.com/oracle/graal/blob/master/README.md.
28 |
29 | Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
30 |
31 | As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
32 |
33 | As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GraalVM Container Images
2 |
3 | To support container-based development, we provide container images for:
4 | - Oracle GraalVM
5 | - GraalVM Community Edition
6 |
7 | ## Oracle GraalVM Container Images
8 |
9 | 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).
10 | Learn more at [Oracle Help Center](https://docs.oracle.com/en/graalvm/jdk/21/docs/getting-started/container-images/#oracle-graalvm-container-images).
11 |
12 | ## GraalVM Community Edition Container Images
13 |
14 | GraalVM Community Edition container images are published in this GitHub Container Registry.
15 | There are different GraalVM Community Edition container images provided depending on the architecture and the Java version.
16 | The container images for the latest GraalVM version (GraalVM for JDK 23) have a `-community` suffix.
17 | These are: **native-image-community**, **jdk-community**, **truffleruby-community**, **nodejs-community**, and **graalpy-community**.
18 | The container images are multi-arch, for AMD64 and AArch64 processor architectures, and Linux version.
19 |
20 | These are GraalVM Community Edition container images for the latest versions:
21 |
22 | | Package | Description |
23 | |--------------|----------------|
24 | | jdk-community | A size compact GraalVM Community Edition container image with the GraalVM JDK. |
25 | | graalvm-community | A GraalVM Community Edition container image. |
26 | | native-image-community | A size compact, RPM-based1, GraalVM Community Edition container image with the [Native Image](https://www.graalvm.org/reference-manual/native-image) support. |
27 | | truffleruby-community | A size compact, standalone2, GraalVM Community Edition container image with the Ruby runtime. It uses a standalone build of [TruffleRuby](https://github.com/oracle/truffleruby/releases). |
28 | | nodejs-community | A size compact, RPM-based1, GraalVM Community Edition container image with the [Node.js runtime](https://github.com/oracle/graaljs/blob/master/docs/user/NodeJS.md). |
29 | | graalpy-community | A size compact, standalone2, GraalVM Community Edition container image with the [GraalPy runtime](https://github.com/oracle/graalpython). It uses a standalone build of [GraalPy](https://github.com/oracle/graalpython/releases). |
30 |
31 | Below is the list of deprecated images that will only receive a last update for 22.3 before being archived:
32 |
33 | | Package | Description | Type |
34 | |--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|
35 | | jdk | A size compact GraalVM Community Edition container image with the GraalVM JDK pre-installed. | RPM-based1 |
36 | | graalvm-ce | A GraalVM Community Edition container image with the [`gu` utility](https://www.graalvm.org/reference-manual/graalvm-updater/) to install additional features. | GU-based |
37 | | native-image | A size compact GraalVM Community Edition container image with the [Native Image](https://www.graalvm.org/reference-manual/native-image) support. | RPM-based1 |
38 | | truffleruby | A size compact GraalVM Community Edition container image with the Ruby runtime. It uses a standalone build of [TruffleRuby](https://github.com/oracle/truffleruby/releases). | Standalone2 |
39 | | nodejs | A size compact GraalVM Community Edition container image with the [Node.js runtime](https://github.com/oracle/graaljs/blob/master/docs/user/NodeJS.md). | RPM-based1 |
40 | | graalpy | A size compact GraalVM Community Edition container image with the [GraalPy runtime](https://github.com/oracle/graalpython). | Standalone2 |
41 |
42 | **1**: RPM-based GraalVM Community Edition container images are based on GraalVM components RPMs that are available for Oracle Linux 8, and Oracle Linux 9. Similar to any other available packages, you can install these components using`microdnf` on Oracle Linux 8 and 9 based images.
43 |
44 | **2**: Standalone-based GraalVM Community Edition container images based on standalone builds of specific Truffle languages. These images are created as a drop-in replacement for other implementations, and do not contain a Java runtime.
45 |
46 | ## Tags
47 |
48 | There are multiple tags that let you choose the level of stability you need including the Java version, build number, and the Linux version.
49 | Image tags use the following naming convention:
50 |
51 | ```bash
52 | $version[-muslib(for native image only)][-$platform][-$buildnumber]
53 | ```
54 |
55 | The following tags are listed from the most-specific tag (at the top) to the least-specific tag (at the bottom).
56 | 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.
57 |
58 | ```
59 | 23.0.2-ol9-20250121
60 | 23.0.2-ol9
61 | 23.0.2
62 | 23-ol9
63 | 23
64 | ```
65 |
66 | To pull GraalVM for a specific JDK version, for example, 23, run from a command line:
67 | ```
68 | $ docker pull ghcr.io/graalvm/graalvm-community:23
69 | ```
70 | To use GraalVM JDK as base image in Dockerfile, use:
71 | ```
72 | FROM ghcr.io/graalvm/graalvm-community:23
73 | ```
74 |
75 | Read more about GraalVM Community Edition container images [here](https://www.graalvm.org/docs/getting-started/container-images/).
76 |
77 | ## Versioning and Update Policy
78 |
79 | To allow users to control their update policy, we provide an update policy based on a tag version.
80 | To fix the image and allow no updates, you need to use a full version with a release date:
81 | ```
82 | ghcr.io/graalvm/$IMAGE_NAME[:][$java_version][-$os_version][-$date]
83 | ```
84 |
85 | For example, `ghcr.io/graalvm/jdk-community:23.0.2-ol9-20250121`.
86 |
87 | You can also set an image to a specific Java version that allows an update for a subversion to be pulled.
88 | For instance, using `ghcr.io/graalvm/jdk-community:latest`, the image will be updated for 24.1.x releases, but not for 23.0.0.
89 | Using `ghcr.io/graalvm/native-image-community` you will always get the latest update available for Native Image GraalVM Community Edition, the latest OS which is now Oracle Linux 9 and Oracle Linux 9 slim, and the latest Java version.
90 |
91 | Note some terms and restrictions that may apply to the open source technology.
92 | The container image you select and all of the software that it contains is licensed under one or more open source license that are provided in the container image. Your use of the container is subject to the terms of those licenses.
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Reporting Security Vulnerabilities
2 |
3 | The GraalVM team values the independent security research community and believes that responsible disclosure of security vulnerabilities in GraalVM helps us ensure the security and privacy of all our users.
4 |
5 | If you believe you have found a security vulnerability, please submit a report to secalert_us@oracle.com preferably with a proof of concept. Please refer to [Reporting Vulnerabilities](https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html) for additional information including our public encryption key for secure email. We ask that you do not contact project contributors directly or through other channels about a report.
6 |
7 | ### Security Updates, Alerts and Bulletins
8 |
9 | GraalVM Community Edition security updates will be released on a quarterly basis in conjunction with the Oracle GraalVM security updates that are part of the Oracle Critical Patch Update program. Security updates are released on the Tuesday closest to the 17th day of January, April, July and October. A pre-release announcement will be published on the Thursday preceding each Critical Patch Update release. For additional information including past advisories, please refer to [Security Alerts](https://www.oracle.com/security-alerts/).
10 |
11 | ### Security-Related Information
12 |
13 | Please refer to the [GraalVM Security Guide](https://www.graalvm.org/docs/security-guide/) for security related topics such as how to support trusted and less trusted code execution using the Truffle language framework, or compiler mitigations for transitive execution attacks. However please note that we do not currently support the execution of untrusted or adversarial code. Non-vulnerability related security issues may be discussed on GitHub Issues or the Security channel in the [GraalVM Slack Workspace](https://graalvm.slack.com/)
14 |
--------------------------------------------------------------------------------
/graalpy-community/Dockerfile.ol8:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 | #do
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:8
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/graalpy-community' \
13 | org.opencontainers.image.title='GraalPy Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalPy is the GraalVM high-performance implementation of the Python programming language.'
16 |
17 | ARG GRAALVM_VERSION=24.1.2
18 | ARG GRAALVM_PKG=https://github.com/oracle/graalpython/releases/download/graal-$GRAALVM_VERSION/graalpy-community-$GRAALVM_VERSION-linux-amd64.tar.gz
19 | ARG TEMP_REGION=""
20 |
21 | WORKDIR /app
22 |
23 | ENV LANG=en_US.UTF-8 \
24 | PATH=/opt/graalpy-$GRAALVM_VERSION/bin:$PATH
25 |
26 | RUN set -eux \
27 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
28 | && yum update -y oraclelinux-release-el8 \
29 | && yum install -y curl tar unzip gzip zlib openssl-devel gcc gcc-c++ make patch glibc-langpack-en \
30 | && echo "" > /etc/dnf/vars/ociregion \
31 | && rm -rf /var/cache/yum
32 |
33 | RUN set -eux \
34 | && mkdir -p /opt/graalpy-$GRAALVM_VERSION \
35 | && curl --fail --silent --location --retry 3 $GRAALVM_PKG | gunzip | tar x -C /opt/graalpy-$GRAALVM_VERSION --strip-components=1
36 |
37 | RUN graalpy -m venv graalenv \
38 | && echo "source graalenv/bin/activate" >> ~/.bashrc
39 |
40 | CMD [ "graalpy"]
--------------------------------------------------------------------------------
/graalpy-community/Dockerfile.ol8-slim:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 | #do
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:8-slim
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/graalpy-community' \
13 | org.opencontainers.image.title='GraalPy Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalPy is the GraalVM high-performance implementation of the Python programming language.'
16 |
17 | ARG GRAALVM_VERSION=24.1.2
18 | ARG GRAALVM_PKG=https://github.com/oracle/graalpython/releases/download/graal-$GRAALVM_VERSION/graalpy-community-$GRAALVM_VERSION-linux-amd64.tar.gz
19 | ARG TEMP_REGION=""
20 |
21 | WORKDIR /app
22 |
23 | ENV LANG=en_US.UTF-8 \
24 | PATH=/opt/graalpy-$GRAALVM_VERSION/bin:$PATH
25 |
26 | RUN set -eux \
27 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
28 | && microdnf update -y oraclelinux-release-el8 \
29 | && microdnf install -y curl tar unzip gzip zlib openssl-devel gcc gcc-c++ make patch glibc-langpack-en \
30 | && echo "" > /etc/dnf/vars/ociregion \
31 | && rm -rf /var/cache/dnf
32 |
33 | RUN set -eux \
34 | && mkdir -p /opt/graalpy-$GRAALVM_VERSION \
35 | && curl --fail --silent --location --retry 3 $GRAALVM_PKG | gunzip | tar x -C /opt/graalpy-$GRAALVM_VERSION --strip-components=1
36 |
37 | RUN graalpy -m venv graalenv \
38 | && echo "source graalenv/bin/activate" >> ~/.bashrc
39 |
40 | CMD [ "graalpy"]
--------------------------------------------------------------------------------
/graalpy-community/Dockerfile.ol9:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 | #do
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:9
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/graalpy-community' \
13 | org.opencontainers.image.title='GraalPy Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalPy is the GraalVM high-performance implementation of the Python programming language.'
16 |
17 | ARG GRAALVM_VERSION=24.1.2
18 | ARG GRAALVM_PKG=https://github.com/oracle/graalpython/releases/download/graal-$GRAALVM_VERSION/graalpy-community-$GRAALVM_VERSION-linux-amd64.tar.gz
19 | ARG TEMP_REGION=""
20 |
21 | WORKDIR /app
22 |
23 | ENV LANG=en_US.UTF-8 \
24 | PATH=/opt/graalpy-$GRAALVM_VERSION/bin:$PATH
25 |
26 | RUN set -eux \
27 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
28 | && dnf install oraclelinux-release-el9 \
29 | && dnf install -y curl tar unzip gzip zlib openssl-devel gcc gcc-c++ make patch glibc-langpack-en libxcrypt-compat \
30 | && echo "" > /etc/dnf/vars/ociregion \
31 | && rm -rf /var/cache/dnf
32 |
33 | RUN set -eux \
34 | && mkdir -p /opt/graalpy-$GRAALVM_VERSION \
35 | && curl --fail --silent --location --retry 3 $GRAALVM_PKG | gunzip | tar x -C /opt/graalpy-$GRAALVM_VERSION --strip-components=1
36 |
37 |
38 | RUN graalpy -m venv graalenv \
39 | && echo "source graalenv/bin/activate" >> ~/.bashrc
40 |
41 | CMD ["graalpy"]
--------------------------------------------------------------------------------
/graalpy-community/Dockerfile.ol9-slim:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 |
5 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:9-slim
6 |
7 | FROM ${BASE_IMAGE}
8 |
9 | LABEL \
10 | org.opencontainers.image.url='https://github.com/graalvm/container' \
11 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/graalpy-community' \
12 | org.opencontainers.image.title='GraalPy Community Edition' \
13 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
14 | org.opencontainers.image.description='GraalPy is the GraalVM high-performance implementation of the Python programming language.'
15 |
16 | ARG GRAALVM_VERSION=24.1.2
17 | ARG GRAALVM_PKG=https://github.com/oracle/graalpython/releases/download/graal-$GRAALVM_VERSION/graalpy-community-$GRAALVM_VERSION-linux-amd64.tar.gz
18 | ARG TEMP_REGION=""
19 |
20 | WORKDIR /app
21 |
22 | ENV LANG=en_US.UTF-8 \
23 | PATH=/opt/graalpy-$GRAALVM_VERSION/bin:$PATH
24 |
25 | RUN set -eux \
26 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
27 | && microdnf install oraclelinux-release-el9 \
28 | && microdnf install -y curl tar unzip gzip zlib openssl-devel gcc gcc-c++ make patch glibc-langpack-en libxcrypt-compat \
29 | && echo "" > /etc/dnf/vars/ociregion \
30 | && rm -rf /var/cache/dnf
31 |
32 | RUN set -eux \
33 | && mkdir -p /opt/graalpy-$GRAALVM_VERSION \
34 | && curl --fail --silent --location --retry 3 $GRAALVM_PKG | gunzip | tar x -C /opt/graalpy-$GRAALVM_VERSION --strip-components=1
35 |
36 | RUN graalpy -m venv graalenv \
37 | && echo "source graalenv/bin/activate" >> ~/.bashrc
38 |
39 | CMD [ "graalpy"]
--------------------------------------------------------------------------------
/graalvm-community/Dockerfile.ol8-java23:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2020, 2022 Oracle and/or its affiliates.
2 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3 |
4 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:8-slim
5 |
6 | FROM ${BASE_IMAGE}
7 |
8 | # Note: If you are behind a web proxy, set the build variables for the build:
9 | # E.g.: docker build --build-arg "https_proxy=..." --build-arg "http_proxy=..." --build-arg "no_proxy=..." ...
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/graalvm-community' \
13 | org.opencontainers.image.title='GraalVM Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalVM is a universal virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala, Clojure, Kotlin, and LLVM-based languages such as C and C++.'
16 |
17 | ARG TARGETPLATFORM
18 |
19 | RUN microdnf update -y oraclelinux-release-el8 \
20 | && microdnf --enablerepo ol8_codeready_builder install bzip2-devel ed gcc gcc-c++ gcc-gfortran gzip file fontconfig less libcurl-devel make openssl openssl-devel readline-devel tar glibc-langpack-en \
21 | vi which xz-devel zlib-devel findutils glibc-static libstdc++ libstdc++-devel libstdc++-static zlib-static \
22 | && microdnf clean all
23 |
24 | RUN fc-cache -f -v
25 |
26 | ARG JDK_MAJOR_VERSION=23
27 | ARG JDK_VERSION=23.0.2
28 | ARG JDK_BUILD=+7.1
29 | ARG GRAALVM_PKG=https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${JDK_VERSION}/graalvm-community-jdk-${JDK_VERSION}_GRAALVM_ARCH_bin.tar.gz
30 |
31 | ENV LANG=en_US.UTF-8 \
32 | JAVA_HOME=/opt/graalvm-community-java$JDK_MAJOR_VERSION
33 |
34 | RUN set -eux \
35 | && if [ "$TARGETPLATFORM" == "linux/amd64" ]; then GRAALVM_PKG=${GRAALVM_PKG/GRAALVM_ARCH/linux-x64}; fi \
36 | && if [ "$TARGETPLATFORM" == "linux/arm64" ]; then GRAALVM_PKG=${GRAALVM_PKG/GRAALVM_ARCH/linux-aarch64}; fi \
37 | && curl --fail --silent --location --retry 3 ${GRAALVM_PKG} \
38 | | gunzip | tar x -C /opt/ \
39 | && mv /opt/graalvm-community-openjdk-$JDK_VERSION$JDK_BUILD $JAVA_HOME \
40 | # Set alternative links
41 | && mkdir -p "/usr/java" \
42 | && ln -sfT "$JAVA_HOME" /usr/java/default \
43 | && ln -sfT "$JAVA_HOME" /usr/java/latest \
44 | && for bin in "$JAVA_HOME/bin/"*; do \
45 | base="$(basename "$bin")"; \
46 | [ ! -e "/usr/bin/$base" ]; \
47 | alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
48 | done
49 |
50 | CMD java -version
51 |
--------------------------------------------------------------------------------
/graalvm-community/Dockerfile.ol9-java23:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2020, 2022 Oracle and/or its affiliates.
2 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3 |
4 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:9-slim
5 |
6 | FROM ${BASE_IMAGE}
7 |
8 | # Note: If you are behind a web proxy, set the build variables for the build:
9 | # E.g.: docker build --build-arg "https_proxy=..." --build-arg "http_proxy=..." --build-arg "no_proxy=..." ...
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/graalvm-community' \
13 | org.opencontainers.image.title='GraalVM Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalVM is a universal virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala, Clojure, Kotlin, and LLVM-based languages such as C and C++.'
16 |
17 | ARG TARGETPLATFORM
18 |
19 | RUN microdnf update -y oraclelinux-release-el9 \
20 | && microdnf --enablerepo ol9_codeready_builder install -y bzip2-devel ed gcc gcc-c++ gcc-gfortran gzip file fontconfig less libcurl-devel make openssl openssl-devel readline-devel tar glibc-langpack-en \
21 | vi which xz-devel zlib-devel findutils glibc-static libstdc++ libstdc++-devel libstdc++-static zlib-static libxcrypt-compat \
22 | && microdnf clean all
23 |
24 | RUN fc-cache -f -v
25 |
26 | ARG JDK_MAJOR_VERSION=23
27 | ARG JDK_VERSION=23.0.2
28 | ARG JDK_BUILD=+7.1
29 | ARG GRAALVM_PKG=https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${JDK_VERSION}/graalvm-community-jdk-${JDK_VERSION}_GRAALVM_ARCH_bin.tar.gz
30 |
31 | ENV LANG=en_US.UTF-8 \
32 | JAVA_HOME=/opt/graalvm-community-java$JDK_MAJOR_VERSION
33 |
34 | RUN set -eux \
35 | && if [ "$TARGETPLATFORM" == "linux/amd64" ]; then GRAALVM_PKG=${GRAALVM_PKG/GRAALVM_ARCH/linux-x64}; fi \
36 | && if [ "$TARGETPLATFORM" == "linux/arm64" ]; then GRAALVM_PKG=${GRAALVM_PKG/GRAALVM_ARCH/linux-aarch64}; fi \
37 | && curl --fail --silent --location --retry 3 ${GRAALVM_PKG} \
38 | | gunzip | tar x -C /opt/ \
39 | && mv /opt/graalvm-community-openjdk-$JDK_VERSION$JDK_BUILD $JAVA_HOME \
40 | # Set alternative links
41 | && mkdir -p "/usr/java" \
42 | && ln -sfT "$JAVA_HOME" /usr/java/default \
43 | && ln -sfT "$JAVA_HOME" /usr/java/latest \
44 | && for bin in "$JAVA_HOME/bin/"*; do \
45 | base="$(basename "$bin")"; \
46 | [ ! -e "/usr/bin/$base" ]; \
47 | alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
48 | done
49 |
50 | CMD java -version
51 |
--------------------------------------------------------------------------------
/graalvm-community/README.md:
--------------------------------------------------------------------------------
1 |
2 | # GraalVM
3 |
4 | GraalVM is a universal virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++.
5 |
6 | Ruby, R and Python language components are optionally available using GraalVM gu utility.
7 |
8 | Further details can be found on [www.graalvm.org](https://www.graalvm.org).
9 |
10 |
11 | # How to use these images
12 |
13 | The images are intended for use in the **FROM** field of a downstream Dockerfile. For example, specify `FROM ghcr.io/graalvm/graalvm-community:latest` or a version tag.
14 |
15 | # Building the images
16 |
17 | For building GraalVM Java 23 amd64 and arm64 images use:
18 |
19 | ```
20 | docker buildx build --platform linux/amd64 --build-arg GRAALVM_VERSION= --build-arg JAVA_VERSION=java23 -t ghcr.io/graalvm/graalvm-community:--amd64 --output=type=docker -f Dockerfile.-java23 .
21 | ```
22 |
23 | ```
24 | docker buildx build --platform linux/arm64 --build-arg GRAALVM_VERSION= --build-arg JAVA_VERSION=java23 -t ghcr.io/graalvm/graalvm-community:--arm64 --output=type=docker -f Dockerfile.-java23 .
25 | ```
26 |
27 | # License
28 | The GraalVM CE Dockerfile is licensed under the [Universal Permissive License (UPL), Version 1](https://opensource.org/licenses/UPL). This license applies to the Dockerfile only, and not to any resulting Docker image.
29 |
30 | **********************************************
31 |
32 | Copyright (c) 2023 Oracle and/or its affiliates.
33 |
34 | The Universal Permissive License (UPL), Version 1.0
35 |
36 | Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associate documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both
37 |
38 | (a) the Software, and
39 |
40 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors),
41 |
42 | without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms.
43 |
44 | This license is subject to the following condition:
45 |
46 | The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software.
47 |
48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49 |
50 | **********************************************
51 |
52 | The GraalVM CE Docker image that is generated by the GraalVM CE Dockerfile contains an exact image of GraalVM Community Edition 20 code available at https://github.com/oracle/graal/releases. The files contained in the Docker Image are licensed under various open source terms as described herein and in the GraalVM CE Docker Image itself.
53 |
54 | The GraalVM CE Docker image uses [Oracle Linux](https://hub.docker.com/_/oraclelinux/) as its base image. See [Oracle Linux End-User License Agreement](https://oss.oracle.com/ol9/EULA).
55 |
56 | GraalVM CE 20 consists of multiple modules. The GraalVM software as a whole, as well as the JVMCI and VisualVM modules, are released under version 2 of the GNU General Public License with the "Classpath" Exception. See https://github.com/oracle/graal/blob/master/LICENSE. The optionally available Ruby, R and Python language components are licensed under separate terms as specified in those packages. See https://github.com/oracle/graal/blob/master/README.md.
57 |
58 | Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
59 |
60 | As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
61 |
62 | As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
63 |
64 |
--------------------------------------------------------------------------------
/rpm-compact/jdk-community/Dockerfile.ol8-java23:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:8-slim
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/graalvm-community' \
13 | org.opencontainers.image.title='GraalVM Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalVM Java Developer Kit contains a complete set of tools for Java applications development, such as debugger, profiler, and others.'
16 |
17 |
18 | # Note: If you are behind a web proxy, set the build variables for the build:
19 | # E.g.: docker build --build-arg 'https_proxy=...' --build-arg 'http_proxy=...' --build-arg 'no_proxy=...' ...
20 |
21 | ARG TARGETPLATFORM
22 | ARG JDK_MAJOR_VERSION=23
23 | ARG YUM_REPO=""
24 | ARG YUM_REPO_DEFAULT=https://yum.oracle.com/repo/OracleLinux/OL8/graalvm/community/
25 | ARG TEMP_REGION=""
26 |
27 | ENV LANG=en_US.UTF-8 \
28 | JAVA_HOME=/usr/lib64/graalvm/graalvm-community-java${JDK_MAJOR_VERSION}
29 |
30 | WORKDIR /app
31 |
32 | RUN if [ "$YUM_REPO" == "" ]; then YUM_REPO_CURRENT="$YUM_REPO_DEFAULT\$basearch"; else YUM_REPO_CURRENT="$YUM_REPO"; fi \
33 | && echo -e "\
34 | [ol8_graalvm_community]\n\
35 | name=Oracle Linux 8 graalvm community (\$basearch)\n\
36 | baseurl=$YUM_REPO_CURRENT\n\
37 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
38 | gpgcheck=1\n\
39 | enabled=1\
40 | " > /etc/yum.repos.d/ol8_graalvm_community.repo \
41 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
42 | && microdnf --enablerepo ol8_codeready_builder install -y graalvm-community-${JDK_MAJOR_VERSION}-jdk \
43 | && rm -rf /var/cache/yum \
44 | && echo "" > /etc/dnf/vars/ociregion \
45 | && echo -e "\
46 | [ol8_graalvm_community]\n\
47 | name=Oracle Linux 8 graalvm community (\$basearch)\n\
48 | baseurl=$YUM_REPO_DEFAULT\$basearch\n\
49 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
50 | gpgcheck=1\n\
51 | enabled=1\
52 | " > /etc/yum.repos.d/ol8_graalvm_community.repo
53 |
54 | CMD java --version
55 |
--------------------------------------------------------------------------------
/rpm-compact/jdk-community/Dockerfile.ol9-java23:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:9-slim
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/jdk-community' \
13 | org.opencontainers.image.title='JDK Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalVM Java Developer Kit contains a complete set of tools for Java applications development, such as debugger, profiler, and others.'
16 |
17 | # Note: If you are behind a web proxy, set the build variables for the build:
18 | # E.g.: docker build --build-arg 'https_proxy=...' --build-arg 'http_proxy=...' --build-arg 'no_proxy=...' ...
19 |
20 | ARG TARGETPLATFORM
21 | ARG JDK_MAJOR_VERSION=23
22 | ARG YUM_REPO=""
23 | ARG YUM_REPO_DEFAULT=https://yum.oracle.com/repo/OracleLinux/OL9/graalvm/community/
24 | ARG TEMP_REGION=""
25 |
26 | ENV LANG=en_US.UTF-8 \
27 | JAVA_HOME=/usr/lib64/graalvm/graalvm-community-java${JAVA_VERSION}
28 |
29 | WORKDIR /app
30 |
31 | RUN if [ "$YUM_REPO" == "" ]; then YUM_REPO_CURRENT="$YUM_REPO_DEFAULT\$basearch"; else YUM_REPO_CURRENT="$YUM_REPO"; fi \
32 | && echo -e "\
33 | [ol9_graalvm_community]\n\
34 | name=Oracle Linux 9 graalvm community (\$basearch)\n\
35 | baseurl=$YUM_REPO_CURRENT\n\
36 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
37 | gpgcheck=1\n\
38 | enabled=1\
39 | " > /etc/yum.repos.d/ol9_graalvm_community.repo \
40 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
41 | && microdnf --enablerepo ol9_codeready_builder install -y graalvm-community-${JAVA_VERSION}-jdk \
42 | && rm -rf /var/cache/yum \
43 | && echo "" > /etc/dnf/vars/ociregion \
44 | && echo -e "\
45 | [ol9_graalvm_community]\n\
46 | name=Oracle Linux 9 graalvm community (\$basearch)\n\
47 | baseurl=$YUM_REPO_DEFAULT\$basearch\n\
48 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
49 | gpgcheck=1\n\
50 | enabled=1\
51 | " > /etc/yum.repos.d/ol9_graalvm_community.repo
52 |
53 | CMD java --version
54 |
--------------------------------------------------------------------------------
/rpm-compact/native-image-community/Dockerfile.ol8-java23:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:8-slim
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/native-image-community' \
13 | org.opencontainers.image.title='Native Image Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalVM Native Image Community Edition ahead of time compilation functionality to generate under closed-world assumption an executable image or a shared object. This resulting binary includes the application, the libraries, the JDK and does not run on the Java VM, but includes necessary components like memory management and thread scheduling etc..'
16 |
17 | # Note: If you are behind a web proxy, set the build variables for the build:
18 | # E.g.: docker build --build-arg 'https_proxy=...' --build-arg 'http_proxy=...' --build-arg 'no_proxy=...' ...
19 |
20 | ARG TARGETPLATFORM
21 | ARG JDK_MAJOR_VERSION=23
22 | ARG YUM_REPO=""
23 | ARG YUM_REPO_DEFAULT=https://yum.oracle.com/repo/OracleLinux/OL8/graalvm/community/
24 | ARG TEMP_REGION=""
25 |
26 | ENV LANG=en_US.UTF-8 \
27 | JAVA_HOME=/usr/lib64/graalvm/graalvm-community-java${JDK_MAJOR_VERSION}
28 |
29 | WORKDIR /app
30 |
31 | RUN if [ "$YUM_REPO" == "" ]; then YUM_REPO_CURRENT="$YUM_REPO_DEFAULT\$basearch"; else YUM_REPO_CURRENT="$YUM_REPO"; fi \
32 | && echo -e "\
33 | [ol8_graalvm_community]\n\
34 | name=Oracle Linux 8 graalvm community (\$basearch)\n\
35 | baseurl=$YUM_REPO_CURRENT\n\
36 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
37 | gpgcheck=1\n\
38 | enabled=1\
39 | " > /etc/yum.repos.d/ol8_graalvm_community.repo \
40 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
41 | && microdnf --enablerepo ol8_codeready_builder install -y graalvm-community-${JDK_MAJOR_VERSION}-native-image \
42 | && rm -rf /var/cache/yum \
43 | && echo "" > /etc/dnf/vars/ociregion \
44 | && echo -e "\
45 | [ol8_graalvm_community]\n\
46 | name=Oracle Linux 8 graalvm community (\$basearch)\n\
47 | baseurl=$YUM_REPO_DEFAULT\$basearch\n\
48 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
49 | gpgcheck=1\n\
50 | enabled=1\
51 | " > /etc/yum.repos.d/ol8_graalvm_community.repo
52 |
53 | ENTRYPOINT [ "native-image" ]
54 | CMD [ "--version" ]
55 |
--------------------------------------------------------------------------------
/rpm-compact/native-image-community/Dockerfile.ol8-java23-muslib:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2015,2022 Oracle and/or its affiliates. All rights reserved.
4 | #
5 |
6 | ARG BASE_IMAGE=ghcr.io/graalvm/native-image-community:23-ol8
7 |
8 | FROM ${BASE_IMAGE} as base
9 |
10 | FROM base as muslib
11 |
12 | LABEL \
13 | org.opencontainers.image.url='https://github.com/graalvm/container' \
14 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/native-image-community' \
15 | org.opencontainers.image.title='Native Image Community Edition' \
16 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
17 | org.opencontainers.image.description='GraalVM Native Image Community Edition ahead of time compilation functionality to generate under closed-world assumption an executable image or a shared object. This resulting binary includes the application, the libraries, the JDK and does not run on the Java VM, but includes necessary components like memory management and thread scheduling etc..'
18 |
19 | ARG TEMP_REGION=""
20 |
21 | ARG MUSL_LOCATION=http://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-native.tgz
22 |
23 | ARG ZLIB_LOCATION=https://zlib.net/fossils/zlib-1.2.11.tar.gz
24 |
25 | ENV TOOLCHAIN_DIR=/usr/local/musl \
26 | CC=$TOOLCHAIN_DIR/bin/gcc
27 |
28 | RUN echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
29 | && rm -rf /etc/yum.repos.d/ol8_graalvm_community.repo \
30 | && mkdir -p $TOOLCHAIN_DIR \
31 | && microdnf install -y wget tar gzip make \
32 | && wget $MUSL_LOCATION && tar -xvf x86_64-linux-musl-native.tgz -C $TOOLCHAIN_DIR --strip-components=1 \
33 | && wget $ZLIB_LOCATION && tar -xvf zlib-1.2.11.tar.gz \
34 | && cd zlib-1.2.11 \
35 | && ./configure --prefix=$TOOLCHAIN_DIR --static \
36 | && make && make install
37 |
38 | FROM base as final
39 | COPY --from=muslib /usr/local/musl /usr/local/musl
40 |
41 | RUN echo "" > /etc/dnf/vars/ociregion
42 |
43 | ENV TOOLCHAIN_DIR=/usr/local/musl \
44 | CC=$TOOLCHAIN_DIR/bin/gcc
45 |
46 | ENV PATH=$TOOLCHAIN_DIR/bin:$PATH
47 |
48 | ENTRYPOINT [ "native-image" ]
49 | CMD [ "--version" ]
--------------------------------------------------------------------------------
/rpm-compact/native-image-community/Dockerfile.ol9-java23:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:9-slim
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/native-image-community' \
13 | org.opencontainers.image.title='Native Image Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='GraalVM Native Image Community Edition ahead of time compilation functionality to generate under closed-world assumption an executable image or a shared object. This resulting binary includes the application, the libraries, the JDK and does not run on the Java VM, but includes necessary components like memory management and thread scheduling etc..'
16 |
17 | # Note: If you are behind a web proxy, set the build variables for the build:
18 | # E.g.: docker build --build-arg 'https_proxy=...' --build-arg 'http_proxy=...' --build-arg 'no_proxy=...' ...
19 |
20 | ARG TARGETPLATFORM
21 | ARG JDK_MAJOR_VERSION=23
22 | ARG YUM_REPO=""
23 | ARG YUM_REPO_DEFAULT=https://yum.oracle.com/repo/OracleLinux/OL9/graalvm/community/
24 | ARG TEMP_REGION=""
25 |
26 | ENV LANG=en_US.UTF-8 \
27 | JAVA_HOME=/usr/lib64/graalvm/graalvm-community-java${JDK_MAJOR_VERSION}
28 |
29 | WORKDIR /app
30 |
31 | RUN if [ "$YUM_REPO" == "" ]; then YUM_REPO_CURRENT="$YUM_REPO_DEFAULT\$basearch"; else YUM_REPO_CURRENT="$YUM_REPO"; fi \
32 | && echo -e "\
33 | [ol9_graalvm_community]\n\
34 | name=Oracle Linux 9 graalvm community (\$basearch)\n\
35 | baseurl=$YUM_REPO_CURRENT\n\
36 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
37 | gpgcheck=1\n\
38 | enabled=1\
39 | " > /etc/yum.repos.d/ol9_graalvm_community.repo \
40 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
41 | && microdnf --enablerepo ol9_codeready_builder install -y graalvm-community-${JDK_MAJOR_VERSION}-native-image \
42 | && rm -rf /var/cache/yum \
43 | && echo "" > /etc/dnf/vars/ociregion \
44 | && echo -e "\
45 | [ol9_graalvm_community]\n\
46 | name=Oracle Linux 9 graalvm community (\$basearch)\n\
47 | baseurl=$YUM_REPO_DEFAULT\$basearch\n\
48 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\n\
49 | gpgcheck=1\n\
50 | enabled=1\
51 | " > /etc/yum.repos.d/ol9_graalvm_community.repo
52 |
53 | ENTRYPOINT [ "native-image" ]
54 | CMD [ "--version" ]
55 |
--------------------------------------------------------------------------------
/rpm-compact/native-image-community/Dockerfile.ol9-java23-muslib:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2015,2022 Oracle and/or its affiliates. All rights reserved.
4 | #
5 |
6 | ARG BASE_IMAGE=ghcr.io/graalvm/native-image-community:23-ol9
7 |
8 | FROM ${BASE_IMAGE} as base
9 |
10 | FROM base as muslib
11 |
12 | LABEL \
13 | org.opencontainers.image.url='https://github.com/graalvm/container' \
14 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/native-image-community' \
15 | org.opencontainers.image.title='Native Image Community Edition' \
16 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
17 | org.opencontainers.image.description='GraalVM Native Image Community Edition ahead of time compilation functionality to generate under closed-world assumption an executable image or a shared object. This resulting binary includes the application, the libraries, the JDK and does not run on the Java VM, but includes necessary components like memory management and thread scheduling etc..'
18 |
19 | ARG TEMP_REGION=""
20 |
21 | ARG MUSL_LOCATION=http://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-native.tgz
22 |
23 | ARG ZLIB_LOCATION=https://zlib.net/fossils/zlib-1.2.11.tar.gz
24 |
25 | ENV TOOLCHAIN_DIR=/usr/local/musl \
26 | CC=$TOOLCHAIN_DIR/bin/gcc
27 |
28 | RUN echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
29 | && rm -rf /etc/yum.repos.d/ol9_graalvm_community.repo \
30 | && mkdir -p $TOOLCHAIN_DIR \
31 | && microdnf install -y wget tar gzip make \
32 | && wget $MUSL_LOCATION && tar -xvf x86_64-linux-musl-native.tgz -C $TOOLCHAIN_DIR --strip-components=1 \
33 | && wget $ZLIB_LOCATION && tar -xvf zlib-1.2.11.tar.gz \
34 | && cd zlib-1.2.11 \
35 | && ./configure --prefix=$TOOLCHAIN_DIR --static \
36 | && make && make install
37 |
38 | FROM base as final
39 | COPY --from=muslib /usr/local/musl /usr/local/musl
40 |
41 | RUN echo "" > /etc/dnf/vars/ociregion
42 |
43 | ENV TOOLCHAIN_DIR=/usr/local/musl \
44 | CC=$TOOLCHAIN_DIR/bin/gcc
45 |
46 | ENV PATH=$TOOLCHAIN_DIR/bin:$PATH
47 |
48 | ENTRYPOINT [ "native-image" ]
49 | CMD [ "--version" ]
--------------------------------------------------------------------------------
/truffleruby-community/Dockerfile.ol8:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:8
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/truffleruby-community' \
13 | org.opencontainers.image.title='TruffleRuby Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.'
16 |
17 | ARG GRAALVM_VERSION=24.1.2
18 | ARG TARGETPLATFORM
19 | ARG GRAALVM_PKG=https://github.com/oracle/truffleruby/releases/download/graal-$GRAALVM_VERSION/truffleruby-community-$GRAALVM_VERSION-GRAALVM_ARCH.tar.gz
20 | ARG TEMP_REGION=""
21 |
22 | WORKDIR /app
23 |
24 | ENV LANG=en_US.UTF-8 \
25 | PATH=/opt/truffleruby-$GRAALVM_VERSION/bin:$PATH
26 |
27 | RUN set -eux \
28 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
29 | && dnf update -y oraclelinux-release-el8 \
30 | && dnf --enablerepo ol8_codeready_builder install -y curl tar gzip zlib-devel libyaml-devel openssl-devel gcc make glibc-langpack-en \
31 | && echo "" > /etc/dnf/vars/ociregion \
32 | && rm -rf /var/cache/yum \
33 | && mkdir -p /opt/truffleruby-$GRAALVM_VERSION \
34 | && if [ "$TARGETPLATFORM" == "linux/amd64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-amd64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
35 | && if [ "$TARGETPLATFORM" == "linux/arm64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-aarch64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
36 | && echo "gem: --no-document" > ~/.gemrc
37 |
38 | CMD [ "irb" ]
39 |
--------------------------------------------------------------------------------
/truffleruby-community/Dockerfile.ol8-slim:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:8-slim
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/truffleruby-community' \
13 | org.opencontainers.image.title='TruffleRuby Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.'
16 |
17 | ARG GRAALVM_VERSION=24.1.2
18 | ARG TARGETPLATFORM
19 | ARG GRAALVM_PKG=https://github.com/oracle/truffleruby/releases/download/graal-$GRAALVM_VERSION/truffleruby-community-$GRAALVM_VERSION-GRAALVM_ARCH.tar.gz
20 | ARG TEMP_REGION=""
21 |
22 | WORKDIR /app
23 |
24 | ENV LANG=en_US.UTF-8 \
25 | PATH=/opt/truffleruby-$GRAALVM_VERSION/bin:$PATH
26 |
27 | RUN set -eux \
28 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
29 | && microdnf update -y oraclelinux-release-el8 \
30 | && microdnf --enablerepo ol8_codeready_builder install -y libyaml-devel curl tar gzip zlib-devel openssl-devel gcc make glibc-langpack-en \
31 | && echo "" > /etc/dnf/vars/ociregion \
32 | && rm -rf /var/cache/yum \
33 | && mkdir -p /opt/truffleruby-$GRAALVM_VERSION \
34 | && if [ "$TARGETPLATFORM" == "linux/amd64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-amd64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
35 | && if [ "$TARGETPLATFORM" == "linux/arm64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-aarch64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
36 | && rm -rf /opt/truffleruby-$GRAALVM_VERSION/lib/llvm-toolchain \
37 | && microdnf remove -y gcc make
38 |
39 | CMD [ "irb" ]
40 |
--------------------------------------------------------------------------------
/truffleruby-community/Dockerfile.ol9:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:9
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/truffleruby-community' \
13 | org.opencontainers.image.title='TruffleRuby Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.'
16 |
17 | ARG GRAALVM_VERSION=24.1.2
18 | ARG TARGETPLATFORM
19 | ARG GRAALVM_PKG=https://github.com/oracle/truffleruby/releases/download/graal-$GRAALVM_VERSION/truffleruby-community-$GRAALVM_VERSION-GRAALVM_ARCH.tar.gz
20 | ARG TEMP_REGION=""
21 |
22 | WORKDIR /app
23 |
24 | ENV LANG=en_US.UTF-8 \
25 | PATH=/opt/truffleruby-$GRAALVM_VERSION/bin:$PATH
26 |
27 | RUN set -eux \
28 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
29 | && dnf update -y oraclelinux-release-el9 \
30 | && dnf --enablerepo ol9_codeready_builder install -y curl tar gzip zlib-devel libyaml-devel openssl-devel gcc make glibc-langpack-en \
31 | && echo "" > /etc/dnf/vars/ociregion \
32 | && rm -rf /var/cache/yum \
33 | && mkdir -p /opt/truffleruby-$GRAALVM_VERSION \
34 | && if [ "$TARGETPLATFORM" == "linux/amd64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-amd64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
35 | && if [ "$TARGETPLATFORM" == "linux/arm64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-aarch64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
36 | && echo "gem: --no-document" > ~/.gemrc
37 |
38 | CMD [ "irb" ]
39 |
--------------------------------------------------------------------------------
/truffleruby-community/Dockerfile.ol9-slim:
--------------------------------------------------------------------------------
1 | # LICENSE UPL 1.0
2 | #
3 | # Copyright (c) 2023 Oracle and/or its affiliates.
4 | #
5 |
6 | ARG BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:9-slim
7 |
8 | FROM ${BASE_IMAGE}
9 |
10 | LABEL \
11 | org.opencontainers.image.url='https://github.com/graalvm/container' \
12 | org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/truffleruby-community' \
13 | org.opencontainers.image.title='TruffleRuby Community Edition' \
14 | org.opencontainers.image.authors='GraalVM Sustaining Team ' \
15 | org.opencontainers.image.description='TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.'
16 |
17 | ARG GRAALVM_VERSION=24.1.2
18 | ARG TARGETPLATFORM
19 | ARG GRAALVM_PKG=https://github.com/oracle/truffleruby/releases/download/graal-$GRAALVM_VERSION/truffleruby-community-$GRAALVM_VERSION-GRAALVM_ARCH.tar.gz
20 | ARG TEMP_REGION=""
21 |
22 | WORKDIR /app
23 |
24 | ENV LANG=en_US.UTF-8 \
25 | PATH=/opt/truffleruby-$GRAALVM_VERSION/bin:$PATH
26 |
27 | RUN set -eux \
28 | && echo "$TEMP_REGION" > /etc/dnf/vars/ociregion \
29 | && microdnf update -y oraclelinux-release-el9 \
30 | && microdnf --enablerepo ol9_codeready_builder install -y curl tar gzip zlib-devel libyaml-devel openssl-devel gcc make glibc-langpack-en \
31 | && echo "" > /etc/dnf/vars/ociregion \
32 | && rm -rf /var/cache/yum \
33 | && mkdir -p /opt/truffleruby-$GRAALVM_VERSION \
34 | && if [ "$TARGETPLATFORM" == "linux/amd64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-amd64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
35 | && if [ "$TARGETPLATFORM" == "linux/arm64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-aarch64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
36 | && rm -rf /opt/truffleruby-$GRAALVM_VERSION/lib/llvm-toolchain \
37 | && microdnf remove -y gcc make
38 |
39 | CMD [ "irb" ]
40 |
--------------------------------------------------------------------------------
/truffleruby-community/README.md:
--------------------------------------------------------------------------------
1 |
2 | # truffleruby-community
3 |
4 | truffleruby-community is the [GraalVM](http://graalvm.org/) high-performance implementation of the [Ruby programming language](https://www.ruby-lang.org/en/).
5 |
6 | ## Docker images
7 |
8 | See https://github.com/graalvm/container/pkgs/container/truffleruby-community
9 |
10 | ## Supported tags
11 |
12 | * Oracle Linux 9: [`latest`/`VERSION`](https://github.com/graalvm/container/blob/master/truffleruby-community/Dockerfile.ol9).
13 |
14 | * Oracle Linux 9 no toolchain: [`slim`/`slim-VERSION`](https://github.com/graalvm/container/blob/master/truffleruby-community/Dockerfile.ol9-slim).
15 |
16 | * Oracle Linux 8: [`ol8`/`ol8-VERSION`](https://github.com/graalvm/container/blob/master/truffleruby-community/Dockerfile.ol8).
17 |
18 | * Oracle Linux 8 no toolchain: [`ol8-slim`/`ol8-slim-VERSION`](https://github.com/graalvm/container/blob/master/truffleruby-community/Dockerfile.ol8-slim).
19 |
20 | * Debian 10: [`debian`/`debian-VERSION`](https://github.com/graalvm/container/blob/master/truffleruby-community/Dockerfile.debian).
21 |
22 | The `no toolchain` variants mean the GraalVM LLVM toolchain and its dependencies needed to install C extensions are not included to save space.
23 | It is still possible to use gems with C extensions, but the gems must be installed before for instance using a multi-stage build, see [Multi-stage build for the no-toolchain images](#multi-stage-build-for-the-no-toolchain-images) below.
24 |
25 | ## How to use these images
26 |
27 | The images are intended for use in the **FROM** field of a downstream Dockerfile.
28 | For example, specify `FROM ghcr.io/graalvm/truffleruby-community:latest` or another tag.
29 |
30 | Here is an example `Dockerfile`:
31 | ```Dockerfile
32 | FROM ghcr.io/graalvm/truffleruby-community:latest
33 |
34 | # Copy app, Gemfile and Gemfile.lock
35 | COPY . /app
36 | WORKDIR /app
37 |
38 | RUN bundle config --local path vendor/bundle
39 | RUN bundle install
40 | RUN bundle exec ruby app.rb
41 | ```
42 |
43 | ### Multi-stage build for the no-toolchain images
44 |
45 | ```Dockerfile
46 | # Builder image with the toolchain to install gems
47 | FROM ghcr.io/graalvm/truffleruby-community:latest AS builder
48 |
49 | # Copy app, Gemfile and Gemfile.lock
50 | COPY . /app
51 | WORKDIR /app
52 |
53 | RUN bundle config --local path vendor/bundle
54 | RUN bundle install
55 |
56 | # Resulting image without the toolchain and including the gems
57 | FROM ghcr.io/graalvm/truffleruby-community:ol9-slim
58 |
59 | COPY --from=builder /app /app
60 | WORKDIR /app
61 |
62 | RUN bundle exec ruby app.rb
63 | ```
64 |
65 | ## Installing system packages
66 |
67 | ### Oracle Linux 8 and 9
68 |
69 | Use `microdnf install some-package`.
70 |
71 | ### Debian
72 |
73 | Use `apt update` and `apt install some-package`.
74 |
75 | ---
76 |
77 | #### Manually Building the images
78 |
79 | For manually building a truffleruby-community image from one of these Dockerfiles, use:
80 |
81 | ```
82 | docker build --build-arg GRAALVM_VERSION= -t ghcr.io/graalvm/truffleruby-community:TAG -f Dockerfile .
83 | ```
84 |
--------------------------------------------------------------------------------