2023-03-11 15:21:03 +00:00
|
|
|
FROM --platform=$TARGETPLATFORM golang:1.20 AS builder
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
ARG BUILDPLATFORM
|
|
|
|
WORKDIR /go/src/git.faercol.me/telegram-notifier/
|
|
|
|
COPY notifier ./
|
|
|
|
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/telegram-notifier/build/notifier ./
|
|
|
|
|
2023-03-11 19:42:21 +00:00
|
|
|
VOLUME [ "/config", "/input" ]
|
2023-03-11 15:21:03 +00:00
|
|
|
|
|
|
|
ENTRYPOINT [ "./notifier" ]
|
|
|
|
CMD [ "-config", "/config/config.json" ]
|