By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Start and manage a Docker Compose application with ease. docker-compose up.
docker-compose up -d
docker-compose ps
docker-compose logs -f
docker-compose down --rmi all
docker rm $(docker ps -aq -f status=exited)
docker-compose up -d && docker-compose logs -f
-d
-f
docker-compose restart web
web
docker-compose build
ERROR: Service 'web' uses an image, but 'docker-compose config' indicates that the image does not exist: ...
docker-compose pull
ERROR: for web *:80/tcp is already allocated
docker-compose.yml
ERROR: Service 'non-existent-service' not found
Status
Up
docker-compose exec web /bin/bash
• docker-compose up: Starts and runs containers in detached mode.• docker-compose down: Stops and removes containers.• docker-compose logs: Displays container logs.• docker-compose exec: Executes a command inside a container.• docker-compose build: Builds a Docker image.• docker-compose pull: Pulls the latest image from the registry.• docker-compose restart: Restarts a container.• docker-compose ps: Lists running containers.• docker-compose config: Displays the configuration of the project.• ⚠️ docker-compose down --rmi all: Deletes all images and containers.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.