Hello, my OS is Windows 11 Pro Version 21H2 (OS build 22000.527) and my Docker version is:
Client:
Cloud integration: v1.0.22
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:44:07 2021
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Desktop 4.5.1 (74721)
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.16.12
Git commit: 459d0df
Built: Mon Dec 13 11:43:56 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
My issue
Iāve been trying to build an image from my Dockerfile but I run into an error when i run docker build .
My dockerfile is the following:
FROM node:latest
WORKDIR /usr/src/app
COPY package*.json .
RUN npm install
COPY . .
CMD ["npm", "start"]
The output is the following:
docker build .
[+] Building 2.6s (5/9)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 35B 0.0s
=> [internal] load metadata for docker.io/library/node:latest 2.6s
=> [1/5] FROM docker.io/library/node:latest@sha256:e3b6896c517a81c973f6d08092f72b2318dd8c1ce42b3df032958d7cd1d3c 0.0s
=> ERROR [internal] load build context 0.0s
=> => transferring context: 0.0s
------
> [internal] load build context:
------
rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: PROTOCOL_ERROR
The dockerfile is located in the root of my node project and itās located in the C drive. Iāve tried running this in the Hyper-V engine, as well as the WSL2 engine, but the output is the same.
I think it fails for some reason when downloading the node:latest image, but if I change it to node:alpine the output is the same. But when I run docker pull node:latest
it succeds without any problem.