27 lines
954 B
Docker

# Use Debian 12.5 as the base image
FROM debian:12.5
# Set environment variables to avoid any interactive dialogue
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies required for Rust and rustup
RUN apt-get update && apt-get install -y curl gcc cmake && \
# Clean up the apt cache to reduce image size
apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Rustup and select the nightly toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly && \
. $HOME/.cargo/env
# Add the Rust toolchain binaries to PATH
ENV PATH="/root/.cargo/bin:${PATH}"
# Install the nightly Rust toolchain, the rust-src component, and set the override
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
# Your project's specific setup steps here
# For example, setting the working directory and copying your project files into the container
WORKDIR /mission_rust/