Skip to content

Instantly share code, notes, and snippets.

@otkrsk
Last active November 25, 2022 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otkrsk/4dda3fced4eebe6994cf8112fe0ab450 to your computer and use it in GitHub Desktop.
Save otkrsk/4dda3fced4eebe6994cf8112fe0ab450 to your computer and use it in GitHub Desktop.

Some Docker Commands to Remember

Stop Containers (oneline)

docker stop $(docker ps -a -q)

Remove Containers (oneline)

docker rm $(docker ps -a -q)

SSH Into a Running Container

docker exec -it <container name> /bin/bash

Inspect Network

docker network inspect <name>

If <name> is not known, run

docker network ls

Remove All Images

docker system prune
docker rmi $(docker images -a -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment