``update Migrate from custom Node image to official Node 22 image, install pnpm, update Dockerfile and entrypoint script``

This commit is contained in:
louiscklaw
2025-05-24 06:02:46 +08:00
parent e38e775fee
commit 24c62d940c
3 changed files with 23 additions and 7 deletions

View File

@@ -3,6 +3,8 @@
**/*log **/*log
**/*tmp **/*tmp
.pnpm-store
.env .env
.env.production .env.production

View File

@@ -1,5 +1,14 @@
FROM 192.168.10.61:5000/nvm_ubuntu:latest # Use official Node 18 base image
FROM node:22-slim
# Install pnpm globally
RUN npm install -g pnpm
# Set working directory
WORKDIR /app WORKDIR /app
RUN nvm install 22 # Copy your application code (optional, comment out if not needed)
# COPY . .
# Default command (optional)
CMD ["node"]

View File

@@ -3,12 +3,17 @@
# set -x # set -x
# nvm use 20 # nvm use 20
nvm install 18 # pnpm run build
nvm alias default 18
nvm use default
node -v
sleep infinity pnpm i
pnpm run build
while true; do
pnpm run start
sleep 3
done
# pnpm i -D # pnpm i -D