-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用Dockerfile和docker-compose.yaml部署项目失败 #121
Comments
@meetqy |
你需要将整个项目clone下来 然后 |
不行啊,我是整个clone下来也是和你一样的错误 |
你这个错误是因为拉不到镜像。 |
按照DEVELOPMENT.md中的指南,先后在一个文件夹下创建Dockerfile和docker-compose.yaml两个文件,复制了相应的内容,然后通过docker-compose up命令创建容器。
运行程序,在build镜像的过程中出错,错误信息如下:
[+] Building 8.7s (10/14)
=> [internal] load build definition from Dockerfile 0.4s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.5s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:20-alpine3.16 2.1s
=> [base 1/4] FROM docker.io/library/node:20-alpine3.16@sha256:f9b54b46639a9017b39eba677cf44c8cb967 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 662B 0.0s
=> CACHED [base 2/4] RUN corepack enable 0.0s
=> [base 3/4] COPY . /app 0.4s
=> [base 4/4] WORKDIR /app 0.6s
=> ERROR [prod-deps 1/2] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --fr 3.5s
=> CANCELED [build 1/2] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lo 4.4s
failed to solve: executor failed running [/bin/sh -c pnpm install --prod --frozen-lockfile --ignore-scripts]: exit code: 1`
出现错误,导致无法完成镜像的编译,后面也就没法部署。
从错误信息看不出什么原因的。
The text was updated successfully, but these errors were encountered: