Reputation: 81
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;
Upvotes: 8
Views: 4656
Reputation: 1
Error: Internal: stream terminated by RST_STREAM with error code: INTERNAL_ERROR when running docker build -t test-node .
This issue might be caused by improper text encoding in your Dockerfile or other project files. Ensure that all files, especially the Dockerfile, are saved with UTF-8 encoding.
In VS Code, you can fix this by:
Click the encoding indicator in the status bar (e.g., CRLF or another format). Select "Save with Encoding" and choose UTF-8. Retry the build after saving the files. enter image description here
Upvotes: 0
Reputation: 1
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!
Upvotes: 0
Reputation: 356
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.
Upvotes: 13
Reputation: 21
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
Upvotes: 2