Docker FastPath: Only Build Your Images Once

· Code Links devops ·

Martino Fornasa:

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]

You can notice that the book has been written in 2011 by the use the the word “compiled”. Fast forward in 2017, and Javascript-based technologies reach a staggering 85% preference in the last StackOverlow Developer Survey and dynamic languages are dominating web development. Unsurprisingly that advice is still valuable today: you just need to change “compile” with your preferred build method (npm install, bundle install, webpack, etc.).

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.

Source: medium

About the Author: Roger Stringer

It's all about finding that Work-Life Balance.

I spend most of my time solving problems for people, and otherwise occupying myself with being a dad, cooking, coding, speaking, learning, writing, reading, and the overall pursuit of life.

Learn More
Roger Stringer
  • LinkedIn
  • Reddit
  • Google+
  • Pinterest
  • Pocket
Comments powered by Disqus