From a02c215c8288bd33490ca52ec9faf1add13451d4 Mon Sep 17 00:00:00 2001 From: Radu Marias Date: Fri, 10 Jan 2025 20:52:49 +0200 Subject: [PATCH] Update Dockerfile Signed-off-by: Radu Marias --- .devcontainer/Dockerfile | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4be6d52c..b04bf396 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,8 +1,5 @@ -# Use an argument to specify the Ubuntu version, with a default -ARG UBUNTU_VERSION=20.04 - # Use the specified Ubuntu version from the .env file -FROM ubuntu:${UBUNTU_VERSION} +FROM ubuntu:latest #ARG USER_NAME=developer #ARG USER_HOME=/home/developer @@ -14,28 +11,34 @@ FROM ubuntu:${UBUNTU_VERSION} #ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y curl git gcc build-essential fuse3 -#RUN apt-get update && apt-get install -y \ -# git \ -# curl \ -# gcc \ -# pkg-config \ -# build-essential \ -# fuse3 +# Install Python and Rust +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + software-properties-common \ + curl \ + git \ + gcc \ + build-essential \ + fuse3 \ + python3 \ + python3-pip && \ + rm -rf /var/lib/apt/lists/* + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +RUN . ~/.cargo/env && rustup update + +# Set the environment variables needed for Rust +ENV PATH="${HOME}/.cargo/bin:${PATH}" #RUN useradd -m -s /bin/bash -d ${USER_HOME} ${USER_NAME} \ -# && echo "${USER_NAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${USER_NAME} \ -# && chmod 0440 /etc/sudoers.d/${USER_NAME} +#    && echo "${USER_NAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${USER_NAME} \ +#    && chmod 0440 /etc/sudoers.d/${USER_NAME} ## Switch to the new user #USER ${USER_NAME} #WORKDIR ${USER_HOME} -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -RUN . ~/.cargo/env && rustup default nightly && rustup update -# Set the environment variables needed for Rust -ENV PATH="${USER_HOME}/.cargo/bin:${PATH}" #WORKDIR ${USER_HOME}/${PROJECT_NAME}