mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-22 23:02:22 +01:00
16 lines
511 B
Docker
16 lines
511 B
Docker
|
# 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 .
|
||
|
COPY --from=builder /app/config.yaml .
|
||
|
COPY --from=builder /app/static static/
|
||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||
|
ENV PORT 80
|
||
|
EXPOSE 80
|
||
|
ENTRYPOINT ["/gatus"]
|