mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-26 05:08:02 +08:00
vendor: update buildkit with typed errors support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
29
vendor/github.com/tonistiigi/fsutil/Dockerfile
generated
vendored
Normal file
29
vendor/github.com/tonistiigi/fsutil/Dockerfile
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#syntax=docker/dockerfile:1.1-experimental
|
||||
ARG GO_VERSION=1.13
|
||||
|
||||
FROM --platform=amd64 tonistiigi/xx:golang AS goxx
|
||||
|
||||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base
|
||||
RUN apk add --no-cache gcc musl-dev
|
||||
COPY --from=goxx / /
|
||||
WORKDIR /src
|
||||
|
||||
FROM base AS build
|
||||
ARG TARGETPLATFORM
|
||||
RUN --mount=target=. \
|
||||
--mount=target=/root/.cache,type=cache \
|
||||
go build ./...
|
||||
|
||||
FROM base AS test
|
||||
RUN --mount=target=. \
|
||||
--mount=target=/root/.cache,type=cache \
|
||||
go test -test.v ./...
|
||||
|
||||
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 \
|
||||
GOCACHE=/tmp/gocache go test -test.v ./...
|
||||
|
||||
FROM build
|
Reference in New Issue
Block a user