SHARE
TWEET

Untitled

a guest Aug 24th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Docker commands
  2.  
  3. #### ID of the container
  4. docker ps
  5.  
  6. #### Inspect containers
  7. docker inspect [container-id]
  8.  
  9. #### Docker Images
  10. docker images
  11.  
  12. #### Removing All Unused Objects
  13. docker system prune
  14.  
  15. #### Postgres
  16.  
  17. *Pull image*
  18. docker pull postgres:alpine
  19.  
  20. *Run postgres*
  21.  
  22. docker run --name postgres-local -e POSTGRES_PASSWORD=123456 -d -p 5432:5432 postgres:alpine
  23.  
  24. *Interact with Postgres*
  25.  
  26. docker exec -it postgres-local bash
  27.  
  28. psql -U postgres
  29.  
  30. \du
  31.  
  32. create database name_database;
  33.  
  34. \l
  35.  
  36. \c name_database;
  37.  
  38. \dt
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top