Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP proxy environment variables not used anymore to configure docker daemon #8120

Closed
cvila84 opened this issue May 13, 2020 · 10 comments · Fixed by #8198
Closed

HTTP proxy environment variables not used anymore to configure docker daemon #8120

cvila84 opened this issue May 13, 2020 · 10 comments · Fixed by #8198
Labels
cause/firewall-or-proxy When firewalls or proxies seem to be interfering kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@cvila84
Copy link
Contributor

cvila84 commented May 13, 2020

Steps to reproduce the issue:

  1. set HTTP_PROXY/HTTPS_PROXY/NO_PROXY environment variables to match my proxy (following instructions provided here)
  2. minikube start
  3. docker pull alpine

Full output of failed command:

docker command fails because it tries to connect without using the proxy

$ docker pull alpine
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Note that:

  • It worked like that with minikube 1.9.2
  • It can work with minikube 1.10 if I pass the proxy environment variables with --docker-env

I can confirm the proxy environment variables are not used anymore as the /lib/systemd/system/docker.service is missing the Environment directives as you can see:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target  minikube-automount.service docker.socket
Requires= minikube-automount.service docker.socket

[Service]
Type=notify

------------------------------------------------------------------------
ONLY PRESENT WITH MINIKUBE 1.9.2
------------------------------------------------------------------------
Environment=HTTP_PROXY=http://192.168.1.3:3128
Environment=HTTPS_PROXY=http://192.168.1.3:3128
Environment=NO_PROXY=localhost,valmante,minikube,.gemalto.com,127.0.0.1,10.10.154.37,192.168.99.100,10.4.223.40
Environment=HTTP_PROXY=http://192.168.1.3:3128
Environment=HTTPS_PROXY=http://192.168.1.3:3128
Environment=NO_PROXY=localhost,valmante,minikube,.gemalto.com,127.0.0.1,10.10.154.37,192.168.99.100,10.4.223.40
------------------------------------------------------------------------


# This file is a systemd drop-in unit that inherits from the base dockerd configuration.
# The base configuration already specifies an 'ExecStart=...' command. The first directive
# here is to clear out that command inherited from the base configuration. Without this,
# the command from the base configuration and the command specified here are treated as
# a sequence of commands, which is not the desired behavior, nor is it valid -- systemd
# will catch this invalid input and refuse to start the service with an error like:
#  Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services.

# NOTE: default-ulimit=nofile is set to an arbitrary number for consistency with other
# container runtimes. If left unlimited, it may result in OOM issues with MySQL.
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --default-ulimit=nofile=1048576:1048576 --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=virtualbox --insecure-registry 10.96.0.0/12 --insecure-registry dockerhub.gemalto.com --insecure-registry vgerndvud2379.gemalto.com
ExecReload=/bin/kill -s HUP
@cvila84 cvila84 changed the title HTTP proxy environment variables not used to configure docker daemon HTTP proxy environment variables not used anymore to configure docker daemon May 13, 2020
@medyagh
Copy link
Member

medyagh commented May 13, 2020

@cvila84 thanks for reporting this, what driver do you use ?

@medyagh medyagh added kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it. cause/firewall-or-proxy When firewalls or proxies seem to be interfering labels May 13, 2020
@cvila84
Copy link
Contributor Author

cvila84 commented May 14, 2020

My driver is virtualbox

@medyagh
Copy link
Member

medyagh commented May 14, 2020

@cvila84 thank you very much for reporting this. does that happen to docker driver too?

@cvila84
Copy link
Contributor Author

cvila84 commented May 18, 2020

I can't tell as I'm a Windows 7 user :-(

@medyagh
Copy link
Member

medyagh commented May 18, 2020

@cvila84 docker desktop doesn't work on windows 7 ? as long as you have a running docker, u can run minikube on windows too

@medyagh
Copy link
Member

medyagh commented May 19, 2020

@cvila84 thank you very much for brining this to our attention, I made a fix for this,
here is the link to the binary from a PR that I think might fix this issue, do you mind trying it out ?
http://storage.googleapis.com/minikube-builds/8198/minikube-windows-amd64.exe

@cvila84
Copy link
Contributor Author

cvila84 commented May 19, 2020

@cvila84 docker desktop doesn't work on windows 7 ? as long as you have a running docker, u can run minikube on windows too

@medyagh I cannot install "docker for windows" on Windows 7, only their legacy product "docker toolbox" which is in fact a docker client with a Hyper-V linux VM running the dockerd. Windows 7 does not have HCS (Host Compute Service to run windows containers), neither LCOW (Linux Containers on Windows)

I will try your build today and will let you know

@priyawadhwa
Copy link

@cvila84 did the updated binary work for you?

@cvila84
Copy link
Contributor Author

cvila84 commented May 19, 2020

@cvila84 did the updated binary work for you?

yes, just tested now, i see again the proxy variables set in the docker.service file. thanks !

@medyagh
Copy link
Member

medyagh commented May 19, 2020

excellent thanks for verifying and sorry for this bug ! I really apperciate it that you reported this issue instead of just ignoring it. thank you again, it will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cause/firewall-or-proxy When firewalls or proxies seem to be interfering kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants