title: Dockerfile golang build
body: <p>I am building my Go application. I am getting error like below</p>
  
  <pre><code># cd .; git clone https://github.com/julienschmidt/httprouter /go/src/github.com/julienschmidt/httprouter Cloning into
  '/go/src/github.com/julienschmidt/httprouter'... fatal: unable to
  access 'https://github.com/julienschmidt/httprouter/': Could not
  resolve host: github.com package github.com/julienschmidt/httprouter:
  exit status 128
  The command '/bin/sh -c go get ./' returned a non-zero code: 1
  </code></pre>
  
  <p>docker file.</p>
  
  <pre><code># install dependencies first
  RUN go get ./
  
  RUN go build
  
  CMD if [ ${APP_ENV} = production ]; \
      then \
      main; \
      else \
      go get github.com/pilu/fresh &amp;&amp; \
      fresh; \
      fi
  
  EXPOSE 8080
  </code></pre>
  
  <p>build command:</p>
  
  <pre><code>docker image build -t test:1.0 .
  </code></pre>
  
  <p>Thanks. Any help please?</p>