Build the container and running it
docker build --rm -t mars/postgres:centos6 .
docker run --rm -t -i -p 5432:5432 --name postgres mars/postgres:centos6
To do:
Make the postgres data directory a volume that is connected to the host of the container in order to separate data directory and actual instance
Avoid the initialization of postgres if the data dir already exists
Launch the container as:
docker run --rm -t -i -p 5432:5432 -v /var/lib/pgsql/9.3/data:/var/lib/pgsql/9.3/data --name postgres mars/postgres:centos6
If developing on Mac remember to map the postgres port tp your localhost in Virtualbox
VBoxManage controlvm boot2docker-vm natpf1 āpostgres,tcp,127.0.0.1,5432,,5432"
Content type
Image
Digest
sha256:8b9bfb70eā¦
Size
90.5 MB
Last updated
almost 11 years ago
docker pull mgardellini/autore-postgres