By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Understand the lifecycle of containers and how to manage them with flags.
docker run
docker run -it ubuntu /bin/bash
docker ps
docker stop <container_id>
docker ps -a
docker rm <container_id>
docker run --rm -it ubuntu /bin/bash
docker run -d ubuntu /bin/bash
--rm
-it
-d
docker run -it ubuntu ls -l
ls -l
ls
docker: Error response from daemon: Container <container_id> is not running.
docker start <container_id>
docker run <image_name>
docker: Error response from daemon: Container <container_id> is not found.
docker run --rm <image_name>
docker: Error response from daemon: Container <container_id> is already running.
docker stop
docker rm
docker start
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.