Use your preferred Git workflow to achieve super-fast and error free environment promotion with Docker
TL;DR Deploy Docker FastPath_ _in your build system.
One of the most useful piece of information that I learned from the classic _Continuous Delivery_ by Humble and Farley (got get your copy now!) is to Only Build Your Binaries Once.
Many build systems use the source code held in the version control system as the canonical source for many steps. The code will be compiled repeatedly in different contexts […]. Every time you compile the code, you run the risk of introducing some difference
[J. Humble, D. Farley, Continuous Delivery, p. 133]
In a study researchers found out that:
[…] typical circumstances under which a build breaks are missing referenced files, mistakenly checking in work-in-progress, and transitive dependencies.
Also, building again and again the same codebase is time expensive and it makes harder for developers to get timely feedback.
So, nowadays it’s even more necessary to “Only Build Your Binaries Once”. In a Docker development pipeline this translates into:
Only Build Your Images Once
FastPath is essential to use in deployments when it comes to Docker, so this is an interesting read.