这是Dockerfile:
# tag block to refering
FROM node:alpine as builder
WORKDIR /home/server
COPY package.json .
RUN npm install
COPY . .
CMD ["npm", "run", "build"]
# on second step use another core image
FROM nginx
# copy files builded on previous step
COPY --from=builder /home/server/build usr/share/nginx/html
当使用命令“docker build”在本地机器上构建图像时。- 它工作正常,但是当我试图将项目放到 zeit 时,我得到下一个错误:
Step 8/8 : COPY --from=builder /home/server/build usr/share/nginx/html
> COPY failed: stat /var/lib/docker/overlay2/a114ae6aae803ceb3e3cffe48fa1694d84d96a08e8b84c4974de299d5fa35543/merged/home/server/build: no such file or directory
它可以是什么?谢谢。