Files
leleka/deploy/Dockerfile.static-cli
T

24 lines
828 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
ENV CARGO_TARGET_DIR=/src/control-plane/target
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
COPY crates/ ./crates/
COPY manifests/ ./manifests/
COPY desktop-core/ ./desktop-core/
COPY control-plane/ ./control-plane/
COPY engine/strata/LICENSE ./engine/strata/LICENSE
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"]