2024-08-23 01:02:33 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2024-10-02 02:04:42 +02:00
|
|
|
FROM golang:1.23.2 AS builder
|
2024-08-23 01:02:33 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2024-09-23 03:54:23 +02:00
|
|
|
COPY go.mod go.sum ./
|
2024-08-23 01:02:33 +02:00
|
|
|
RUN go mod download
|
2024-09-23 03:54:23 +02:00
|
|
|
|
|
|
|
COPY . .
|
|
|
|
RUN go build -o labtime cmd/labtime/main.go
|
2024-08-23 01:02:33 +02:00
|
|
|
|
|
|
|
FROM gcr.io/distroless/base-debian12
|
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
|
|
|
|
COPY --from=builder /app/labtime /labtime
|
|
|
|
|
|
|
|
EXPOSE 2112
|
|
|
|
|
|
|
|
VOLUME ["/config"]
|
|
|
|
|
|
|
|
USER nonroot:nonroot
|
|
|
|
|
2024-09-23 03:54:23 +02:00
|
|
|
ENTRYPOINT ["/labtime"]
|