mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
Merge pull request #10793 from milas/dockerfile-cache-mounts
ci: speed up a couple Dockerfile targets w/ cache mount
This commit is contained in:
commit
e28b223650
@ -91,6 +91,7 @@ FROM build-base AS lint
|
|||||||
ARG BUILD_TAGS
|
ARG BUILD_TAGS
|
||||||
RUN --mount=type=bind,target=. \
|
RUN --mount=type=bind,target=. \
|
||||||
--mount=type=cache,target=/root/.cache \
|
--mount=type=cache,target=/root/.cache \
|
||||||
|
--mount=type=cache,target=/go/pkg/mod \
|
||||||
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
|
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
|
||||||
golangci-lint run --build-tags "$BUILD_TAGS" ./...
|
golangci-lint run --build-tags "$BUILD_TAGS" ./...
|
||||||
|
|
||||||
@ -129,6 +130,7 @@ FROM base AS docsgen
|
|||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
RUN --mount=target=. \
|
RUN --mount=target=. \
|
||||||
--mount=target=/root/.cache,type=cache \
|
--mount=target=/root/.cache,type=cache \
|
||||||
|
--mount=type=cache,target=/go/pkg/mod \
|
||||||
go build -o /out/docsgen ./docs/yaml/main/generate.go
|
go build -o /out/docsgen ./docs/yaml/main/generate.go
|
||||||
|
|
||||||
FROM --platform=${BUILDPLATFORM} alpine AS docs-build
|
FROM --platform=${BUILDPLATFORM} alpine AS docs-build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user