I'm setting up a Docker container using an isolated network and I want to run an application inside it that requires internet access. However, I've noticed that the container seems to have access to my host's listening ports (like SSH and SMB). I'm a bit concerned about this since I don't completely trust the app I'm running and want to prevent it from reaching those ports on my host machine. Is there a way to allow internet access to my container while keeping it from accessing my host's ports?
1 Answer
It sounds like you need to adjust your host's network settings. Instead of exposing your ports with something like `-p`, just don’t map any ports when you run your container. By default, Docker containers won't have access to your host ports unless specified, so as long as you don't expose them, you should be fine.
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String