ты сейчас про кастомный Dockerfile с кастомной конфигурацией, правильно понимаю?
выбирай официальный образ nginx, указывай при сборке внешний файл конфигурации для nginx, в котором заранее все настройки указал, так же и можешь указать порты при сборке
If your container exposes multiple ports, nginx-proxy will default to the service running on port 80. If you need to specify a different port, you can set a VIRTUAL_PORT env var to select a different one. If your container only exposes one port and it has a VIRTUAL_HOST env var set, that port will be selected.
If your container exposes multiple ports, nginx-proxy will default to the service running on port 80. If you need to specify a different port, you can set a VIRTUAL_PORT env var to select a different one. If your container only exposes one port and it has a VIRTUAL_HOST env var set, that port will be selected.