ical-offset/Dockerfile
2026-02-16 11:41:59 +00:00

17 lines
429 B
Docker

FROM golang:alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY main.go ./
RUN CGO_ENABLED=0 go build -v -ldflags="-w -s"
FROM scratch
WORKDIR /app
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /src/ical-offset ./
EXPOSE 8080/tcp
ENTRYPOINT ["/app/ical-offset"]
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
CMD ["/app/ical-offset", "--health-check"]