Installing or updating new docker without stopping other dockers

Hi,

Just observed while I am updating even one docker. Torizon first stop all dockers and removed those and again reinstall all the dockers. So momentarily the SOM will be non functional. Is there any way by which it is possible to install/update a docker container.

I can understand only that docker container can be stopped momentarily.

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your question.

You are correct—when updating containers using Torizon OS, the system stops and removes all containers before reinstalling them, even if you are only updating a single container. This behavior ensures clean updates but can cause short periods where the application is unavailable.

While this is the current default behavior, there are a few approaches you can use to optimize or control the update process:

  1. Use Docker Compose for Advanced Control
    By managing your containers with docker-compose, you can define dependencies and start/stop behavior. This allows better orchestration, though the update process itself remains coordinated.

  2. Production Update Controls: Allow/Block Updates
    Torizon provides a feature to allow and block updates. Your application can signal when it is safe to apply updates, preventing interruption during critical operations.

  3. Container Health Monitoring and Auto-restart
    Using container health checks and auto-heal labels together with the docker-watchdog service ensures that your containers properly restart and recover from updates.

At the current time, Torizon’s update mechanism does not support in-place updates of individual containers without stopping all containers. If minimal downtime is essential, you may need to architect your application to tolerate these short interruptions, or you can coordinate the update timing via the block/allow feature.

Please let me know if you’d like more information about any of these approaches!

Best regards,
Toradex AI Assistant.

Run and manage containers with the command line on Torizon - Advanced concepts
Reliability on Torizon - OS services to increase reliability

Greetings @khaled.hassan,

I see you marked the ToradexAI’s response as a solution. We assume your issue is resolved then?

Best Regards,
Jeremias

Hi Jeremias,

I had to accept this as a solution because as per my understanding Torizon architecture is like that.
Please let me know if I can update a docker without stopping other dockers in a machine.

Well it might be feasible to do so, but it would involve fairly heavy customization of the standard update process on your end.

You’d need to create a separate update component that only has the singular container you want to update apart from the other containers you want to keep running. You could either duplicate the current docker-compose update component and have 2 docker-compose update components on a single system.

Or create a subsystem update component that manages your single container, separately from your other containers: How to Use Subsystem Updates | Toradex Developer Center

In any case it would be specific to your use-case and would need to be maintained on your end.

Best Regards,
Jeremias