Skip to content

vector-pool/dashboard-backend

Repository files navigation

Install PostgreSQL with Docker

Install Docker

If Docker is not already installed, you can install it using the following commands:

  • For Ubuntu/Debian:
sudo apt update
sudo apt install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker
  • For CentOS/RHEL:
sudo yum install -y docker
sudo systemctl start docker
sudo systemctl enable docker
Verify Docker Installation:
  • Check the docker is installed correctly:
docker --version

Pull the PostgreSQL 14 Docker Image

Download the official PostgreSQL 14 Docker image from Docker Hub:

docker pull postgres:14

This will pull the latest PostgreSQL 14 image.

Prepare the docker-compose.yml file

use sample docker-compose.yml file in root subnet directory.

Running PostgreSQL with Docker

  • Running docker
docker-compose up -d
  • Verify the setup
docker ps
  • Stop the docker
docker-compose down
  • Connect to PostgreSQL
psql -h localhost -U <user_name> -d <db_name> -p <port>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages