- 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.
This commit is contained in:
Guillaume "B.B." Van Hemmen 2025-07-14 18:08:25 +02:00
commit b35f03b863
Signed by: GuillaumeHemmen
GPG key ID: 7921E64524F7EB35

View file

@ -17,20 +17,18 @@ RUN ln -snf /usr/share/zoneinfo/$ARG_TZ /etc/localtime && \
RUN apt-get update && \ RUN apt-get update && \
apt-get upgrade -y && \ apt-get upgrade -y && \
apt-get install -y \ apt-get install -y \
# Development tools
build-essential \ build-essential \
git \
python3 \
# System utilities
ca-certificates \ ca-certificates \
curl \ curl \
git \
gnupg2 \ gnupg2 \
jq \
nano \
procps \ procps \
python3 \
sudo \ sudo \
unzip \ unzip \
wget \ wget && \
nano \
jq && \
# Clean up apt cache to reduce image size # Clean up apt cache to reduce image size
rm -rf /var/lib/apt/lists/* 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} && \ nvm use ${ARG_NODE_MAJOR} && \
npm i -g yarn patch-package 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 # Install Firebase CLI
RUN curl -sL firebase.tools | bash RUN curl -sL firebase.tools | bash