Restrict Internet Access – Docker Container

As found here, I got this to work with docker-compose. Save as docker-compose.yml: version: ‘3’ services: outgoing-wont-work: image: alpine networks: – no-internet command: ping -c 3 google.com # will crash internal-will-work: image: alpine networks: – no-internet command: ping -c 3 internal-and-external internal-and-external: image: alpine networks: – no-internet – internet command: ping -c 3 google.com networks: … Read more