Closed liwan11123123 closed 6 years ago
目前遇到这种情况,在linux 下构建出错。
Dockerfile 这是我的dockerfile 文件 `
FROM node:8.12 as build-stage WORKDIR /app COPY package.json /app/ RUN npm install COPY ./ /app/ RUN npm run build:prod
FROM nginx:1.15.4 COPY --from=build-stage /app/dist/prod/ /usr/share/nginx/html
COPY --from=build-stage /app/_nginx/kaixinliao.conf /etc/nginx/conf.d/default.conf COPY --from=build-stage /app/_nginx/nginx.conf /etc/nginx/nginx.conf
`
@liwan11123123 暂时没有打算, 因为针对纯粹的单页应用来说, 使用docker的意义并不是很大. 针对你这个问题, 给到的信息量太少, 无法获取错误的来源, 请根据自己的实际情况仔细调试
目前遇到这种情况,在linux 下构建出错。
Dockerfile 这是我的dockerfile 文件 `
Stage 0, "build-stage", based on Node.js, to build and compile the frontend
FROM node:8.12 as build-stage WORKDIR /app COPY package.json /app/ RUN npm install COPY ./ /app/ RUN npm run build:prod
Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.15.4 COPY --from=build-stage /app/dist/prod/ /usr/share/nginx/html
Copy the default nginx.conf provided by tiangolo/node-frontend
COPY --from=build-stage /app/_nginx/kaixinliao.conf /etc/nginx/conf.d/default.conf COPY --from=build-stage /app/_nginx/nginx.conf /etc/nginx/nginx.conf
`