The nginx package should not be present in the container or container image.
Remove the nginx package from Containerfile and rebuild the container image.
If there is no need to make the web server software available, removing it provides a safeguard against its activation.
The nginx service can be disabled with the following command:
$ sudo systemctl mask --now nginx.service
Running web server software provides a network-based avenue of attack, and should be disabled if not needed.