Docker General Commands

This is my personal library. I keep what I’ve learned recently on procry to have it handy. If a new docker command is needed, I will add it to this topic.

containerid: This is what I mentioned is written under STATUS. In other words, when listing containers below, it is the ID of the container written under status. It looks like random gibberish like cs79234nfdkf or something similar.

Listing all existing containers, whether running or not:

docker container ls

Listing running containers

docker ps

To stop a running Container

docker stop containerid

To start a non-running container

docker start containerid

To delete a Container (It requires you to stop it first to delete it. So if you are going to delete it, stop it first using the commands above.)

docker rm containerid