Skip to content
Bo Lu edited this page Dec 9, 2022 · 8 revisions

Quick install

The image is now available in Docker Hub under the name supabase/postgres.

You can use the docker-compose file available in this repository as your starting point. You can then run:

$ docker-compose up

As the image is based on the postgreSQL 14 image, environment variables from the postgreSQL 14 image are applicable to this image.

Build from scratch

  • Build the image using the included Dockerfile
$ docker build --tag custom-postgres:latest --build-arg VERSION=14.1 .
  • This will produce an image locally called custom-postgres:latest
  • Run the image
$ docker run --detach --publish 5432:5432 --env POSTGRES_PASSWORD=postgres --name {{ container_name }} custom-postgres:latest
  • Delete the container once you're done
$ docker rm --force {{ container_name }}
Clone this wiki locally