From 8f49a5bc31384ee3fee99229d79f39958ab3048e Mon Sep 17 00:00:00 2001 From: Fabian Ruff Date: Wed, 23 Sep 2015 21:49:24 +0200 Subject: [PATCH] Add doc section about --no-proxy flag Signed-off-by: Fabian Ruff --- docs/reference/env.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/reference/env.md b/docs/reference/env.md index dd547ba1d5..a0c9285d7c 100644 --- a/docs/reference/env.md +++ b/docs/reference/env.md @@ -75,4 +75,21 @@ set DOCKER_HOST=tcp://192.168.99.101:2376 set DOCKER_CERT_PATH=C:\Users\captain\.docker\machine\machines\dev set DOCKER_MACHINE_NAME=dev # Run this command to configure your shell: copy and paste the above values into your command prompt -``` \ No newline at end of file +``` + +## Proxy exclusion +The env command supports a `--no-proxy` flag that will also add the `DOCKER_HOST` to the `NO_PROXY`/`no_proxy` environment variable (which ever is already defined). + +``` +docker-machine env dev --no-proxy +set -x DOCKER_TLS_VERIFY "1"; +set -x DOCKER_HOST "tcp://172.16.77.135:2376"; +set -x DOCKER_CERT_PATH "/Users/fabus/.docker/machine/machines/dev"; +set -x DOCKER_MACHINE_NAME "dev"; +set -x NO_PROXY "172.16.77.135"; +# Run this command to configure your shell: +# eval (docker-machine env dev) +``` + +This is useful when using docker-machine with a local VM provider (e.g. virtualbox or vmware fusion/workstation) in network environments where a http proxy is needed for internet access. +