'Docker build `Unexpected EOF error` when enable DOCKER_BUILDKIT

docker version: enter image description here

Dockerfile: enter image description here

docker build: enter image description here

PS: The same Dockerfile and the same docker build instruction on another amd64 machine(docker version is 20.10.7) runs ok. So Is DOCKER_BUILDKIT related to the specific Docker version?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source