The cluster is like docker swarm. When upgrading the container image, start the new container first, and then stop the old container after the new container starts normally. When Docker starts a container, if the command in the container can start normally, it will be considered that the container starts normally. docker swarm will then stop the old container. But for some businesses, it does not mean that the successful start of the process in the container means that the business is normal. At this time, you can use the healthcheck instruction in the Dockerfile to customize the command to check the business health. Only when the result of this command is 0, the container is considered to be started normally, so Swarm only stops the old container. https://docs.docker.com/engin...
Since it’s already a cluster, isn’t there a hot standby system? Run at least two instances of the same container, one as a backup. When upgrading, upgrade one of them first, then upgrade the rest. Similar to this
The cluster is like docker swarm. When upgrading the container image, start the new container first, and then stop the old container after the new container starts normally.
When Docker starts a container, if the command in the container can start normally, it will be considered that the container starts normally. docker swarm will then stop the old container.
But for some businesses, it does not mean that the successful start of the process in the container means that the business is normal. At this time, you can use the healthcheck instruction in the Dockerfile to customize the command to check the business health. Only when the result of this command is 0, the container is considered to be started normally, so Swarm only stops the old container. https://docs.docker.com/engin...
Since it’s already a cluster, isn’t there a hot standby system? Run at least two instances of the same container, one as a backup. When upgrading, upgrade one of them first, then upgrade the rest. Similar to this