Add multi-architecture support #14

Merged
faercol merged 1 commit from add-docker into main 2023-01-29 17:21:46 +00:00

View file

@ -1,10 +1,12 @@
FROM golang:1.19 AS builder FROM --platform=$TARGETPLATFORM golang:1.19 AS builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
WORKDIR /go/src/git.faercol.me/public-ip-tracker/ WORKDIR /go/src/git.faercol.me/public-ip-tracker/
COPY tracker ./ COPY tracker ./
RUN CGO_ENABLED=0 make build RUN CGO_ENABLED=0 make build
# Replace with from scratch later on # Replace with from scratch later on
FROM alpine:latest FROM --platform=$TARGETPLATFORM alpine:latest
WORKDIR /root WORKDIR /root
COPY --from=builder go/src/git.faercol.me/public-ip-tracker/build/tracker ./ COPY --from=builder go/src/git.faercol.me/public-ip-tracker/build/tracker ./