quarkusio / quarkus-images

Set of container images delivered for Quarkus
Apache License 2.0
115 stars 76 forks source link

Quarkus Images

This repository contains the container images used by Quarkus.

Quarkus images

The images are available on Quay.io

To pull these images use:

with VERSION being the version. The version matches the GraalVM version used in the image, for example: 21.1.0-java11, 21.1.0-java16...

docker pull quay.io/quarkus/ubi-quarkus-native-image:22.1-java17 <-- GraalVM 22.1 with Java 17 (ARM64 / AMD64) 
docker pull quay.io/quarkus/ubi-quarkus-native-image:22.1.0-java17-amd64 <-- GraalVM 22.1 with Java 17 (AMD 64 only)

Navigate to the tag tab on quay.io to see the list of available tabs.

NOTE: You may wonder why we don't use latest. It's because latest has introduced more problems than benefits especially when reproducing issues. For this reason, we recommend using a stable version.

Build Prerequisites

Build

> mvn install

Dockerfiles are created in target/docker.

To skip the image creation (and just create the Dockerfiles), append -Djdock.dry-run=true to the command line: mvn install -Djdock.dry-run=true. The location of each Dockerfile is printed in the log.

LIMITATION: When using the dry-run option with a multi-arch image, only the individual Dockerfiles are dumped on the file system (so, you cannot check the multi-arch manifest).

Push images using:

> mvn install -Ppush

IMPORTANT: You cannot combine -Ppush with the -Djdock.dry-run=true option.

Images

native-image

This image provides GRAALVM and the native-image executable. It is used by the Quarkus Maven plugin and Quarkus Gradle plugin to generate linux 64 executable.

S2I - Source to Image

S2I (Source to Image) are builder images used by OpenShift to build image streams. Two S2I are available:

Both resulting containers are based on UBI images.

Continuous Integration and Automation

This repository uses GitHub Actions to build the images. On each PR, the images are built. Check the Actions tab in the GitHub project.

To push the images to Quay, you need to trigger a deployment. Once the images have been built from master successfully, issue the following cURL command:

curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
    -H "Accept: application/vnd.github.ant-man-preview+json"  \
    -H "Content-Type: application/json" \
    https://api.github.com/repos/quarkusio/quarkus-images/deployments \
    --data '{"ref": "main", "environment": "quay"}'

Note that you need a GITHUB_TOKEN (API token) to trigger the deployment.

Discontinued images

Common maintenance tasks

Updating GraalVM

Once you have build the new images (mvn clean install), it is recommended to check they have been produced using docker images. Note that multi-arch manifests are not created during the local build.

Updating the base image

The common base images are defined in the pom.xml file at the root of the project. To update them, edit the pom.xml file:

<!-- See https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8 -->
<ubi-min.base>registry.access.redhat.com/ubi8/ubi-minimal:8.10</ubi-min.base>
<!-- See https://catalog.redhat.com/software/containers/ubi8-micro/601a84aadd19c7786c47c8ea -->
<ubi-micro.base>registry.access.redhat.com/ubi8-micro:8.10</ubi-micro.base>

Pushing the image to quay

Once a pull request is merged into the main branch, and the main branch build succeeded, you can trigger a deployment. Produced images and multi-arch manifests will be deployed to quay.io.

To trigger the deployment, go to https://github.com/quarkusio/quarkus-images/actions/workflows/push-images.yml and click on the Run workflow button. Then, click on the Run workflow green button (do not change the branch - main should be selected already).

Note that every sunday, a deployment happens automatically.