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.
- Create a non-administrative user ID, such as
zoauser
, as shown in the following example:useradd -m zoauser
- 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
- 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.
- 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 IDzaauser
, use that user ID. If you did not enablesudo all
for the user IDzaauser
, continue as theroot
user. - In the common setup directory, go to the prereqs subdirectory.
- 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 addzaauser
and any other user IDs that must interact with the Docker daemon via the Docker CLI. - 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
- 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. - 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
- 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 thedocker
group, or refresh thezoauser
login session. - 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.