|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
# syntax = docker/dockerfile:1.2.1
|
|
|
|
|
|
|
|
|
|
FROM rust:latest as builder
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
|
@ -12,7 +13,7 @@ RUN rustup target add "$(uname -m)-unknown-linux-musl"
|
|
|
|
|
RUN --mount=type=cache,target=/rust-src/target \
|
|
|
|
|
--mount=type=cache,target=/root/.cargo/git \
|
|
|
|
|
--mount=type=cache,target=/root/.cargo/registry \
|
|
|
|
|
cargo build --release --target "$(uname -m)-unknown-linux-musl" -p dockerfile-plus --verbose
|
|
|
|
|
cargo build --release --target "$(uname -m)-unknown-linux-musl" -p dockerfile-plus
|
|
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/rust-src/target \
|
|
|
|
|
cp "/rust-src/target/$(uname -m)-unknown-linux-musl/release/dockerfile-plus" /usr/local/bin/dockerfile-plus
|
|
|
|
|