Advertisement
Guest User

Untitled

a guest
Nov 29th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Commands I run:
  2. docker build . -t postgres -f Dockerfile
  3. docker run -v /home/maxime_lacroix69110/machine-overview/DataBase/again/:/var/lib/postgresql/data postgres
  4.  
  5. #Getting the image
  6. FROM postgres:11.1
  7. #Creating the user
  8. USER postgres
  9. #Setting env
  10. ENV POSTGRES_USER=postgres
  11. ENV POSTGRES_PASSWORD=toor
  12. VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
  13.  
  14. #Adding the official postgres script for setting everything up (all the special port configs)
  15. ADD https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh /
  16. #Copying my database tables
  17. COPY ./DBInit.sql /
  18.  
  19. #Then the idea is to launch postgres with the sql tables set out
  20. #CMD "postgres < cat DBInit.sql" does not work as cat is not installed as well as sudo
  21. #I tried to get it work but it's just a mess of errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement