2024-08-23 01:02:33 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2024-09-07 02:03:31 +02:00
|
|
|
FROM golang:1.23.1 AS builder
|
2024-08-23 01:02:33 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY go.mod go.sum main.go ./
|
|
|
|
RUN go mod download
|
|
|
|
RUN go build
|
|
|
|
|
|
|
|
FROM gcr.io/distroless/base-debian12
|
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
|
|
|
|
COPY --from=builder /app/labtime /labtime
|
|
|
|
|
|
|
|
# This is the port currently hardcoded in the application
|
|
|
|
EXPOSE 2112
|
|
|
|
|
|
|
|
# For now the config file path/name are hardcoded in the application
|
|
|
|
VOLUME ["/config"]
|
|
|
|
|
|
|
|
USER nonroot:nonroot
|
|
|
|
|
|
|
|
ENTRYPOINT ["/labtime"]
|