Skip to content

Commit

Permalink
add the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
PeiHsuanTsai committed Mar 7, 2019
1 parent df31238 commit f9848de
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
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"]

0 comments on commit f9848de

Please sign in to comment.