Skip to main content
InterviewHubPRO
Section Overview
Q6

Question 6 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

12%
Docker & Containers (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is the difference between `docker run`, `docker start`, `docker stop`, and `docker kill`?

junior LevelMost AskedDocker & Containers

In Simple Words:

  • docker run: Combines docker create (pulls image and allocates container layer) and docker start (executes process). Spawns a brand new container instance.
  • docker start: Starts an existing, stopped container without recreating its container filesystem layer.
  • docker stop: Gracefully stops a running container. Sends SIGTERM to PID 1, waits a grace period (default 10 seconds) for clean shutdown (closing DB connections, flushing buffers), and sends SIGKILL if the process fails to terminate.
  • docker kill: Immediately terminates the container process by sending SIGKILL directly without waiting for graceful cleanup.