如何在构建Vue应用的Docker镜像时修复“流由RST_STREAM终止”的错误?

huangapple go评论128阅读模式
英文:

How can I fix the 'stream terminated by RST_STREAM' error when building a Docker image for a Vue app?

问题

我正在尝试使用Docker构建一个新的镜像,但是当我输入构建命令时:

docker image build -t vue-app .

我收到以下错误消息:

[+] Building 0.2s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                                  0.1s
 => => transferring dockerfile: 229B                                                                                  0.0s
 => [internal] load .dockerignore                                                                                     0.2s
 => => transferring context: 67B                                                                                      0.0s
ERROR: failed to solve: Internal: Internal: stream terminated by RST_STREAM with error code: INTERNAL_ERROR

此外,我的Dockerfile如下:

FROM node:latest

WORKDIR /app

COPY . .

RUN npm install

CMD ["npm", "run", "dev"]

如果您能帮助我,我将不胜感激。

我已经尝试过:

  • 重新启动我的机器;
  • 创建一个.dockerignore文件;
  • 更改端口;
英文:

I'm trying to build a new image with docker, but when I enter the build command:
docker image build -t vue-app .

I get this error:

[+] Building 0.2s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                                  0.1s
 => => transferring dockerfile: 229B                                                                                  0.0s
 => [internal] load .dockerignore                                                                                     0.2s
 => => transferring context: 67B                                                                                      0.0s
ERROR: failed to solve: Internal: Internal: stream terminated by RST_STREAM with error code: INTERNAL_ERROR

Also my Dockerfile is

FROM node:latest

WORKDIR /app

COPY . .

RUN npm install

CMD ["npm", "run", "dev"]

I would be grateful if you can help me.

I tried:
- restarting my machine;
- creating a .dockerignore file;
- changing ports;

答案1

得分: 1

我尝试在用户根目录中构建一个Dockerfile,问题通过将文件夹移动到桌面上来解决,试试看,另外我读到git可能会在某种程度上干扰。

英文:

I tried to build a Dockerfile in the users root folder, the problem was solved by simply moving the folder to the desktop, try it, plus I read that git can somehow interfere

huangapple
  • 本文由 发表于 2023年5月28日 04:07:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76348834.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定