Commit c11868a0 by zhangxingmin

push

parent 3d032a88
......@@ -14,8 +14,10 @@ RUN npm config set registry https://registry.npmmirror.com \
&& npm config set sass_binary_site https://npmmirror.com/mirrors/node-sass/ \
&& npm cache clean --force
# 安装依赖 (移除冗余的清理操作)
RUN npm install --legacy-peer-deps
# 关键修复:安装特定版本的uni-app相关依赖
RUN npm install -g @dcloudio/uni-cli-service@latest \
&& npm install @dcloudio/vue-cli-plugin-uni@latest \
&& npm install --legacy-peer-deps
# 复制源代码
COPY . .
......@@ -25,10 +27,6 @@ RUN npm run build
# 生产阶段
FROM nginx:1.21-alpine
# 替换生产阶段的Alpine源 (可选)
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
COPY --from=builder /app/dist/build/h5 /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8333
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment