Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SunboX/4079cda2ec490ac79f05dcc8eef56d82 to your computer and use it in GitHub Desktop.
Save SunboX/4079cda2ec490ac79f05dcc8eef56d82 to your computer and use it in GitHub Desktop.
Using Docker on Windows with Cisco AnyConnect VPN in non-split tunnel mode
Start docker before connecting vpn (to get local ip, eg 192.168.99.100)
After start, connect to VPN, then follow next steps:
From: https://github.com/boot2docker/boot2docker/issues/628
Add port forwarding to the NAT'd adapter in VirtualBox, add:
docker: host=127.0.0.1 port=2367 guest ip=[blank] guest port=2376
container port: 127.0.0.1, port=[the container exposed port to forward] guest ip=[blank], guest port[container port]
From https://www.iancollington.com/docker-and-cisco-anyconnect-vpn/
In Docker Quickstart Terminal, to point to port forwarded Docker, and to turn off checking of SSL certs:
export DOCKER_HOST=tcp://127.0.0.1:2376
alias docker='docker --tlsverify=false'
Alternatively, create a new docker-machine with tlsverify turned off:
docker-machine create -d virtualbox --engine-env DOCKER_TLS=no default
export DOCKER_HOST=tcp://127.0.0.1:2376
docker-machine regenerate-certs
- now you should be able to run docker commands without adding the --tlsverify=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment