title: GO - Local import not working
body: <p>I'm new with golang and I want to build my first simple web application. Every time I want to build my source, I get an error <code>locale import "./controllers" in non-local package"</code>.</p>
  
  <p>Here is my folder structure:</p>
  
  <pre><code>goTest
  ├── Dockerfile
  ├── controllers
  │   └── IndexController.go
  └── main.go
  </code></pre>
  
  <p>The <code>main.go</code> file:</p>
  
  <pre><code>package main
  
  import (
      "github.com/julienschmidt/httprouter"
      "net/http"
      "log"
      "./controllers"
  )
  
  func main() {
      router := httprouter.New()
      router.GET("/", IndexController)
  
      log.Fatal(http.ListenAndServe(":8080", router))
  }
  </code></pre>
  
  <p>The <code>IndexController.go</code> file:</p>
  
  <pre><code>package controllers
  
  import (
    "fmt"
  )
  
  func IndexController(w http.ResponseWriter, r *http.Request, ps httprouter.Params) error {
      fmt.Fprintf(w, "Hi %s!", r.URL.Path[1:])
  }
  </code></pre>
  
  <p>My <code>Dockerfile</code> file (copied from <a href="https://hub.docker.com/_/golang/" rel="nofollow noreferrer">https://hub.docker.com/_/golang/</a>):</p>
  
  <pre><code>FROM golang:1.8
  
  WORKDIR /go/src/app
  COPY . .
  
  RUN go-wrapper download   # "go get -d -v ./..."
  RUN go-wrapper install    # "go install -v ./..."
  
  EXPOSE 8080
  
  CMD ["app"]
  </code></pre>
  
  <p>The docker and go build command:</p>
  
  <p><code>docker build -t my-golang-app .</code></p>
  
  <p>And at least the console output:</p>
  
  <pre><code>Sending build context to Docker daemon  4.608kB
  Step 1/7 : FROM golang:1.8
   ---&gt; b2063493320d
  Step 2/7 : WORKDIR /go/src/app
   ---&gt; Using cache
   ---&gt; 86d4df9fceaa
  Step 3/7 : COPY . .
   ---&gt; 282286e66939
  Removing intermediate container fe3c0686729a
  Step 4/7 : RUN go-wrapper download   # "go get -d -v ./..."
   ---&gt; Running in f34b5a5ef0de
  + exec go get -v -d
  github.com/julienschmidt/httprouter (download)
  main.go:7:5: local import "./controllers" in non-local package
  The command '/bin/sh -c go-wrapper download   # "go get -d -v ./..."' returned a non-zero code: 1
  </code></pre>