Add multi-architecture support #14

Merged
faercol merged 1 commit from add-docker into main 2023-01-29 17:21:46 +00:00
Showing only changes of commit 4b6e0b116c - Show all commits

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/
COPY tracker ./
RUN CGO_ENABLED=0 make build
# Replace with from scratch later on
FROM alpine:latest
FROM --platform=$TARGETPLATFORM alpine:latest
WORKDIR /root
COPY --from=builder go/src/git.faercol.me/public-ip-tracker/build/tracker ./