Add multi-architecture support #14
1 changed files with 4 additions and 2 deletions
|
@ -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 ./
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue