build(Dockerfile): 使用 pnpm 替代 npm 进行包管理
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			- 移除原有的 npm 安装命令 - 添加 pnpm 的全局安装命令 - 使用 pnpm 配置镜像源 - 替换生产环境中的 npm 安装命令为 pnpm
This commit is contained in:
		
							parent
							
								
									5aa364e9be
								
							
						
					
					
						commit
						6b768babfd
					
				
							
								
								
									
										10
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Dockerfile
									
									
									
									
									
								
							| @ -7,8 +7,10 @@ COPY package.json . | ||||
| COPY package-lock.json* . | ||||
| 
 | ||||
| # 设置npm镜像 | ||||
| RUN npm config set registry https://registry.npmmirror.com/ && \ | ||||
|     npm install | ||||
| RUN npm config set registry https://registry.npmmirror.com | ||||
| 
 | ||||
| RUN npm install -g pnpm | ||||
| RUN pnpm config set registry https://registry.npmmirror.com | ||||
| 
 | ||||
| COPY . . | ||||
| 
 | ||||
| @ -24,8 +26,8 @@ COPY --from=builder /app/package.json . | ||||
| COPY --from=builder /app/bootstrap.js . | ||||
| 
 | ||||
| # 设置npm镜像 | ||||
| RUN npm config set registry https://registry.npmmirror.com/ && \ | ||||
|     npm install --production | ||||
| RUN pnpm config set registry https://registry.npmmirror.com | ||||
| RUN pnpm install --production | ||||
| 
 | ||||
| ENV NODE_ENV=production | ||||
| ENV PORT=8001 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 lixin
						lixin