#2 - Refine Dockerfile: replace NODE_MAJOR with ARG_NODE_MAJOR and remove npm from installation
This commit is contained in:
parent
99210a7ad2
commit
65faca46be
1 changed files with 2 additions and 2 deletions
|
@ -35,8 +35,8 @@ RUN apt-get update && \
|
|||
# -------------------------------------------------------------------
|
||||
# Install Node.js from the official NodeSource repository (no NVM)
|
||||
# -------------------------------------------------------------------
|
||||
RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - && \
|
||||
apt-get update && apt-get install -y nodejs npm && \
|
||||
RUN curl -fsSL "https://deb.nodesource.com/setup_${ARG_NODE_MAJOR}.x" | bash - && \
|
||||
apt-get update && apt-get install -y nodejs && \
|
||||
# Clean up apt cache to reduce image size
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue