public-ip-tracker/Dockerfile

17 lines
464 B
Text
Raw Normal View History

FROM --platform=$TARGETPLATFORM golang:1.19 AS builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
WORKDIR /go/src/git.faercol.me/public-ip-tracker/
COPY tracker ./
RUN CGO_ENABLED=0 make build
# Replace with from scratch later on
FROM --platform=$TARGETPLATFORM alpine:latest
WORKDIR /root
COPY --from=builder go/src/git.faercol.me/public-ip-tracker/build/tracker ./
VOLUME [ "/config", "/output" ]
ENTRYPOINT [ "./tracker" ]
CMD [ "-config", "/config/config.json" ]