title: Get package timeout with Docker - "golang.org/x/net/context/ctxhttp"
body: <p>I try to import this <a href="https://github.com/olivere/elastic" rel="nofollow noreferrer">package</a> using the go <a href="https://hub.docker.com/_/golang/" rel="nofollow noreferrer">Docker image</a>. </p>
  
  <p>From the docs of the package, the command to run is: </p>
  
  <pre><code> go get gopkg.in/olivere/elastic.v3
  </code></pre>
  
  <p>Works, fair enough. </p>
  
  <p>I need to do the same with the docker image: </p>
  
  <pre><code>docker run -v $PWD:/temp -w /temp -e GOPATH=$PWD -e GOBIN=$PWD/bin golang:latest go get gopkg.in/olivere/elastic.v3
  </code></pre>
  
  <p>But I got the following error: </p>
  
  <blockquote>
    <p>package golang.org/x/net/context: unrecognized import path
    "golang.org/x/net/context" (https fetch: Get
    <a href="https://golang.org/x/net/context?go-get=1" rel="nofollow noreferrer">https://golang.org/x/net/context?go-get=1</a>: dial tcp: lookup golang.org
    on 192.168.65.1:53: read udp 172.17.0.2:46904->192.168.65.1:53: i/o
    timeout) </p>
    
    <p>package golang.org/x/net/context/ctxhttp: unrecognized import
    path "golang.org/x/net/context/ctxhttp" (https fetch: Get
    <a href="https://golang.org/x/net/context/ctxhttp?go-get=1" rel="nofollow noreferrer">https://golang.org/x/net/context/ctxhttp?go-get=1</a>: dial tcp: lookup
    golang.org on 192.168.65.1:53: read udp
    172.17.0.2:44687->192.168.65.1:53: i/o timeout)</p>
  </blockquote>
  
  <p>Why is that?</p>