Skip to content

Instantly share code, notes, and snippets.

@xero
Created April 10, 2023 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xero/04936077f10f34a6c6c6567ecc188fc5 to your computer and use it in GitHub Desktop.
Save xero/04936077f10f34a6c6c6567ecc188fc5 to your computer and use it in GitHub Desktop.
Docker for Mac VPN bridge setup

Setup Docker locally

This guide will help you setup docker locally for building and testing services behind the AWS CDE firewall by bridging your VPN connection to Docker.

Install the app

brew install docker

Configure to bridge the VPN

Edit your config list file: ~/Library/Group\ Containers/group.com.docker/cni/10-default.conflist Change all the subnet, gateway, and nameserver values from 10.1.0.1 to an adjacent subnet within your private VPC. e.g. 100.200.0.1 for me docker was colliding with an existing private subnet.

Update DNS

Edit your docker daemon config file:  ~/.docker/daemon.json

Add a new dns block containing the AWS DNS servers, and public fall backs for when you're off the VPN:

"dns": [
    "10.100.x.xxx",
    "10.100.x.xxx",
    "8.8.8.8',
    "1.1.1.1"
  ],

Reboot

Connect to the VPN and reboot docker to load the new configs. If you need VPN access follow this procedure to request access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment