The latest Docker versions come with new opt-in builder backend BuildKit.
https://www.docker.com/blog/advanced-dockerfiles-faster-builds-and-smaller-images-using-buildkit-and-multistage-builds/
origin - https://www.pipiscrew.com/?p=18256 faster-builds-and-smaller-images-using-buildkit