Installing Docker

To use Docker as your management tool for the IBM Z® Resource Discovery Data Service software containers, complete this procedure to install the Docker CE engine, Docker CLI, and Docker Compose.

Procedure

To install the Docker CE engine, Docker CLI, and Docker Compose, complete the following steps.

  1. Create a non-administrative user ID, such as zoauser, as shown in the following example:
    useradd -m zoauser
  2. Optional: Enable sudo all authority for the new user ID, as shown in the following example command:
    
    usermod -aG wheel zoauser # typical for RHEL
    usermod -aG sudo zoauser # typical for Ubuntu
    
  3. Determine whether the required versions of Docker or Docker Compose are installed by running the following commands:
    
    which docker             # to determine whether Docker is installed
    docker version           # to determine the Docker version
    docker compose version   # to determine the Docker Compose version

    If the required versions of both tools are installed, this procedure is complete. Otherwise, continue with the next step.

  4. Prepare the installation media, as described in Preparing installation media for Z Resource Discovery Data Service and Z Operational Analytics common components.

    If you enabled sudo all for the user ID zaauser, use that user ID. If you did not enable sudo all for the user ID zaauser, continue as the root user.

  5. In the common setup directory, go to the prereqs subdirectory.
  6. Run the following commands, and respond to the resulting prompts.
    
    # If you previously installed an earlier version of the Docker prerequisites
    ./docker_prereqs-v2.5.run --remove
    # To install the current Docker prerequisites
    ./docker_prereqs-v2.5.run --install
    

    After you complete the installation, verify that the /usr/local/bin directory is in the default system path for all users on the system. Also, to the newly created docker user group, you must manually add zaauser and any other user IDs that must interact with the Docker daemon via the Docker CLI.

  7. Verify that the Docker-related services are activated, as shown in the following example:
    
    sudo systemctl status docker
    sudo systemctl status docker.socket
    sudo systemctl status containerd
    
  8. Log in as zoauser. If you are already logged in under this user ID, log out, and log in again to make the most recent account changes take effect.
  9. Verify that the correct versions of all prerequisites are installed in the /usr/local/bin directory, as shown in the following example:
    
    which docker             # to determine whether Docker is installed
    docker version           # to determine the Docker version
    docker compose version   # to determine the Docker Compose version
  10. Verify that zoauser can communicate with the Docker daemon by running the following command:
    
    docker images -a
    

    A list of images should be returned. The list might be empty if no Docker images were previously installed on this system.

    If you receive an error message, verify that zoauser is added to the docker group, or refresh the zoauser login session.

  11. Verify that the Docker root directory is on a file system with adequate disk space by running the following command:
    
    DOCKERROOT=`docker info -f '{{ .DockerRootDir }}'`
    df -kh ${DOCKERROOT}
    

    The default location of the Docker root directory is /var/lib/docker. If the file space in the Docker root directory is not adequate, you must relocate the directory. For more information, see Relocating the Docker root directory.