Skip to content

Instantly share code, notes, and snippets.

@floptical
Last active May 1, 2020 22:13
Show Gist options
  • Save floptical/34e654473b1559cb2d10948979051974 to your computer and use it in GitHub Desktop.
Save floptical/34e654473b1559cb2d10948979051974 to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://hub.docker.com/r/mdillon/postgis
docker run --name "postgis-9.6" \
--rm \
-p 2345:5432 \
-e POSTGRES_USER=tester \
-e POSTGRES_PASS=12345 \
-e POSTGRES_DBNAME=tester \
--network bridge \
--mount 'type=volume,src=postgis-9.6-data,dst=/var/lib/postgresql/' \
-d -t mdillon/postgis:9.6
docker run --name "postgis-10" \
--rm \
-p 2346:5432 \
-e POSTGRES_USER=tester \
-e POSTGRES_PASS=12345 \
-e POSTGRES_DBNAME=tester \
--network bridge \
--mount 'type=volume,src=postgis-10-data,dst=/var/lib/postgresql/' \
-d -t mdillon/postgis:10
docker run --name "postgis-11" \
--rm \
-p 2347:5432 \
-e POSTGRES_USER=tester \
-e POSTGRES_PASS=12345 \
-e POSTGRES_DBNAME=tester \
--network bridge \
--mount 'type=volume,src=postgis-11-data,dst=/var/lib/postgresql/' \
-d -t mdillon/postgis:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment