Closed toships closed 7 years ago
Are you getting this error consistently? I just tried on multiple machines and it works fine for me. Looks like a (temporary?) network issue.
Yeah looks like your HTTPS traffic is being dropped.
ohh thanks .. will look into this and report back .. thanks for quick reply ..
Hi, I tried "wget https://www.google.com" and it works out fine .. is there any other way to test this and make sure this is the issue before I go to my network admin ?
Can you successfully git clone
projects on GitHub?
To reuse the same example as above:
$ git clone https://github.com/justinas/alice.git
yes - just tried it
In fact I tried wget "https://golang.org/x/crypto/ssh?go-get=1" and got a response - which is also nothing to see here - what I got from the browser ... see below
Proxy request sent, awaiting response... 200 OK Length: 604 [text/html] Saving to: ‘ssh?go-get=1.1’
100%[======================================>] 604 --.-K/s in 0s
2016-01-27 11:25:40 (94.3 MB/s) - ‘ssh?go-get=1.1’ saved [604/604]
Weird, are you behind a proxy ?
yes - but the proxy seems to be working fine atleast for the browser and wget on command line ..
Kind of digging more into it - this seems to be fetching due to import in remote.go
tools/src/nvidia-docker/remote.go: "golang.org/x/crypto/ssh" tools/src/nvidia-docker/remote.go: "golang.org/x/crypto/ssh/agent" tools/src/nvidia-docker/remote.go: "golang.org/x/crypto/ssh/terminal"
May be go does https fetch differently which is being blocked by my proxy? Will look and report but any help is appreciated.
as in previous comment - relevant thread ?
Maybe a problem with the Go user agent or http_proxy
not being set?
Now I can download from a standalone go command using https but the build still fails at the same place.
toships@server-05:~/Documents/nvidia-docker$ go get -d -v golang.org/x/crypto/ssh Fetching https://golang.org/x/crypto/ssh?go-get=1 Parsing meta tags from https://golang.org/x/crypto/ssh?go-get=1 (status code 200) get "golang.org/x/crypto/ssh": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh?go-get=1 get "golang.org/x/crypto/ssh": verifying non-authoritative meta tag Fetching https://golang.org/x/crypto?go-get=1 Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200) golang.org/x/crypto (download) toships@server-05:~/Documents/nvidia-docker$ go get -d -v golang.org/x/crypto/ssh/agent toships@server-05:~/Documents/nvidia-docker$ go get -d -v golang.org/x/crypto/ssh/terminal
Ok so it's not a problem with the user-agent.
Do you have the http_proxy
or https_proxy
environment variable set on your machine ?
If so can you try adding -e http_proxy
and -e https_proxy
in the build command line
Ok fixed the issue - thanks for all your help.
The -e option did not work for me. Came back with an error. However when the Dockerfile.build file was modified with the bold lines it worked out
FROM golang
ENV http_proxy http://proxy.xxxxxx.com:80/ ENV https_proxy http://proxy.xxxxxx.com:80/
ENV NVIDIA_GPGKEY_SUM bd841d59a27a406e513db7d405550894188a4c1cd96bf8aa4f82f1b39e0b5c
Oh right -e
is not used at build time, my bad.
We might need to add more build arguments to fix it generically.
Hi, In order to avoid a proxy of the problem, it is necessary to fix all of dockerfile. We have to avoid this problem in the next code.
------ addproxy.sh --------
find ~/nvidia-docker/ -type f -name "Dockerfile*" | while read FILE do echo "modify Dockerfile - "${FILE} sed -i -e "2i env http_proxy=$http_proxy" ${FILE} sed -i -e "3i env https_proxy=$https_proxy" ${FILE} done
$ sh addproxy.sh
What about setting it up in /etc/default/docker
?
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
As it might be expected,The default docker, if we use the proxy behind must have the following it configuration.
There are three different scopes for environment variables such as http_proxy
:
/etc/systemd/system/docker.service.d/http-proxy.conf
. You can also set it on the commandline. The variable is not visible either when BUILDING or RUNNING a container.In your Dockerfile you can set environment variables. These are visible when the container is RUNNING only. For example, add this to your dockerfile.
ENV http_proxy="http://172.17.42.1:3128"
--build-arg http_proxy=172.17.42.1:3128
. This will set an environment variable when BUILDING only. You need to propagate this with an ENV line for it to be available when running.Unfortunately, this isn't the only problem. apt-get
does not respect the http_proxy or HTTP_PROXY environment variables. The easiest way to set a proxy is by creating /etc/apt/apt.conf.d/30proxy
with the contents:
Acquire::http::Proxy "http://172.17.42.1:3128";
Note: 172.17.42.1 reliably points to tho docker host. You can run a forwarding proxy there like cntlm or squid that has your credentials to your corporate proxy. This is undocumented and could potentially change in the future. That is the state of using docker behind a corporate proxy though.
Closing since Docker now provides --network
at build time and we have package repositories
OS and docker version below:
Error on install below :
I checked "https://golang.org/x/crypto/ssh?go-get=1" and I get a "nothing to see here" message. Is this an issue or am I doing something wrong ? Please help.