Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. # build with docker compose
  2. docker-compose build
  3.  
  4. # run with docker-compose and open bash
  5. docker-compose run --rm <image> /bin/bash
  6.  
  7. # Stop all Docker containers
  8. docker stop $(docker ps -a -q)
  9.  
  10.  
  11. # DANGER ZONE
  12.  
  13. # This will remove:
  14. # - all stopped containers
  15. # - all networks not used by at least one container
  16. # - all dangling images
  17. # - all dangling build cache
  18. docker system prune
  19.  
  20. # DANGER: Removes all docker containers
  21. docker rm $(docker ps -a -q)
  22.  
  23. # DANGER: Removes all images, even those images that are referenced in repositories
  24. docker rmi $(docker images -q) --force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement