Docker Community Forums

Share and learn in the Docker community.

Dockerdoes not get the http-proxy.conf settings into running container

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

$ docker version
Client:
Version: 18.09.7
API version: 1.39
Go version: go1.10.8
Git commit: 2d0083d
Built: Thu Jun 27 17:56:17 2019
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.7
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 2d0083d
Built: Thu Jun 27 17:23:02 2019
OS/Arch: linux/amd64
Experimental: false
rgoguen@k8s-2-master:~$

systemctl show --property=Environment docker Environment=HTTPS_PROXY=http://foo.com:80 HTTP_PROXY=http://foo.com:80 docker run -it --rm ubuntu:latest /bin/bash
root@5555cccdca1f:/#
root@5555cccdca1f:/# echo $HTTP_PROXY

root@5555cccdca1f:/#
docker run --env HTTPS_PROXY=$http_proxy -it --rm ubuntu:latest /bin/bash
root@5eaed6825f24:/# echo $HTTPS_PROXY
http://foo.com:80
root@5eaed6825f24:/#

I was hoping that the docker http-proxy.conf file setting would make its way into the running kubernetes container.