I don’t understand what you didn’t like about my method. If you look on the internet there are many different ways. And my way is not unusual, I suppose. This is compilation from other methods.
The problem is not in my method, but in the fact that command
certbot certonly --nginx
doesn't work in the official docker image.
In my opinion, the message The requested nginx plugin does not appear to be installed indicates that the certbot does not see the plugin. I'm trying to understand why.