Containers are (and never were) no security instruments but only fancy ways of bundling things
You can open up other ports to the internet if you know what you’re doing. My SSH is open to the internet, but only with key based auto, and in case i need pw auth as a backup, only with 2FA enabled
Two remarks: