移除了项目中的 Dockerfile 文件。该文件包含了以下内容: - 使用 Node.js LTS 版本的 Alpine Linux 作为基础镜像 - 设置工作目录为 /build - 配置 Node-Sass 和 npm 镜像地址 - 复制 package.json 文件并运行 yarn - 复制项目文件并执行构建 - 切换到 nginx 镜像,创建 /
This commit is contained in:
		
							parent
							
								
									409a6f835a
								
							
						
					
					
						commit
						0d3902312d
					
				
							
								
								
									
										16
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								Dockerfile
									
									
									
									
									
								
							| @ -1,16 +0,0 @@ | |||||||
| FROM node:lts-alpine |  | ||||||
| WORKDIR /build |  | ||||||
| # 设置Node-Sass的镜像地址 |  | ||||||
| RUN npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ |  | ||||||
| # 设置npm镜像 |  | ||||||
| RUN npm config set registry https://registry.npm.taobao.org |  | ||||||
| COPY package.json /build/package.json |  | ||||||
| RUN yarn |  | ||||||
| COPY ./ /build |  | ||||||
| RUN npm run build |  | ||||||
| 
 |  | ||||||
| FROM nginx |  | ||||||
| RUN mkdir /app |  | ||||||
| COPY --from=0 /build/dist /app |  | ||||||
| COPY --from=0 /build/nginx.conf /etc/nginx/nginx.conf |  | ||||||
| EXPOSE 80 |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 lixin
						lixin