1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/vendor/github.com/tonistiigi/go-archvariant/Dockerfile
CrazyMax a2aaf4cc83
vendor buildkit v0.10.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-22 18:51:27 +01:00

15 lines
No EOL
425 B
Docker

ARG GO_VERSION=1.17
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS build
COPY --from=xx / /
RUN apk add --no-cache git
WORKDIR /src
ARG TARGETPLATFORM
RUN --mount=target=. \
TARGETPLATFORM=$TARGETPLATFORM xx-go build -o /out/amd64variant ./cmd/amd64variant && \
xx-verify --static /out/amd64variant
FROM scratch
COPY --from=build /out/amd64variant .