2019-09-14 23:25:59 +00:00
|
|
|
# Build the go application into a binary
|
|
|
|
FROM golang:alpine as builder
|
|
|
|
WORKDIR /app
|
|
|
|
ADD . ./
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -installsuffix cgo -o gatus .
|
|
|
|
RUN apk --update add ca-certificates
|
|
|
|
|
|
|
|
# Run the binary on an empty container
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /app/gatus .
|
2019-12-28 17:55:00 +00:00
|
|
|
COPY --from=builder /app/config.yaml ./config/config.yaml
|
2019-09-14 23:25:59 +00:00
|
|
|
COPY --from=builder /app/static static/
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
2019-12-04 22:10:04 +00:00
|
|
|
ENV PORT=8080
|
|
|
|
EXPOSE ${PORT}
|
2019-12-04 22:27:27 +00:00
|
|
|
ENTRYPOINT ["/gatus"]
|