feat: docker 构建失败问题解决,及docker构建文档
This commit is contained in:
19
Yi.RuoYi.Vue3/Dockerfile
Normal file
19
Yi.RuoYi.Vue3/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM node:18-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
RUN yarn cache clean
|
||||
RUN rm -rf node_modules
|
||||
RUN yarn install --registry=https://registry.npmmirror.com
|
||||
|
||||
COPY . .
|
||||
|
||||
# RUN node --max-old-space-size=4096
|
||||
RUN yarn build:prod
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user