20 lines
650 B
Docker
20 lines
650 B
Docker
FROM rust:1.99-bookworm AS build
|
|
|
|
ARG RUST_TARGET=x86_64-unknown-linux-musl
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends musl-tools cmake \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN rustup target add "${RUST_TARGET}"
|
|
|
|
WORKDIR /src
|
|
COPY rust-toolchain.toml ./
|
|
COPY manifests/ ./manifests/
|
|
COPY control-plane/ ./control-plane/
|
|
RUN cargo build --manifest-path control-plane/Cargo.toml --locked --release \
|
|
--target "${RUST_TARGET}" --bin strata-next
|
|
|
|
FROM scratch
|
|
ARG RUST_TARGET=x86_64-unknown-linux-musl
|
|
COPY --from=build /src/control-plane/target/${RUST_TARGET}/release/strata-next /strata-next
|
|
ENTRYPOINT ["/strata-next"]
|