Installing Azul Zing in containers

Since Azul Zing version 19.07 for Java 8, 11 and 17 or later released in the year 2019, the ZST component is not needed anymore, which was required in earlier versions. To run Azul Zing within a container you only need to install the JDK Stable Release or Stream Release package (tar.gz, RPM or DEB) inside the container. The JDK installation package is 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.

Example containerfile / dockerfile using Zing stable release on Ubuntu:

# Azul Zing Containerfile example using stable release
# docker build --build-arg=ftpuser=CUSTOMERUSER --build-arg=ftppassword=CUSTOMERPASSWD -t zingtest -f dockerfile.txt
# docker run --rm -i -t zingtest java -version
FROM ubuntu:22.04
ARG ftpuser
ARG ftppassword
ARG ftpselection=jdk17
ENV FTPBASEURL=https://ftp.azul.com/releases/Zing/latest-stable/
ENV JAVA_HOME=/opt/zing/zing-jdk17
ENV PATH=$JAVA_HOME/bin:$PATH
RUN apt update \
&& apt install -y curl gnupg dpkg-sig \
&& ftpfile=$(curl --user "$ftpuser:$ftppassword" --list-only --silent --location $FTPBASEURL \
| grep "${ftpselection}.*linux.$(arch).deb<" \
| sed -E 's/.*href=\"(zing.*)\".*/\1/' | sort -n | tail -1) \
&& curl -o /tmp/zing-jdk.deb -L --user "$ftpuser:$ftppassword" $FTPBASEURL/$ftpfile \
&& curl -s https://repos.azul.com/azul-repo.key | gpg --import \
&& dpkg-sig -c /tmp/zing-jdk.deb | grep GOODSIG \
&& apt install -y /tmp/zing-jdk.deb \
&& rm /tmp/zing-jdk.deb

About the differences between Stable Release and Stream Release refer to Release Notes.

Add Comment

Comments

0 comments

Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful