mkdir -p $HOME/docker/persistent_volumes/postgresql
docker pull postgres
docker run --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/persistent_volumes/postgresql:/var/lib/postgresql/data postgres
docker exec -it pg-docker psql -h localhost -U postgres -d postgres
docker container list
docker stop pg-docker
Published by Shadab Mohammad
Master Principal Solutions Architect
With over 20+ years of experience focused on Oracle Database, PostgreSQL, SQL Server, MySQL, BigData & Analytics. I have a deep understanding of the latest database trends and technologies especially Oracle Cloud Infrastructure and AWS along with vector databases.
View all posts by Shadab Mohammad