Docker container on Synology cannot access public internet

From DSM 7.0, some firewall rules are generated with your setup to secure your NAS. As a secure setup, you should have a Deny All at the end.

After installing the Docker package from Package Center, by default the installation will not help you enable internet access in the default container network in consideration of security.

Step 1

Check your docker network subnet

172.17.0.0/16 means to have a subnet mask of 255.255.0.0

Step 2

Change your firewall rule, go to Control Panel > Security > Firewall > Edit Rules

This rule allows the Docker container network to go through your firewall!

With this rule in front of your Deny All rule, your Docker containers should be able to reach public internet now.