FROM debian:bullseye@sha256:2c7a92a41cb814c00e7d455b2bc0c90ccdb9a4ced2ffdc10e562c7a84a186032 RUN apt-get update && apt-get install -y openssh-server gcc make dpkg-dev curl RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly --profile default -y # RUN /root/.cargo/rustup default nightly # RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-host x86_64-unknown-linux-gnu --default-toolchain nightly --profile default -y RUN /root/.cargo/bin/rustup target add x86_64-unknown-none RUN /root/.cargo/bin/rustup component add rust-src --target nightly-x86_64-unknown-none WORKDIR /root # RUN /root/.cargo/bin/cargo init COPY Cargo.toml /root/Cargo.toml COPY ./src/ /root/src # COPY ./conf/ /root/conf # COPY ./.cargo /root/.cargo # RUN RUSTFLAGS='-Zlocation-detail=none' /root/.cargo/bin/cargo +nightly build -Zbuild-std --target x86_64-unknown-none --release RUN /root/.cargo/bin/cargo +nightly build --target x86_64-unknown-none --release WORKDIR /wd RUN echo "[+] Building..." ENTRYPOINT ["/bin/bash", "-c", "/root/.cargo/bin/cargo +nightly build --target x86_64-unknown-none --release"]