How to build shell's source code into a docker image rapidly.
git clone https://github.com/solomonxu/docker-fast-build-shell.git
Build docker images firstly, and output time stamps before and after build. This will build pre-image and final image, and cost about 2~10 minutes.
date; make; date;
Build docker image secondly, and output time stamps before and after build. This will build final image only, and just cost about 2 seconds.
date; make; date;
Delete the final docker image, and leave pre-image alone.
make cleanup-diag
Build docker image thirdly, and output time stamps before and after build. This will build final image only, and just cost less than 2 seconds.
date "+%Y-%m-%d %H:%M:%S.%N"; make; date "+%Y-%m-%d %H:%M:%S.%N";
make push
make cleanup
You can find a Chinese article How to build docker image of shell rapidly and click to download.