-
Notifications
You must be signed in to change notification settings - Fork 125
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
PeiHsuanTsai
committed
Mar 7, 2019
1 parent
df31238
commit f9848de
Showing
1 changed file
with
21 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# build stage | ||
FROM golang:alpine AS build-env | ||
ENV WORKDIR /go/src/github.com/castawaylabs/cachet-monitor | ||
RUN mkdir -p ${WORKDIR} | ||
ADD . ${WORKDIR} | ||
WORKDIR ${WORKDIR} | ||
RUN apk add --no-cache ca-certificates git | ||
RUN go get -v github.com/Sirupsen/logrus \ | ||
github.com/docopt/docopt-go \ | ||
github.com/mitchellh/mapstructure \ | ||
gopkg.in/yaml.v2 \ | ||
github.com/miekg/dns | ||
RUN cd cli && go build -o /app/cachet-monitor | ||
|
||
# final stage | ||
FROM alpine | ||
RUN apk add --no-cache ca-certificates | ||
COPY --from=build-env /app/cachet-monitor /app/ | ||
WORKDIR /app | ||
RUN chmod a+x cachet-monitor | ||
ENTRYPOINT ["/app/cachet-monitor"] |