Allow easy configuration of root import path in Dockerfile.

master
Icedream 2018-06-03 00:35:45 +02:00
parent 8bf9768182
commit 8cd70b50de
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 3 additions and 2 deletions

View File

@ -3,10 +3,11 @@ FROM golang:1.10
RUN mkdir -p /go/src/app
WORKDIR /go/src/app
ARG ROOT_IMPORT_PATH=github.com/icedream/embot
COPY . /go/src/app
RUN \
mkdir -p "$GOPATH/src/github.com/icedream" &&\
ln -sf /go/src/app "$GOPATH/src/github.com/icedream/embot" &&\
mkdir -p "$GOPATH/src/$(dirname "$ROOT_IMPORT_PATH")" &&\
ln -sf /go/src/app "$GOPATH/src/$ROOT_IMPORT_PATH" &&\
go-wrapper download &&\
go-wrapper install