Azul Zing versions release after the year 2019 don't require the ZST component anymore. To run Azul Zing within a container you only need to install the JDK Stable Release package (tar.gz, RPM or DEB) inside the container. The JDK or JRE installation packages are available on the Azul Zing downloads page.
For recommendations about the Java heap size configuration in containers, see Heapsize Settings.
Alternatively, you can also directly use the public container images as explained in Get Started with Azul Zing using Docker or in a Kubernetes system: Get Started with Azul Zing in Kubernetes. But those public images only provide the Stream Release, not the Stable Release recommended for production systems.
Example containerfile / dockerfile using Zing stable release downloaded over the Azul Metadata API on Ubuntu:
# Zing stable-release containerfile example
# docker build --build-arg=apikey=APITOKEN -t zingtest -f zing_api_ubuntu_containerfile.txt
# docker run --rm -i -t zingtest java -version
FROM ubuntu:24.04
ARG apikey
ARG version=17
ARG release=stable
RUN apt update \
&& apt install -y curl gnupg dpkg-dev jq
RUN APIURL="https://api.azul.com/metadata/v1/zing/packages/?java_version=$version&os=linux&arch=$(dpkg-architecture -q DEB_HOST_GNU_CPU)&archive_type=deb&java_package_type=jdk&latest=true&crs_supported=true&build_types=$release" \
&& URL=$(curl -s -H "Authorization: Bearer $apikey" -H "accept: application/json" -X GET "$APIURL" | jq -r '.[].download_url' | head -1) \
&& curl -s -L -o /tmp/zing.deb "$URL" \
&& curl -s https://repos.azul.com/azul-repo.key | gpg --import \
&& gpg --verify /tmp/zing.deb \
&& apt install -y /tmp/zing.deb \
&& rm /tmp/zing.deb \
&& echo "export JAVA_HOME=$(dirname $(dirname $(readlink -f /etc/alternatives/java)))" >> /etc/bash.bashrc
Add Comment
Comments
Please sign in to leave a comment.