Add multi-architecture support
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Update the Dockerfile in order to be able to generate containers for several architectures (amd64 and arm64 for instance) using buildx.
This commit is contained in:
parent
34b3156d64
commit
4b6e0b116c
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/
|
||||
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 ./
|
||||
|
||||
|
|
Loading…
Reference in a new issue