From b35f03b8631ff47530edefecec4b80792ea14177 Mon Sep 17 00:00:00 2001 From: "Guillaume \"B.B.\" Van Hemmen" <GuillaumeHemmen@noreply.git.van-hemmen.com> Date: Mon, 14 Jul 2025 18:08:25 +0200 Subject: [PATCH] #2 - Update Dockerfile: reorganize packages and add NVM environment setup Simplified package installation order for clarity and added environment variables for NVM configuration to improve shell initialization. --- Dockerfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 945e4fe..2a5f91b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,20 +17,18 @@ RUN ln -snf /usr/share/zoneinfo/$ARG_TZ /etc/localtime && \ RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ - # Development tools build-essential \ - git \ - python3 \ - # System utilities ca-certificates \ curl \ + git \ gnupg2 \ + jq \ + nano \ procps \ + python3 \ sudo \ unzip \ - wget \ - nano \ - jq && \ + wget && \ # Clean up apt cache to reduce image size rm -rf /var/lib/apt/lists/* @@ -70,5 +68,11 @@ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | P nvm use ${ARG_NODE_MAJOR} && \ npm i -g yarn patch-package +# After installing nvm +ENV NVM_DIR="/home/coder/.nvm" +RUN echo 'export NVM_DIR="$HOME/.nvm"' >> /home/coder/.bash_env && \ + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> /home/coder/.bash_env && \ + echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> /home/coder/.bash_env + # Install Firebase CLI RUN curl -sL firebase.tools | bash