Skip to content

Instantly share code, notes, and snippets.

@guidorice
Last active January 16, 2025 17:06
Show Gist options
  • Select an option

  • Save guidorice/fae3e2aec866732f83ef65013186411e to your computer and use it in GitHub Desktop.

Select an option

Save guidorice/fae3e2aec866732f83ef65013186411e to your computer and use it in GitHub Desktop.
Start Postgres + PostGIS in a docker container
#!/usr/bin/bash
# docker image names and version tags are here: https://github.com/postgis/docker-postgis
# remember: set password and home directory
mkdir -p ~/pgdata
docker run --detach \
--name postgres-dev \
-p 5432:5432 \
-e POSTGRES_PASSWORD=***** \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v /home/user/pgdata:/var/lib/postgresql/data \
postgis/postgis:17-3.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment