GithubHelp home page GithubHelp logo

nittey / docker-postgres-9.2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tntim96/docker-postgres-9.2

0.0 0.0 0.0 22 KB

Postgresql 9.2

License: GNU General Public License v2.0

Shell 100.00%

docker-postgres-9.2's Introduction

dockerfiles-centos-postgres

Dockerfile to build PostgreSQL with PostGIS on CentOS 7

Ported from https://github.com/CentOS/CentOS-Dockerfiles/tree/master/postgres/centos7

Setup

To build the image

# docker build --rm -t tntim96/postgresql-postgis:9.2 .

Launching PostgreSQL

Quick Start (not recommended for production use)

docker run --name=postgresql -d -p 5432:5432 tntim96/postgresql-postgis

To connect to the container as the administrative postgres user:

docker run -it --rm --volumes-from=postgresql tntim96/postgresql-postgis:9.2 sudo -u
postgres -H psql

Creating a database at launch

You can create a postgresql superuser at launch by specifying DB_USER and DB_PASS variables. You may also create a database by using DB_NAME.

docker run --name postgresql -d \
-e 'POSTGRES_USER=pg_admin' \
-e 'POSTGRES_PASSWORD=pg_admin' \
-e 'POSTGRES_DB=pg_admin' \
tntim96/postgresql-postgis:9.2

To connect to your database with your newly created user:

psql -U username -h $(docker inspect --format {{.NetworkSettings.IPAddress}} postgresql)

docker-postgres-9.2's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.