How can the start and stop of container container in docker production environment avoid service interruption?

I have seen some articles that use docker for continuous integration. The code of the program is encapsulated in image. Every time a new submission is made, it will generate a new image, and then go to the host running container to stop container, remove container, to pull the new image, run container,. So this process will not cause running service interruption?

I now have a project organized in docker-compose. If you also want to encapsulate the code in image, is there any appropriate process for updating the code in the production environment?

Aug.06,2021

recommends two solutions:
1. Docker only deploys the environment, and all programs and configuration files are volume outside. You can update the program
2 without restarting docker. Switching between master and slave docker, deployed online. Update
one by one recommends the first way. Generally, the development environment will not change when it comes online. Even if you need to increase dependencies, you can enter docker to execute


, which will cause interruption. It's just that all the production environments use active / standby switching so that they don't feel

.
Menu