Melora Hugues
4b6e0b116c
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.
16 lines
453 B
Docker
16 lines
453 B
Docker
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 --platform=$TARGETPLATFORM alpine:latest
|
|
WORKDIR /root
|
|
COPY --from=builder go/src/git.faercol.me/public-ip-tracker/build/tracker ./
|
|
|
|
VOLUME [ "/config" ]
|
|
|
|
ENTRYPOINT [ "./tracker" ]
|
|
CMD [ "-config", "/config/config.json" ]
|