2023-12-22 22:23:01 +01:00
|
|
|
FROM golang:latest as builder
|
2023-12-22 21:29:33 +01:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-12-22 22:23:01 +01:00
|
|
|
COPY go.mod go.sum .
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
2023-12-22 21:29:33 +01:00
|
|
|
COPY . .
|
|
|
|
|
2023-12-22 22:23:01 +01:00
|
|
|
RUN make build
|
|
|
|
|
2023-12-22 23:20:06 +01:00
|
|
|
FROM debian:stable-slim
|
2023-12-22 22:23:01 +01:00
|
|
|
|
|
|
|
ENV DATA=/data
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=builder /app/bin/trakr .
|
2023-12-22 21:29:33 +01:00
|
|
|
|
2023-12-22 23:20:06 +01:00
|
|
|
RUN chmod +x /app/trakr
|
|
|
|
|
|
|
|
RUN mkdir /data
|
|
|
|
|
2023-12-22 22:23:01 +01:00
|
|
|
ENTRYPOINT ["/app/trakr"]
|