Skip to content

Commit 4da4cff

Browse files
committed
Ensure cargo installed on Docker image
1 parent 8c5b4d2 commit 4da4cff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
2222
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \
2323
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
2424

25+
# Set environment variables for Rust and Cargo
26+
ENV CARGO_HOME=/cargo
27+
ENV RUSTUP_HOME=/rustup
28+
ENV PATH=$CARGO_HOME/bin:$PATH
29+
30+
# Install rustup and Rust nightly toolchain
31+
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
32+
33+
# Show versions for debugging
34+
RUN rustc --version && cargo --version
35+
2536
COPY pyproject.toml ./
2637

2738
RUN --mount=type=cache,target=/root/.cache/pip \

0 commit comments

Comments
 (0)