diff --git a/Dockerfile b/Dockerfile index 3cfdd8f..01ccc9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \