Deploy Latest Version of PostgreSQL Server on Docker in less than 3 minutes

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


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s