Skip to content

Commit

Permalink
update node installation in Earthfile
Browse files Browse the repository at this point in the history
  • Loading branch information
andyli committed Sep 26, 2023
1 parent 99d0752 commit c21c195
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ devcontainer-base:
# Clean up
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/

# https://github.com/nodesource/distributions#installation-instructions
RUN mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
ARG NODE_MAJOR=16
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

# Configure apt and install packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends apt-utils dialog 2>&1 \
Expand All @@ -70,8 +75,7 @@ devcontainer-base:
php-mbstring \
php-mysql \
php-sqlite3 \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs=16.* \
nodejs="$NODE_MAJOR.*" \
#
# Clean up
&& apt-get autoremove -y \
Expand Down

0 comments on commit c21c195

Please sign in to comment.