From the course: Docker for Data Engineers
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Building your first Docker image - Docker Tutorial
From the course: Docker for Data Engineers
Building your first Docker image
So far, we've pulled images that others have shared on Docker Hub and created containers using those images. We are now ready to build our first image. Now here I am in the /docker-demos folder, and within this folder, I have a single file, the Dockerfile. The Dockerfile contains all of the instructions that I'm going to use to build my very first image, and here is what this Dockerfile looks like. You can see this Dockerfile is very simple. There are just two Docker directives or two instructions in this image from alpine:latest and the CMD command. Let's focus on the first command, the FROM alpine:latest. The FROM command in a Dockerfile specifies the base image that your Docker image will build upon. alpine:latest is a base image that's available in Docker Hub. We'll use that base image to build up the rest of our image. This base image will serve as the first layer in our image. This is the first layer in our image and sets the foundation for subsequent layers. And the FROM…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Building your first Docker image5m 46s
-
(Locked)
Overriding the CMD instruction1m 52s
-
(Locked)
Using the Python base image5m 18s
-
(Locked)
Running a container in interactive mode2m 29s
-
(Locked)
Specifying the Dockerfile to run a Python application6m 36s
-
(Locked)
Running the containerized Python application5m 7s
-
(Locked)
Running multiple containers from the same image3m 28s
-
(Locked)
Building an image that runs a setup script6m 14s
-
(Locked)
Overriding the ENTRYPOINT directive4m 38s
-
(Locked)
-
-
-