From the course: Kubernetes: Your First Project (2021)
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Solution: Write a teardown make target - Kubernetes Tutorial
From the course: Kubernetes: Your First Project (2021)
Solution: Write a teardown make target
- Let's solve this challenge. First, we'll need to know how to stop running docker containers. Now, if I look at docker dash dash help, you'll see that there is a stop command right here that will stop one or more running containers. That seems like an appropriate command to use. So we'll probably need to use this. Let's take a look at our make file here. In our make file we named the container explorecalifornia.com since it came after the dash dash name command light option here. However, because this container has the dash dash RM option set, once we stop the container it will automatically be removed. So with those three facts intel, let's go ahead and create a new target called stop underscore website. Now you may have called this something different in your challenge, and that's totally fine. Now, if you recall, if we tried to run this and we created a file called stop website, this target wouldn't actually run…
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
-
-
-
-
-
Installing Docker2m 49s
-
(Locked)
Writing our project's Dockerfile5m 28s
-
(Locked)
Building the Docker image from the Dockerfile4m 27s
-
(Locked)
Writing our project's makefile2m 51s
-
(Locked)
Testing the website with make1m 41s
-
(Locked)
Challenge: Write a teardown make target32s
-
(Locked)
Solution: Write a teardown make target2m 40s
-
-
-
-
-
-