go: use dep in builds, remove relative imports

Fixes #11.
Fixes #12.
Fixes #13.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-08-04 11:21:03 -07:00
parent c7dd0cbf31
commit 427f13fcd3
No known key found for this signature in database
GPG key ID: 5C02521D7B216AD6
36 changed files with 737 additions and 125 deletions

View file

@ -1,8 +1,12 @@
# cartservice_probe
FROM golang:1.10 as builder
WORKDIR /src/microservices-demo/cartservice/probe
COPY probe/ .
RUN go get -d ./...
RUN wget -qO/go/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && \
chmod +x /go/bin/dep
ENV PROJECT github.com/GoogleCloudPlatform/microservices-demo/src/cartservice/probe
WORKDIR /go/src/$PROJECT
COPY probe/Gopkg.* ./
RUN dep ensure --vendor-only -v
COPY ./probe ./
RUN go build -o /cartservice_probe .
# cartservice