Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixes docker after connection to Cisco VPN
#!/bin/sh
for MACHINE in $(docker-machine ls -q --filter "state=Running"); do
sudo route -n add -net $(docker-machine ip $MACHINE | cut -d '.' -f 1,2,3).0/24 -interface $(VBoxManage showvminfo $MACHINE --machinereadable | grep hostonlyadapter | cut -d '"' -f 2)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.