First of all, thanks for your prompt reply.
Well, I am trying to run VSCode container (Docker Hub). The container deploys fine but when I try to access the container with the server’s public IP after mapping the ports in the docker command, I can’t access the container. To check if the network is OK, I exec into the container and did ping and “apt update” tasks, both of them failed. Apparently, the container has no internet access.
When I deploy the same container with the –privileged option the container now has internet access and I could access it with my server’s public IP.
And, It’s just my doubt, if the docker firewall is causing the problem how can a privileged container get internet access?