I get a strange error in docker when building my go app:
./main.go:31:9: cannot use db (type *"github.com/khwerhahn/somerepo/vendor/github.com/jinzhu/gorm".DB) as type *"app/vendor/github.com/jinzhu/gorm".DB in argument to Migrate
The command '/bin/sh -c go-wrapper install' returned a non-zero code: 2
Could somebody hint me into the right direction, because locally the app runs just fine. Its just inside the docker container. I use glide
to manage dependencies.
Dockerfile:
FROM golang:1.9
WORKDIR /go/src/app
COPY . .
RUN go-wrapper download
RUN go-wrapper install
CMD ["go-wrapper", "run"]
//// Edit
This is how my structure looks. Glide
manages the vendor folder. The docker build does the rest.