Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-101 authored Apr 20, 2024
1 parent d362517 commit ffa2d11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ RUN apk update && apk add --no-cache \
# Environment for NVM and Node.js installation
ENV NVM_DIR="/root/.nvm"
ENV NODE_VERSION="20"
# Set unofficial Node.js builds mirror for musl
ENV NVM_NODEJS_ORG_MIRROR="https://unofficial-builds.nodejs.org/download/release"

# Install NVM and configure the environment
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& echo 'export NVM_DIR="/root/.nvm"' >> /etc/profile.d/nvm.sh \
&& echo '[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh"' >> /etc/profile.d/nvm.sh \
&& echo "nvm_get_arch() { nvm_echo 'x64-musl'; }" >> /root/.nvm/nvm.sh \
&& echo 'export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release' >> /root/.nvm/nvm.sh \
&& . /etc/profile.d/nvm.sh \
&& latest_version=$(curl -s https://unofficial-builds.nodejs.org/download/release/ | grep -o "v${NODE_VERSION}\.[0-9]*\.[0-9]*" | sort -V | tail -n1) \
&& nvm install $latest_version \
Expand Down

0 comments on commit ffa2d11

Please sign in to comment.