Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Commands I run:
- docker build . -t postgres -f Dockerfile
- docker run -v /home/maxime_lacroix69110/machine-overview/DataBase/again/:/var/lib/postgresql/data postgres
- #Getting the image
- FROM postgres:11.1
- #Creating the user
- USER postgres
- #Setting env
- ENV POSTGRES_USER=postgres
- ENV POSTGRES_PASSWORD=toor
- VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
- #Adding the official postgres script for setting everything up (all the special port configs)
- ADD https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh /
- #Copying my database tables
- COPY ./DBInit.sql /
- #Then the idea is to launch postgres with the sql tables set out
- #CMD "postgres < cat DBInit.sql" does not work as cat is not installed as well as sudo
- #I tried to get it work but it's just a mess of errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement