Skip to Content
Implementing Modern DevOps
book

Implementing Modern DevOps

by David Gonzalez, Danny Varghese
October 2017
Intermediate to advanced
326 pages
7h 20m
English
Packt Publishing
Content preview from Implementing Modern DevOps

Building Docker images

In the previous sections, we built an image using the commit command of Docker. Although it works, I can see a big problem with it: it is not repeatable. There is no easy way of rebuilding the image once and over again when the software installed in the image is patched due to new vulnerabilities or versions.

In order to solve this problem, Docker provides a better way of building images: Dockerfiles.

A Dockerfile is a file that contains a set of ordered commands required to leave the image, ready to be used. Things such as installing software or upgrading the version of the kernel as well as adding users are common activities that can be carried in a Dockerfile. Let's look at an example:

FROM node:latestRUN mkdir -p ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical DevOps

Practical DevOps

joakim verona
Hands-On Security in DevOps

Hands-On Security in DevOps

Tony Hsiang-Chih Hsu
SRE with Java Microservices

SRE with Java Microservices

Jonathan Schneider

Publisher Resources

ISBN: 9781786466877Supplemental Content