Docker microservice

  docker, question

I am now deploying several docker containers, and then I want to update the code to repackage and create new containers and delete old containers. Or update the code in the old container? Which method is better? The code was obtained from Git.

Pay attention to several concepts, stop the old container, build the new image with the new code, build the new container with the new image and run it.
Micro-services should be continuously integrated and delivered to achieve automation. Take a look at this article. …

If the container is directly modified, it is not idempotent, that is, it cannot be reused.