Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 585 Bytes

docker-command-cheat-sheet.md

File metadata and controls

24 lines (18 loc) · 585 Bytes

All command you should known about docker in DEVASC exam

  1. list local images
  • docker images
  • docker image ls
  1. list containers (including running and stopped)
  • docker ps
  • docker ps -a
  1. container control command (stop and remove)
  • docker stop container_id
  • docker rm container_id
  1. run a container (include common uses flags)
  • docker run -t -i -p 8080:80 image:tag command
  • docker run -d -ti -P image:tag
  1. build an image
  • docker build -t name:tag ./
  1. image management (remove local image)
  • docker image rm name:tag
  • docker rmi name:tag