Installing PostgreSQL database server with docker - lightblueseas/linuxstuff GitHub Wiki
Overview
For the development you do not need to install PostgreSQL database server locally because you can install it on docker. Here is a description how to install the PostgreSQL database server on docker.
Preconditions
- docker is installed on your local system
Get The PostgreSQL image from the repository
you can get The PostgreSQL image from the repository with the following command:
docker run --name postgres-db -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
The options:
- name: the name of your container
- POSTGRES_PASSWORD: the password that gives you access to your database
- -p: the ports that maps the containers port 5432 to the external port 5432
- -d: get the latest 'postgres' Docker image from the Docker Hub