mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-08-01 08:08:05 +08:00
vendor: github.com/moby/buildkit v0.13.0-rc2
full diff: https://github.com/moby/buildkit/compare/8e3fe35738c2...v0.13.0-rc2 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
18
vendor/github.com/tonistiigi/fsutil/Dockerfile
generated
vendored
18
vendor/github.com/tonistiigi/fsutil/Dockerfile
generated
vendored
@@ -1,7 +1,9 @@
|
||||
#syntax=docker/dockerfile:1
|
||||
ARG GO_VERSION=1.20
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.1.0 AS xx
|
||||
ARG GO_VERSION=1.21
|
||||
ARG XX_VERSION=1.4.0
|
||||
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
||||
|
||||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base
|
||||
RUN apk add --no-cache git
|
||||
@@ -18,13 +20,19 @@ FROM base AS test
|
||||
ARG TESTFLAGS
|
||||
RUN --mount=target=. --mount=target=/go/pkg/mod,type=cache \
|
||||
--mount=target=/root/.cache,type=cache \
|
||||
CGO_ENABLED=0 xx-go test -test.v ${TESTFLAGS} ./...
|
||||
CGO_ENABLED=0 xx-go test -v -coverprofile=/tmp/coverage.txt -covermode=atomic ${TESTFLAGS} ./...
|
||||
|
||||
FROM base AS test-noroot
|
||||
RUN mkdir /go/pkg && chmod 0777 /go/pkg
|
||||
USER 1000:1000
|
||||
RUN --mount=target=. \
|
||||
--mount=target=/tmp/.cache,type=cache \
|
||||
CGO_ENABLED=0 GOCACHE=/tmp/gocache xx-go test -test.v ./...
|
||||
CGO_ENABLED=0 GOCACHE=/tmp/gocache xx-go test -v -coverprofile=/tmp/coverage.txt -covermode=atomic ./...
|
||||
|
||||
FROM scratch AS test-coverage
|
||||
COPY --from=test /tmp/coverage.txt /coverage-root.txt
|
||||
|
||||
FROM scratch AS test-noroot-coverage
|
||||
COPY --from=test-noroot /tmp/coverage.txt /coverage-noroot.txt
|
||||
|
||||
FROM build
|
||||
|
Reference in New Issue
Block a user