Docker: "certbot certonly" gets ignored

have a look at this (and read it slowly :D) , it should outline any gaps you have missed.

most often the issues are to do with undersanding how docker, host systems, dns and certbot works.

I think you have jumped to conclusion by including you nginx conf file

Andrei