Skip to content
Brent Kulwicki edited this page Jun 11, 2023 · 2 revisions

Useful stuff to remember for Docker

Running CLI commands in a container

Whenever running a CLI command in a container, you will need to exec inside the container itself. You do that by doing docker exec <conatiner-name> followed by the command line command.

Look at Docker "things"

You can list all the docker things with the ls command.

  • List containers: docker container ls
  • List images: docker image ls
  • List volumes: docker volume ls

Remove Docker "things"

Similar to listing Docker stuff, you can remove it with the rm command

  • Remove container: docker container rm <container-name>
  • Remove image: docker image rm <image-name>
  • Remove volume: docker volume rm <volume-name>

Clone this wiki locally