From 786664a0a6b172a9c3b790ddd8026a1962926d03 Mon Sep 17 00:00:00 2001 From: Simon Mittag Date: Mon, 4 Dec 2023 18:49:51 +1100 Subject: [PATCH] doco --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 051cd43..d01718a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# This is multiarch including linux/amd64 and linux/arm64/v8, see: docker buildx imagetools inspect golang:1.21.4-alpine FROM golang:1.21.4-alpine AS build RUN apk update && apk upgrade && apk add --no-cache bash git @@ -5,10 +6,12 @@ RUN apk update && apk upgrade && apk add --no-cache bash git WORKDIR . COPY . /proj/ +# now build from source on each platform this Dockerfile gets executed WORKDIR /proj RUN CGO_ENABLED=0 go build github.com/simonmittag/j8a/cmd/j8a -#multistage build uses output from previous image +# multistage build uses output from previous image +# base image for distro is also multiarch, see: docker buildx imagetools inspect alpine FROM alpine COPY --from=build /proj/j8a /j8a