Adding PostgreSQL Client Packages to the Commvault Docker Image

Updated

On this page

Application container volumes (data and log directories) are shared with Commvault containers. The Commvault containers would need pg_dump, pg_restore, or other utilities to run backups and restores. So, add the PostgreSQL client packages to the Commvault Docker image.

Procedure

  1. Create a dockerBase file with the following content, replacing the Docker image name and PostgreSQL version as necessary:

    FROM <image_name:tag>
    #install pgsql client packages
    RUN  yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm ;\
              yum -y install <postgresql<version>>;

    For example, enter the following:

    FROM cvpgsql_11_22:849
    #install pgsql client packages
    RUN  yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm ;\
              yum -y install postgresql10;

    Where, cvpgsql_11_22:849 is the Docker container image for Commvault that was created earlier.

  2. Run the following command to create the image:

    docker build -f <dockerBase_file_path> -t <image_tag> <PATH>

    For example, enter the following:

    docker build -f MyDockerFile -t cv_11_22_test:nov26 /tmp
  3. Run the following command to verify that the image was created successfully:

    docker images

    If the Docker image was created successfully, you will see the image name and other details in the output screen.

  4. Run the following command to tag the Commvault Docker image:

    docker tag xxxxx <repository server>:5000/<image name>

    For example, enter the following:

    docker tag 3b3525bac385 gkkubernet1:5000/cv_nov26_sp23:latest
  5. Run the following command to push the image to the Docker repository:

    docker push <image_name>