fix(docker): normalize NODE_PATH and harden Dockerfile installs; use curl -fsSL; consolidate Alpine apk installs; update .dockerignore; bump @git.zone/tsdocker devDependency

This commit is contained in:
2026-02-07 10:54:17 +00:00
parent 9b84e0b72c
commit c4f2c3b9c5
10 changed files with 57 additions and 30 deletions

View File

@@ -26,7 +26,7 @@ RUN apk add --no-cache \
tini
# Install NVM (latest version for better Alpine/musl support)
RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
RUN mkdir -p $NVM_DIR && curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# Make nvm available globally in all bash shells (interactive + non-interactive)
# IMPORTANT: Create /etc/bash.bashrc with nvm initialization
@@ -66,7 +66,7 @@ RUN NVM_MUSL_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64-musl" || echo "x6
&& pnpm -v \
&& pnpm config set unsafe-perm true
ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules
ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION_LTS/lib/node_modules
ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH
# Set entrypoint to make nvm available in all runtime contexts