在下面与此Dockerfile出错时,您将获得任何帮助? 错误:
警告@ vue / cli> @ vue / cli-shared-utils> request@2.88.2:请求已被弃用,请参见https://github.com/request/request/issues/3142 警告@ vue / cli> @ vue / cli-ui> vue-cli-plugin-apollo> apollo> git-parse> babel-polyfill> core-js@2.6.11:不再维护core-js @ <3由于问题的数量,不建议使用。请将您的依赖项升级到core-js @ 3的实际版本。 警告@ vue / cli> @ vue / cli-ui> vue-cli-plugin-apollo> apollo> git-parse> babel-polyfill> babel-runtime> core-js@2.6.11:core-js @ <3是由于问题的数量,不再维护且不建议使用。请将您的依赖项升级到core-js @ 3的实际版本。 错误发生意外错误:“ https://registry.yarnpkg.com/@quasar-cli:请求\” https://registry.yarnpkg.com/@quasar-cli \”返回了405”。 信息如果您认为这是一个错误,请使用“ /usr/local/share/.config/yarn/global/yarn-error.log”中提供的信息打开一个错误报告。 info请访问https://yarnpkg.com/en/docs/cli/global,以获取有关此命令的文档。 命令'/ bin / sh -c yarn global add @ vue / cli @ quasar-cli'返回非零代码:1
FROM node:12-alpine as dependencies
WORKDIR /app
CMD npx quasar dev
EXPOSE 8083
USER root
**RUN yarn global add @vue/cli @quasar-cli --network-timeout 100000**
ADD package.json .
RUN yarn --network-timeout 100000
COPY . .
# build static assets to be served
FROM node:12-alpine as builder
RUN yarn global add @vue/cli @quasar-cli
WORKDIR /app
COPY --from=dependencies /app /app
ENV PROD 1
ARG PROJECT_ID
ENV PROJECT_ID=${PROJECT_ID}
RUN quasar build
# small final image containing only the static assets
FROM node:12-alpine as server
COPY --from=builder /app/dist /app/dist
RUN yarn global add http-server
WORKDIR /app/dist/spa-mat
ARG PORT=8088
ENV PORT=${PORT}
EXPOSE $PORT
CMD sh -c http-server . -p $PORT -s