Advertisement
egasimus

Untitled

Sep 19th, 2013
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # PostgreSQL 9.3
  2.  
  3. FROM ubuntu
  4.  
  5. RUN apt-get install -qq wget
  6. RUN sed -i '$a deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' /etc/apt/sources.list
  7. RUN wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add -
  8. RUN apt-get update
  9. RUN apt-get install -qq postgresql-9.3 postgresql-client-9.3 sudo
  10. RUN ln -s /usr/lib/postgresql/9.3/bin/* /usr/local/bin/
  11. RUN mkdir /opt/pgsql
  12. RUN chown -R postgres:postgres /opt/pgsql
  13. RUN sudo -u postgres initdb -D /opt/pgsql
  14.  
  15. EXPOSE 5432
  16.  
  17. USER postgres
  18. ENTRYPOINT ["/usr/lib/postgresql/9.3/bin/pg_ctl", "-D /opt/pgsql"]
  19. CMD ["start"]
Advertisement
RAW Paste Data Copied
Advertisement