trakr/Dockerfile

30 lines
330 B
Docker
Raw Normal View History

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
2023-12-22 23:56:11 +01:00
RUN mkdir /data
2023-12-22 22:23:01 +01:00
WORKDIR /app
2023-12-22 23:56:11 +01:00
COPY --from=builder /app/bin bin
COPY --from=builder /app/public public
2023-12-22 21:29:33 +01:00
2023-12-22 23:56:11 +01:00
RUN chmod +x /app/bin/trakr
2023-12-22 23:20:06 +01:00
2023-12-22 23:56:11 +01:00
ENTRYPOINT ["/app/bin/trakr"]