liveBook · Manning

Docker stop

As explained in Road to Kubernetes

docker stop is a Docker command that stops a running container.

docker stop stops a running Docker container. Identify the container with docker ps, then provide its container ID or assigned name. section 7.1.4

Use these forms when managing a container:

  • docker stop <container-id> stops the container identified by its unique ID. section 7.1.4
  • docker stop <container-name> stops the container by its assigned or custom name, such as docker stop boring_jepsen. section 7.1.4
  • After attaching a volume, stopping the container and running it again without -v detaches that volume. section 6.3.1

Stopping a named application container

A Python application started with the name my-rk8s-py can be stopped with docker stop my-rk8s-py. The custom runtime name identifies the container; rk8s-py remains the image name. section 6.3.1

Figure 7.3 Docker process manager

Inspect the Docker process-manager view to find running container IDs, images, ports, and names before stopping a container. section 7.1.4

How Road to Kubernetes covers it

How deep it goes
Defines identifier forms and connects stopping with inspection, logs, shell access, and volume detachment.
Examples
Uses NGINX and a Python volume container named my-rk8s-py as concrete stopping examples.
What it assumes
Assumes a running container and teaches identification through docker ps, container IDs, and assigned names.
What you can do after
Operate Docker containers by stopping them with docker stop <container-id> or docker stop <container-name>.
How it connects
Connects Docker containers with docker ps, docker logs, docker exec, docker run, and Docker volumes.

Also explained in

Compare how 2 books explain docker stop →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.