diff --git a/Dockerfile b/Dockerfile index 6edff49..c398e35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ ARG SOURCE_BRANCH # build migrator RUN apk add git +RUN go get -v github.com/gin-gonic/gin RUN go get -d -v github.com/lukaszbudnik/migrator RUN cd /go/src/github.com/lukaszbudnik/migrator && git checkout $SOURCE_BRANCH && ./setup.sh RUN cd /go/src/github.com/lukaszbudnik/migrator && \ diff --git a/setup.sh b/setup.sh index 2652735..413b531 100755 --- a/setup.sh +++ b/setup.sh @@ -3,5 +3,7 @@ # this is for dockerhub failing on fetching packages from gopkg.in # travis resolves this by 3 retries so adapting 3 retries here as well for i in {1..3}; do + # explicit gin get makes sure validator package is fetched before other packages are fetched + go get -v github.com/gin-gonic/gin go get -t -v ./... && break || sleep 15; done