It is if you use: --net=host
Which defeats the purpose of containerization because now the container can sniff traffic on the host, hijack TCP connections, etc.
Containers are useful for deployment and configuration, they are not a robustly secure sandbox. For that you still need to go with a VM.
No cloud provider will offer to run your containers alongside other customer's containers, on a shared kernel. Your containers always run within your own VM.