From 3a62cda3aea811fa1e893105052a3c1dfacc196b Mon Sep 17 00:00:00 2001 From: devbeni Date: Mon, 15 Sep 2025 18:08:16 +0200 Subject: [PATCH] Update rust/latest/Dockerfile --- rust/latest/Dockerfile | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/rust/latest/Dockerfile b/rust/latest/Dockerfile index 0edbb65..1165f94 100644 --- a/rust/latest/Dockerfile +++ b/rust/latest/Dockerfile @@ -2,19 +2,34 @@ FROM --platform=$TARGETOS/$TARGETARCH ubuntu:latest LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com" -RUN apt update \ - && apt -y install git dnsutils curl iproute2 ffmpeg tini pkg-config build-essential libssl-dev \ - && useradd -m -d /home/container container +RUN apt update && apt -y install \ + git \ + dnsutils \ + curl \ + iproute2 \ + ffmpeg \ + tini \ + pkg-config \ + build-essential \ + libssl-dev \ + sudo \ + && rm -rf /var/lib/apt/lists/* -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --profile minimal --component rust-src +RUN useradd -m -d /home/container container \ + && echo "container ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER container -ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo -ENV PATH="/home/container/.cargo/bin:${PATH}" +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --profile minimal --component rust-src + +ENV USER=container \ + HOME=/home/container \ + CARGO_HOME=/home/container/.cargo \ + PATH="/home/container/.cargo/bin:${PATH}" WORKDIR /home/container -COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +COPY --chown=container:container entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh + ENTRYPOINT ["/usr/bin/tini", "-g", "--"] CMD ["/entrypoint.sh"] \ No newline at end of file