From the course: Docker for Data Scientists

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Dockerfile basics

Dockerfile basics

From the course: Docker for Data Scientists

Start my 1-month free trial

Dockerfile basics

- [Instructor] Docker builds images automatically by reading the instructions from a Dockerfile in order. So let's look at the components of a Dockerfile. And to help put things in context I'll show you the different components from a file we'll be using late in the course. A Dockerfile usually starts with a FROM instruction. The image can be any valid image. A good way to get started is to use one of the current official images as the basis for your image. So in line one we're using a Python image which is built up on top of a Linux DAEMON image. You can also add labels to your image to help organize images by project. The label instruction adds metadata to an image and is a key value pair. You can include spaces within a label value by using quotes and run across several lines using a backslash. So here I'm using the label maintainer, version and description so this gives any user off this image whom to contact, the current version and the description of this image. The WORKDIR…

Contents