Update dockerfiles to take advantage of BuildKit.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
FROM rustlang/rust:nightly-alpine3.19 AS builder
|
||||
ARG ALPINE_VERSION="3.20"
|
||||
|
||||
FROM rustlang/rust:nightly-alpine$ALPINE_VERSION AS builder
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||
RUN rustup component add rustfmt
|
||||
RUN rustup component add clippy
|
||||
|
||||
FROM builder AS javascript
|
||||
|
||||
RUN apk add --no-cache npm
|
||||
RUN npm install --global prettier@3.1.0
|
||||
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/npmcache,sharing=locked npm set cache /npmcache && npm install --global prettier@3.1.0
|
||||
|
||||
Reference in New Issue
Block a user