New build system (#9)

This commit is contained in:
Ludovic Fernandez
2018-08-09 11:05:36 +02:00
committed by Michael
parent 585d48ff07
commit 72d3d9cd1c
6 changed files with 72 additions and 4 deletions

View File

@ -1,5 +1,12 @@
FROM golang:1.10 as builder
WORKDIR /go/src/github.com/containous/whoami
COPY . .
RUN go get -u github.com/golang/dep/cmd/dep
RUN make dependencies
RUN make build
# Create a minimal container to run a Golang static binary
FROM scratch
COPY whoami /
COPY --from=builder /go/src/github.com/containous/whoami/whoami .
ENTRYPOINT ["/whoami"]
EXPOSE 80