Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Docker postgresl


.. |DockerHub| image::
.. _DockerHub:

A PostgreSQL database Dockerfile based on phusion/baseimage.


This image is available as a trusted build on the docker index. The easiest way to get it on your server is using docker pull:

.. code-block:: bash

$ docker pull swcc/docker-postgresql

Alternatively, you can clone this repository and build the image yourself:

.. code-block:: bash

$ docker build -t docker-postgresql .

Using this image

Launch a container with this image (bind postgres port anywhere you want e.g. 49999):

.. code-block:: bash

$ docker run -p swcc/docker-postgresql

Once you have started a container from this image, you can access it via:

.. code-block:: bash

# Use your container's name or id
$ docker exec -ti <container-name-or-id> su postgres -c 'psql'

Or can connect to the PostgreSQL database directly if you have the PostgreSQL client installed:

.. code-block:: bash

# Use your container's host and port
$ psql -U postgres -h -p 49999

Learn more

Learn more about Dockerfiles and how to build them in the Docker documentation:

Docker Pull Command
Source Repository