This repository has been archived on 2023-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
notificationarr/Dockerfile
Dawid Wysokiński 83fc8c67dc
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
feat(cicd): add two new pipelines responsible for pushing docker image to docker hub and Dockerfile (#7)
Reviewed-on: #7
2022-07-19 04:48:31 +00:00

24 lines
530 B
Docker

FROM golang:1.18.4-alpine3.16 as builder
WORKDIR /notificationarr
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -o notificationarr .
######## Start a new stage from scratch #######
FROM alpine:3.16
RUN apk --no-cache add ca-certificates
COPY --from=builder /notificationarr/notificationarr /usr/bin/
EXPOSE 9234/tcp
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:9234/health || exit 1
CMD ["notificationarr"]