To map your containers to local ports you have to use the -p option of docker run or use docker compose.
nginx must have access to the ports 80 and 443 (http and https) of your server.
Then you can map your containers to some incrementing port numbers (80000, 80001, 80002, ...). With these ports, you can configure nginx.
Instead of publishing each port to the local machine you can also use dockers bridges and only publish the two ports for nginx.
PS: I found this short tutorial.