From the course: Docker Essential Training
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Starting your app with ENTRYPOINT - Docker Tutorial
From the course: Docker Essential Training
Starting your app with ENTRYPOINT
- Okay, so we defined our base image and copied our mysterious app into this container image. There's only one thing left to do. We got to make this image run our app. Okay, we actually have a few other things to do after that but getting our image to run our app is pretty important. There are two Dockerfile commands that can execute stuff. Entrypoint and CMD. Let's go ahead and start with entrypoint. Entrypoint, like the name implies, configures the container image to run an application when a container is created from it. If you recall from earlier, our base image is configured to have containers run bash on startup. Consequently, containers created from our image will do the same thing. This will change once we define an entrypoint command, which we'll do in a few minutes, so get excited about that. Like the run command that we saw earlier, entrypoint takes two forms. The shell form and the exec form. They work exactly…
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
-
-
-
-
-
-
Introduction to Dockerfiles1m
-
(Locked)
The anatomy of a Dockerfile4m 37s
-
(Locked)
Sourcing other Docker images with FROM4m 32s
-
(Locked)
Building your first image3m 59s
-
(Locked)
Adding and copying files with COPY and ADD3m 51s
-
(Locked)
Updating the image5m 22s
-
(Locked)
Customizing your Docker image with RUN7m 46s
-
(Locked)
Starting your app with ENTRYPOINT9m 25s
-
(Locked)
"Starting" your app with CMD7m
-
(Locked)
Adding variables with ENV and ARG9m 39s
-
(Locked)
Other helpful Dockerfile commands5m 36s
-
(Locked)
Multi-stage builds9m 57s
-
(Locked)
Multi-platform images15m 10s
-
(Locked)
Multi-app images8m 8s
-
(Locked)
Challenge: Build and run your first image2m 1s
-
(Locked)
Solution: Build and run your first image5m 54s
-
-
-
-
-
-
-
-