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

3

8

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;

Bor answered 27/5, 2023 at 20:7 Comment(1)
I have the same problem on Windows 11 with a fresh install of Docker & WSL2. I tried building both from the windows terminal and the WSL command line.Starstudded
P
9

This issue has to do with the "Dockerfile" text encoding, change it to UTF-8, you can do that in notepad++ or any other editor like VS Code. This fixed the issue for me.

enter image description here

Particularity answered 1/11, 2023 at 8:16 Comment(0)
I
2

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

Inna answered 14/7, 2023 at 19:15 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Flinders
This is still a useful clue, even if not the full solutionHersh
A
0

You need to open the Dockerfile using VS Code, then write your code to it using utf-8 first. Any encoding other than utf-8 will cause an error!

Airbrush answered 18/7 at 9:32 Comment(1)
duplicate of stackoverflow.com/a/77401196Cornett

© 2022 - 2024 — McMap. All rights reserved.