2023-01-29 17:19:54 +00:00
|
|
|
FROM --platform=$TARGETPLATFORM golang:1.19 AS builder
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
ARG BUILDPLATFORM
|
2023-01-28 14:11:36 +00:00
|
|
|
WORKDIR /go/src/git.faercol.me/public-ip-tracker/
|
|
|
|
COPY tracker ./
|
|
|
|
RUN CGO_ENABLED=0 make build
|
|
|
|
|
|
|
|
# Replace with from scratch later on
|
2023-01-29 17:19:54 +00:00
|
|
|
FROM --platform=$TARGETPLATFORM alpine:latest
|
2023-01-28 14:11:36 +00:00
|
|
|
WORKDIR /root
|
|
|
|
COPY --from=builder go/src/git.faercol.me/public-ip-tracker/build/tracker ./
|
|
|
|
|
2023-03-12 13:12:48 +00:00
|
|
|
VOLUME [ "/config", "/output" ]
|
2023-01-28 14:11:36 +00:00
|
|
|
|
|
|
|
ENTRYPOINT [ "./tracker" ]
|
|
|
|
CMD [ "-config", "/config/config.json" ]
|