Skip to main content

Update process for Docker

Updating the OPC Router from a version in the 5 series to the next higher version involves removing a container of the current version and then redeploying a container of a new version. Please note that depending on the configuration of the container, your project files and settings may be affected by this process if data persistence is not ensured beforehand.

1. Compatibility check

  • Before updating the production server, ensure that your current project configuration is compatible with the new OPC Router version. This can be done by performing a preliminary test on a virtual machine. In most cases, the OPC Router automatically adapts existing projects after an update, if necessary.
  • Ensure that all system requirements for the new version of OPC Router are met.

2. Preparation

  • Export your project to ensure that you can revert to the previous configuration in case of a problem.
  • Ensure that data is persisted in relevant paths so that no project data, settings, license activations, or log files are lost.
warning

If no mappings were set up when the existing container was created, all data will be lost when the container is deleted.
To manually back up data from the container, you can use the following command for all relevant paths:
docker cp containername:/pfad/im/container /pfad/im/dockerhost

3. Removing the container with the old version

  • First, stop the running container, and then remove it:
    docker stop containername
    docker rm containername
    A running container cannot be removed; docker rm will then abort with an error message. Alternatively, docker rm -f containername handles both tasks in a single step.
    If the container was created using Compose, it is recommended to remove it using docker compose down to ensure no unused components remain.
warning

This step cannot be undone. Make sure that all data you want to use in the new container is backed up beforehand.

4. Creating the container with the new version

  • Download the desired new image from docker pull image:tag. You can find available images and tags on our Docker Hub page.
  • Compose
    • Adjust the value of the image field in docker-compose.yml to create a container in the desired version.
    • If necessary, adjust environment variables, port mappings, and volume mappings according to the documentation.
    • Create and start the container using docker compose up
  • Docker CLI
    • Create and start the container using docker run <optionen> image:tag
      The options to use vary depending on your specific use case and can be found in the documentation.

5. Fallback to the Old Version

If the new container does not start with the existing volumes or behaves unexpectedly, revert to the previous version:

  • Remove the new container (docker stop and docker rm, see Step 3).
  • Recreate the container using the previous image tag. Be sure to note down the old tag before the update—latest no longer reveals which version was running previously.
  • If necessary, restore the data backed up in Step 2 or the exported project.
tip

Create a copy of the volumes before the update so that you can revert even if the new version has already migrated the data. You can back up a volume, for example, by writing its contents to an archive on the host via a short-lived container.

6. Finalization

  • If you have transferred data from your previous container, the container is now ready for operation and no further action is necessary. However, if you have set up the container without transferring any data, you can now use the demo or import a license, create a new project or import an existing project, and then put everything into production.