Run PostgreSQL and PGAdmin using docker compose

Running PostgreSQL on native operating system is always a hassle. First we have to perform the installation on the respective operating system be it Linux, Windows or MacOS. The procedure of installation varies from OS to OS.

We will use Docker (docker compose precisely) to deploy PostgreSQL along with PGAdmin on the local environment.

Once you have installed docker on the local machine the setup will run despite of the type of operating system.

# Create a directory and docker-compose.yml file within the directory
mkdir postgres-docker
cd postgres-docker
vi docker-compose.yml

The content of the docker-compose.yml file as per follow:

Visit Now

Tags: Compose Docker