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 the Docker image.
This procedure assumes that you have selected the remote agent upgrade option and are looking at the Major Upgrade dialog.
-
Copy the Docker command that is displayed in the Major Upgrade dialog
and paste it into the code here as a placeholder for later on.
DOCKER_COMMAND
-
List the current running Docker containers.
docker ps
-
Enter your agent's container ID.
CONTAINER_ID
-
Enter your agent's container name.
AGENT_NAME
. -
Pull the latest Docker image to your machine using the following command.
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
-
Copy the modified environment variables to a local temporary file.
docker exec CONTAINER_ID cat /home/siemplify_agent/.bash_profile > temp_bash_profile.txt
-
Stop the agent's Docker container.
docker stop CONTAINER_ID
-
Rename the container in order to have it as a backup.
docker rename AGENT_NAME AGENT_NAME_backup
-
Run the new agent image. If you changed the
latest
tag in step 5, change it here as well.DOCKER_COMMAND
-
List running Docker containers.
docker ps
-
Enter your agent's new container ID:
NEW_CONTAINER_ID
-
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'
-
Restart the agent service to apply the modified environment variables.
docker exec NEW_CONTAINER_ID supervisorctl restart all