Monday, June 25, 2018

Proper proxy setting for Docker



https://stackoverflow.com/questions/50148644/what-is-the-proper-proxy-settings-for-docker-and-kubernetes



We always include the scheme in our environment variables.

/etc/profile.d/proxy.sh:

#!/bin/bash
export http_proxy=http://:3128
export https_proxy=$http_proxy
export no_proxy=169.254.169.254,localhost,127.0.0.1
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
export NO_PROXY=$no_proxy

/etc/systemd/system/docker.service.d/proxy.conf:


[Service]
Environment="HTTPS_PROXY=https://:3128/" "HTTP_PROXY=http://:3128/"

 

No comments: