Skip to content

Instantly share code, notes, and snippets.

@sathishjayapal
Created March 12, 2024 15:45
Show Gist options
  • Save sathishjayapal/52e0babe10563ecbb76f2ba59417b93b to your computer and use it in GitHub Desktop.
Save sathishjayapal/52e0babe10563ecbb76f2ba59417b93b to your computer and use it in GitHub Desktop.
Docker copy paste commands
  • docker pull artifactory.company.com:portnumber/postgres
  • docker container ls --format "table {{.ID}}\t{{.Image}}\t{{.Names}}" (awesome output)
  • docker container ls --filter "status=paused" (paused container)
  • docker container ls (Running Containers)
  • docker container ls -a (all running containers)
  • docker container ls -n 2 (last two containers)
  • docker container ls -q (quiet mode)
  • docker container ls --latest -s (container size)
  • docker rm 8b17532f30c6 (remove container)
  • docker rm -f mycontainer (forcefully remove container)
  • docker ps -a
  • docker rm $(docker ps -qa) (Remove Multiple Docker Containers)
  • docker container prune -f (Remove all docker container)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment