Updating the IBM Db2 Warehouse client container (Windows or Mac)

To update your Db2® Warehouse client container, you download a new container.

Before you begin

See the information about the container location in Deploying the IBM Db2 Warehouse client container (Windows or Mac).

Ensure that your Windows or Mac system meets the prerequisites described in Getting container images.

About this task

To perform this task, you must have administrative authority.

Procedure

  1. Log in to Docker by using your API key:
    echo <apikey> | docker login -u iamapikey --password-stdin icr.io
    where <apikey> is the API key that you created as a prerequisite in Getting container images.
  2. Issue the following command. This step helps minimize system downtime.
    docker pull icr.io/obs/hdm/db2wh_ce:v11.5.7.0-cn5-db2wh_client-linux
  3. Stop the client container by issuing the following command:
    docker stop client
  4. Perform one of the following steps:
    • Remove the old container by issuing the following command:
      docker rm -f client 
    • Rename the old container, such as by issuing the following command:
      docker rename client client-old
  5. Issue the following command:
    docker run -itd --net=value -v db2wh_vol:/mnt/clientdir --name=client icr.io/obs/hdm/db2wh_ce:v11.5.7.0-cn5-db2wh_client-linux
    where the value of the --net parameter is host if you deployed the image container on a remote host or is db2wh_net if you are deploying the client container on the same machine where you deployed the image container.
  6. Review the log output to verify that the update is progressing successfully. Issue the following command:
    docker logs --follow client
  7. Exit the Docker logs by pressing Ctrl+C.

What to do next

As part of the update process, the .bashrc and .bash_profile files are backed up as bashrc.bak and bash_profile.bak files and then overwritten. If you customized the .bashrc or .bash_profile file before the container update, reapply those customizations from the applicable backup file.
If you no longer require the container, stop it and remove it by issuing the following commands:

docker stop client
docker rm client