#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.
This commit is contained in:
parent
fdc8276d0e
commit
b35f03b863
1 changed files with 11 additions and 7 deletions
18
Dockerfile
18
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue