The first beta of Postgres 15 is out now and the official Docker image for it has also just gone live, making it easy for you to take it for a quick spin without destroying your production systems.
Assuming you have Docker running, here's the quickest way to get going:
docker network create pgnetwork docker run --name pg15beta1 --network pgnetwork -e POSTGRES_PASSWORD=whatever -d postgres:15beta1
This creates a network called
pgnetwork so that other containers can communicate with Postgres easily. A container is then run based on the
postgres:15beta1 image, a default password is set for the
postgres user (you can change this to whatever you like), and the container is given the name of
Then to run
docker run -it --rm --network pgnetwork postgres:15beta1 psql -h pg15beta1 -U postgres
This spins up another container (which is deleted after you quit
psql thanks to the
--rm option) which uses the same Postgres image but to run
psql instead. Enter the password you provided in the first step and you're in.
To clean up:
docker stop pg15beta1 docker rm pg15beta1
If you have
psql locally and want to experiment with Postgres 15 with apps on your local system, you could expose its port on localhost like so:
docker run --name pg15beta1 -e POSTGRES_PASSWORD=whatever -p 1234:5432 -d postgres:15beta1
This then makes the Postgres 15 server accessible at port
1234 on localhost. Tweak to suit your use case.
Top comments (2)
to the point, nice 👍
Nice thanks for the news update!