- 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
parent fdc8276d0e
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 && \
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