© Joshua Cook 2017

Joshua Cook, Docker for Data Science, https://doi.org/10.1007/978-1-4842-3012-1_5

5. The Dockerfile

Joshua Cook

(1)Santa Monica, California, USA

Every Docker image is defined as a stack of layers, each defining fundamental, stateless changes to the image. The first layer might be the virtual machine’s operating system (a Debian or Ubuntu Docker image), the next the installation of dependencies necessary for your application to run, and all the way up to the source code of your application. The best way to leverage this system is via a Dockerfile.

Best Practices

A Dockerfile is a way to script the building of an image. This script uses a domain-specific language to tell the Docker daemon how to sequentially build a Docker image. ...

Get Docker for Data Science: Building Scalable and Extensible Data Infrastructure Around the Jupyter Notebook Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.