-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a798b0
commit ef5b0d8
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
# build stage | ||
FROM golang:1.9.3-alpine3.7 | ||
FROM golang:1.9.3-alpine3.7 as backend | ||
RUN apk update && apk add ca-certificates curl git make tzdata | ||
|
||
ADD . /go/src/github.com/banzaicloud/spot-price-exporter | ||
RUN mkdir -p /go/src/github.com/banzaicloud/spot-price-exporter | ||
ADD Gopkg.* Makefile /go/src/github.com/banzaicloud/spot-price-exporter/ | ||
WORKDIR /go/src/github.com/banzaicloud/spot-price-exporter | ||
|
||
RUN make vendor | ||
ADD . /go/src/github.com/banzaicloud/spot-price-exporter | ||
|
||
RUN go build -o /bin/spot-price-exporter . | ||
|
||
FROM alpine:latest | ||
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* | ||
|
||
FROM alpine:3.7 | ||
COPY --from=backend /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=0 /bin/spot-price-exporter /bin | ||
ENTRYPOINT ["/bin/spot-price-exporter"] |