Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Radu Marias <[email protected]>
  • Loading branch information
radumarias authored Jan 10, 2025
1 parent 1575e4c commit a02c215
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}

Expand Down

0 comments on commit a02c215

Please sign in to comment.