21 lines
564 B
Docker
21 lines
564 B
Docker
# syntax=docker/dockerfile:1
|
|
ARG ALPINE_VERSION="3.20"
|
|
|
|
FROM rustlang/rust:nightly-alpine$ALPINE_VERSION AS builder
|
|
|
|
RUN apk add --no-cache musl-dev
|
|
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 rustc-codegen-cranelift
|
|
|
|
FROM builder AS format
|
|
|
|
RUN rustup component add rustfmt
|
|
|
|
FROM builder AS clippy
|
|
|
|
RUN rustup component add clippy
|
|
|
|
FROM builder AS wasm
|
|
|
|
RUN rustup target add wasm32-unknown-unknown
|