Installation on Linux Using the Zulu Docker Registry

Before you install Zulu, complete the steps described in the section Preparing the Zulu Installation Platform.

  1. Log in to your system as root or use sudo.

  2. Install Docker. See https://docs.docker.com/installation/.

    1. Install the Docker runtime onto your Linux system.

      Example:

      sudo yum install docker

    2. Start the Docker service in the background.

      Example:

      sudo service docker start

      Alternatively, to have the Docker service start at boot time, use the chkconfig docker command.

  3. Locate the Zulu Docker files from the Docker registry at: https://registry.hub.docker.com/u/azul/zulu-openjdk/.

  4. Identify a Zulu version from the list of Docker tags. Click the Tags tab.

  5. Run the Zulu Docker container. From your command line:

    • For Ubuntu

      docker run -it --rm azul/zulu-openjdk:<zulu_docker_tag> java -version

      For example, to use version 7 of JDK, run the following:

      docker run -it --rm azul/zulu-openjdk:7 java -version

    • For Debian

      docker run -it --rm azul/zulu-openjdk-debian:<zulu_docker_tag> java -version

      For example, to use version 7 of JDK, run the following:

      docker run -it --rm azul/zulu-openjdk-debian:7 java -version

    • For CentOS

      docker run -it --rm azul/zulu-openjdk-centos:<zulu_docker_tag> java -version

    The following example shows Docker checking for an existing Zulu image, then pulling the image from the repository.

    docker run -it --rm azul/zulu-openjdk-centos:7 java -version

    Response shows Docker checks for an existing Zulu image, then pulls the image from the repository.

    Unable to find image 'azul/zulu-openjdk-centos:7' locally 7: Pulling from azul/zulu-openjdk-centos ab5ef0e58194: Pull complete b711fe66e784: Pull complete Digest: sha256:612957dc50cddef75301b55033366135fd376a7323de38774353a05d30fbea56 Status: Downloaded newer image for azul/zulu-openjdk-centos:7 openjdk version "1.7.0_262" OpenJDK Runtime Environment (Zulu 7.38.0.11-CA-linux64) (build 1.7.0_262-b10) OpenJDK 64-Bit Server VM (Zulu 7.38.0.11-CA-linux64) (build 24.262-b10, mixed mode)