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
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
ENV DATA=/data
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=builder /app/bin/trakr .
|
2023-12-22 21:29:33 +01:00
|
|
|
|
2023-12-22 22:23:01 +01:00
|
|
|
ENTRYPOINT ["/app/trakr"]
|