Dockerfiles are the templates used to create images. In this video, learn about the different components of a Dockerfile.
- [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. …
- Why Docker is gaining prominence
- Running a container
- Docker under the hood
- Working with Dockerfiles
- Uploading images to Docker Hub
- Common use cases for Docker