Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goern/postgresql-docker
https://github.com/goern/postgresql-docker
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/goern/postgresql-docker
- Owner: goern
- License: gpl-2.0
- Created: 2014-06-27T09:30:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-27T09:35:34.000Z (over 10 years ago)
- Last Synced: 2024-10-09T20:52:59.234Z (about 1 month ago)
- Language: Shell
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dockerfiles-fedora-postgres
===========================Fedora dockerfile for PostgreSQL
1. To build
Copy the sources down and do the build-
# docker build -rm -t username/postgresql . |& tee postgres_build.log
2. To run
If port 5432 is open on your host:
# docker run -d -p 5432:5432 username/postgresql
or to assign a random port that maps to port 5432 on the container:
# docker run -d -p 5432 username/postgresql
To see the random port that the container is listening on:
# docker ps
3. To test
To find the IP address, get the container ID:
# docker ps
Then get the IP addr:
# docker inspect 7a1e1a80e948 | grep -i ipaddress
Now connect to the database. In this case, it's called 'dockerdb' and the
username is 'dockeruser' with a password of 'password', which was set via the
postgres_user.sh script.# psql -h 172.17.0.x -U dockeruser -d dockerdb