* Use go modules for dependencies * PR feedback: put back include in Makefile It is necessary for travis because it uses Makefile targets in build-harness * PR Feedback: Fix .travis.yml Since make targets are based on go modules, travis.yml definition needs to change appropriately to no longer use godep and glide.
13 lines
520 B
Docker
13 lines
520 B
Docker
FROM golang:1.14.3 as builder
|
|
RUN mkdir -p /go/src/github.com/cloudposse/prometheus-to-cloudwatch
|
|
WORKDIR /go/src/github.com/cloudposse/prometheus-to-cloudwatch
|
|
COPY . .
|
|
RUN go get && CGO_ENABLED=0 go build -v -o "./dist/bin/prometheus-to-cloudwatch" *.go
|
|
|
|
|
|
FROM alpine:3.8
|
|
RUN apk add --no-cache ca-certificates
|
|
COPY --from=builder /go/src/github.com/cloudposse/prometheus-to-cloudwatch/dist/bin/prometheus-to-cloudwatch /usr/bin/prometheus-to-cloudwatch
|
|
ENV PATH $PATH:/usr/bin
|
|
ENTRYPOINT ["prometheus-to-cloudwatch"]
|