mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-01 00:23:56 +08:00 
			
		
		
		
	hack: update vendor dockerfile
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
		| @@ -1,9 +1,11 @@ | |||||||
| # syntax = docker/dockerfile:1.0-experimental | # syntax = docker/dockerfile:1.0-experimental | ||||||
| FROM golang:1.12-alpine AS vendored | FROM golang:1.12-alpine AS vendored | ||||||
| RUN  apk add --no-cache git | RUN  apk add --no-cache git rsync | ||||||
| WORKDIR /src | WORKDIR /src | ||||||
| RUN --mount=target=/src,rw \ | RUN --mount=target=/context \ | ||||||
|  |   --mount=target=.,type=tmpfs,readwrite  \ | ||||||
|   --mount=target=/go/pkg/mod,type=cache \ |   --mount=target=/go/pkg/mod,type=cache \ | ||||||
|  |   rsync -a /context/. . && \ | ||||||
|   go mod tidy && go mod vendor && \ |   go mod tidy && go mod vendor && \ | ||||||
|   mkdir /out && cp -r go.mod go.sum vendor /out |   mkdir /out && cp -r go.mod go.sum vendor /out | ||||||
|  |  | ||||||
| @@ -11,7 +13,9 @@ FROM scratch AS update | |||||||
| COPY --from=vendored /out /out | COPY --from=vendored /out /out | ||||||
|  |  | ||||||
| FROM vendored AS validate | FROM vendored AS validate | ||||||
| RUN --mount=target=.,rw \ | RUN --mount=target=/context \ | ||||||
|  |   --mount=target=.,type=tmpfs,readwrite  \ | ||||||
|  |   rsync -a /context/. . && \ | ||||||
|   git add -A && \ |   git add -A && \ | ||||||
|   rm -rf vendor && \ |   rm -rf vendor && \ | ||||||
|   cp -rf /out/* . && \ |   cp -rf /out/* . && \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tonis Tiigi
					Tonis Tiigi