Skip to content

How to add shell's source code and build into a docker image rapidly.

License

Notifications You must be signed in to change notification settings

solomonxu/docker-fast-build-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-fast-build-shell

How to build shell's source code into a docker image rapidly.

1. Clone repository to local host.

git clone https://github.com/solomonxu/docker-fast-build-shell.git

2. Firstly build.

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;

3. Secondly build.

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;

4. Delete the final docker image.

Delete the final docker image, and leave pre-image alone.

make cleanup-diag

5. Thirdly build.

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";

6. Push the final image to docker repository.

make push

7. Cleanup all images locally.

make cleanup

You can find a Chinese article How to build docker image of shell rapidly and click to download.

About

How to add shell's source code and build into a docker image rapidly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published