mirror of
https://github.com/crazy-max/diun.git
synced 2025-03-30 17:33:36 +00:00
dockerfile: fix vendor
This commit is contained in:
parent
357d5f28f1
commit
4ab6889be8
1 changed files with 2 additions and 7 deletions
|
@ -24,12 +24,7 @@ RUN --mount=target=. <<EOT
|
|||
echo "$version" | tee /tmp/.version
|
||||
EOT
|
||||
|
||||
FROM base AS vendored
|
||||
COPY go.mod go.sum ./
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
go mod download
|
||||
|
||||
FROM vendored AS test
|
||||
FROM base AS test
|
||||
ENV CGO_ENABLED=1
|
||||
RUN apk add --no-cache gcc linux-headers musl-dev
|
||||
RUN --mount=type=bind,target=. \
|
||||
|
@ -43,7 +38,7 @@ EOT
|
|||
FROM scratch AS test-coverage
|
||||
COPY --from=test /tmp/coverage.txt /coverage.txt
|
||||
|
||||
FROM vendored AS build
|
||||
FROM base AS build
|
||||
ARG TARGETPLATFORM
|
||||
RUN --mount=type=bind,target=. \
|
||||
--mount=type=bind,from=version,source=/tmp/.version,target=/tmp/.version \
|
||||
|
|
Loading…
Add table
Reference in a new issue