Perform a major upgrade of a Docker image

Supported in:

This document explains how to perform a major upgrade for an existing Remote Agent using its Docker image. This procedure covers pulling the latest image, creating a backup of the existing container, preserving essential environment variables, and restarting the newly upgraded agent.

Before you begin

This procedure assumes you've already selected the Remote Agent upgrade option and are viewing the Major Upgrade dialog.

In the Major Upgrade dialog, copy the Docker command and paste it here for later use:

DOCKER_COMMAND

Upgrade existing Remote Agent

To upgrade an existing Remote Agent using it's Docker image, follow these steps:

  1. Run the following command to list the current running Docker containers to identify your agent's container ID and name:
    docker ps
  2. Enter your agent's container ID and name:
    CONTAINER_ID
    AGENT_NAME
  3. Run the following command to pull the latest Docker image to your machine: You can change the latest tag to a specific version, such as 1.4.8.3.
    docker pull us-docker.pkg.dev/siem-ar-public/images/agent:latest
  4. Run the following command to copy the modified environment variables to a local temporary file:
    docker exec CONTAINER_ID cat /home/siemplify_agent/.bash_profile > temp_bash_profile.txt
  5. Run the following command to stop the agent's Docker container:
    docker stop CONTAINER_ID
  6. Run the following command to rename the container to create a backup:
    docker rename AGENT_NAME AGENT_NAME_backup
  7. Run the new agent image. If you have used a specific version for the latest tag in the previous step, user the same tag here:
    DOCKER_COMMAND
  8. Run the following command to list the running Docker containers to find the new container ID:
    docker ps
  9. Enter your agent's new container ID:
    NEW_CONTAINER_ID
  10. Run the following command to copy the original contents of .bash_profile to the new container:
    cat temp_bash_profile.txt | docker exec -i
        NEW_CONTAINER_ID sh -c 'cat > /home/siemplify_agent/.bash_profile'
  11. Run the following command to restart the agent service to apply the modified environment variables:
    docker exec NEW_CONTAINER_ID supervisorctl restart all

Need more help? Get answers from Community members and Google SecOps professionals.