Need a different Linux distro? Go back to the Zing Quick Start Guide
Note: Our software distributions are signed by an OpenPGP key when appropriate. To verify your download, see Product Signing Keys (OpenPGP) for details.
These instructions introduce you to the quick and easy process of installing Zing in a container on the plarform of your choice. Docker is used as an example below.
The instructions assume root privileges in the containerized environment.
To run Zing in a container, you need to:
Select the platform of your choice on the Get Started with Zing page and follow the instructions for installing Zing on the required platform.
Once Zing is installed on the Docker Host, (that is the machine where you will run the
docker run command later), proceed to installing Zing in a container described below.
Now that you have Zing installed on your host, create and run a Docker container instance:
docker run --name zing-container-name -i -t --device /dev/zing_mm0:/dev/zing_mm0 ubuntu:18.04
docker run --name zing-container-name -i -t --device /dev/zing_mm0:/dev/zing_mm0 centos:7
zing-container-namestands for the name of the container you created.
zing_mm0is the Zing memory device. It must be present and visible every time you run Zing (not only when you install Zing).
--deviceis required to run Zing in a container.
Alternatively, you can write your commands in a Dockerfile. See an example of a Dockerfile for Ubuntu 16.04 LTS below:
From ubuntu:16.04 RUN apt-get update -y RUN apt-get install -y software-properties-common python-software-properties RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 RUN /usr/bin/apt-add-repository "deb http://repos.azul.com/zing/ubuntu-container $(lsb_release -sc) main" RUN apt-get update -y RUN apt-get install zing-jdk1.8.0 -y WORKDIR /temp ADD ./license /etc/zing/
When your Docker container is up and running, install the Zing package into it:
apt-get install software-properties-common
curl -o /etc/yum.repos.d/zing.repo http://repos.azul.com/zing/rhel-container/zing.repo
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
rpm --import http://repos.azul.com/azul-repo.key
apt-add-repository "deb http://repos.azul.com/zing/ubuntu-container $(lsb_release -sc) main"
apt-get install zing-jdk1.8.0
yum install zing-jdk1.8.0
/etc/zingfolder of the container.
To verify that the Zing Virtual Machine is successfully installed in a container, use the following command:
The output should look similar to the snippet below:
java version "1.8.0-zing_18.05.0.0" Zing Runtime Environment for Java Applications (build 1.8.0-zing_18.05.0.0-b2)
To set the
JAVA_HOME environment variable to point to the Zing installation directory, use:
$ export JAVA_HOME=/opt/zing/zing-jdk8
To find information about post-installation steps that vary for each platform, choose the platform of your choice from the list below:
Finally, you are ready to start running your Java applications using the Zing Virtual Machine in a container as follows:
/opt/zing/zing-jdk8/bin/java -jar <TestApp.jar>
If your output does not display, visit the Zing Community Forum.
This concludes an overview of steps that are required to install and use Zing in a container.