After the lets encrypt certificate is mounted in the container, it will be automatically updated with cerbot in the host computer. The certificate in the container will not be updated.

  docker, question

Cerbot is in the host computer. I mount the certificate applied for by letsencrpyt into the docker container of nginx. after each renewal of the validity period of the certificate, the certificate in the container will not take effect, and it will take me to restart the container every time. what is going on?

Certificate files are usually loaded into memory. Therefore, updating the certificate file usually requires reloading, such as nginx and apache, in order for the new certificate to take effect.

If your program does not support reload (such as tomcat) at all, you can only restart it.