From fad7dacce21eaac21f1657c24af55c99c0e1c26e Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 9 Nov 2022 14:14:41 +0100 Subject: [PATCH] Dockerfile: merge build stages Signed-off-by: CrazyMax --- Dockerfile | 56 +++++++++++++++++++----------------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0df79274..2cfbf28f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG GO_VERSION=1.18.5 ARG XX_VERSION=1.1.2 -ARG OSXCROSS_VERSION=11.3-r7-debian +ARG OSXCROSS_VERSION=11.3-r8-debian ARG GOLANGCI_LINT_VERSION=v1.47.3 ARG DEBIAN_FRONTEND=noninteractive @@ -96,21 +96,7 @@ FROM gobase AS version RUN --mount=target=. \ echo -n "$(./hack/git-meta version)" | tee /tmp/.version ; echo -n "$(./hack/git-meta revision)" | tee /tmp/.revision -FROM base AS build-linux -ARG PACKAGE -RUN --mount=type=bind,target=. \ - --mount=type=cache,target=/root/.cache \ - --mount=type=cache,target=/go/pkg/mod \ - --mount=type=bind,source=/tmp/.version,target=/tmp/.version,from=version \ - --mount=type=bind,source=/tmp/.revision,target=/tmp/.revision,from=version <