build: build multiarch image with golang 1.18

This commit is contained in:
Yonatan Kahana 2022-05-28 22:27:36 +03:00
parent c0409446f6
commit cb09d0bab2
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.14 as build-env FROM --platform=$BUILDPLATFORM golang:1.18 as build-env
# xx wraps go to automatically configure $GOOS, $GOARCH, and $GOARM # xx wraps go to automatically configure $GOOS, $GOARCH, and $GOARM
# based on TARGETPLATFORM provided by Docker. # based on TARGETPLATFORM provided by Docker.
@ -18,4 +18,4 @@ FROM --platform=$TARGETPLATFORM alpine:3.12
RUN apk update --no-cache && apk add ca-certificates RUN apk update --no-cache && apk add ca-certificates
COPY --from=build-env /bin/main /app/main COPY --from=build-env /bin/main /app/main
ENTRYPOINT ["/app/main"] ENTRYPOINT ["/app/main"]