From the course: Docker for Developers: Create and Manage Docker Containers
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Using Docker Compose CLI commands - Docker Tutorial
From the course: Docker for Developers: Create and Manage Docker Containers
Using Docker Compose CLI commands
- [Instructor] Now that we have our app running with the docker compose up command, remember that you'll eventually need to stop it, start it again, or tear it down completely. That's where docker compose stop, start, and down come in. Let's start with docker compose stop. This command stops all running containers defined in your compose.yml file. It's like hitting pause. Your containers are still there, they're just not running. This is useful when you need to temporarily halt your application without removing any resources. You can also stop individual containers by specifying the service name. For example, docker compose stop app will stop the app container. Notice how you can use the name of the service from the compose file. You do not need the container ID or name. You can bring everything back online later with docker compose start. The docker compose start command starts any services that were previously…
Contents
-
-
-
-
-
-
(Locked)
What is Docker Compose?2m 24s
-
(Locked)
Writing a Docker Compose file3m 51s
-
Running a multi-container application2m 51s
-
(Locked)
Using Docker Compose CLI commands3m 18s
-
(Locked)
Challenge: Running a multi-container application48s
-
(Locked)
Solution: Running a multi-container application1m 30s
-
(Locked)
-
-
-
-
-