mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(docker): Add support for RUSTFLAGS and feature flags in Dockerfile (#7658)
This commit is contained in:
@ -16,6 +16,10 @@ COPY --from=planner /app/recipe.json recipe.json
|
|||||||
ARG BUILD_PROFILE=release
|
ARG BUILD_PROFILE=release
|
||||||
ENV BUILD_PROFILE $BUILD_PROFILE
|
ENV BUILD_PROFILE $BUILD_PROFILE
|
||||||
|
|
||||||
|
# Extra Cargo flags
|
||||||
|
ARG RUSTFLAGS=""
|
||||||
|
ENV RUSTFLAGS "$RUSTFLAGS"
|
||||||
|
|
||||||
# Extra Cargo features
|
# Extra Cargo features
|
||||||
ARG FEATURES=""
|
ARG FEATURES=""
|
||||||
ENV FEATURES $FEATURES
|
ENV FEATURES $FEATURES
|
||||||
@ -24,7 +28,7 @@ ENV FEATURES $FEATURES
|
|||||||
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config
|
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config
|
||||||
|
|
||||||
# Builds dependencies
|
# Builds dependencies
|
||||||
RUN cargo chef cook --profile $BUILD_PROFILE --recipe-path recipe.json
|
RUN cargo chef cook --profile $BUILD_PROFILE --features "$FEATURES" --recipe-path recipe.json
|
||||||
|
|
||||||
# Build application
|
# Build application
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in New Issue
Block a user