Skip to content

Instantly share code, notes, and snippets.

@onjin
Created August 17, 2016 06:33
Show Gist options
  • Save onjin/a6002f322776c7f59d5cbabc61b3063f to your computer and use it in GitHub Desktop.
Save onjin/a6002f322776c7f59d5cbabc61b3063f to your computer and use it in GitHub Desktop.
onjin postgresql docker compose
postgresql92:
image: onjin/alpine-postgres:9.2
volumes:
- $HOME/.volumes/postgresql92:/var/lib/postgresql/data
postgresql93:
image: onjin/alpine-postgres:9.3
volumes:
- $HOME/.volumes/postgresql93:/var/lib/postgresql/data
postgresql94:
image: onjin/alpine-postgres:9.4
volumes:
- $HOME/.volumes/postgresql94:/var/lib/postgresql/data
postgresql95:
image: onjin/alpine-postgres:9.5
volumes:
- $HOME/.volumes/postgresql95:/var/lib/postgresql/data
@onjin
Copy link
Author

onjin commented Aug 17, 2016

run different psql versions

onjin@nazano:~ (py-2.7.6)
 $ docker run -it --rm onjin/alpine-postgres:9.4 psql -U postgres -h 172.17.0.4
psql (9.4.5, server 9.3.11)
Type "help" for help.

postgres=# \q

onjin@nazano:~ (py-2.7.6)
 $ docker run -it --rm onjin/alpine-postgres:9.5 psql -U postgres -h 172.17.0.4
psql (9.5.1, server 9.3.11)
Type "help" for help.

postgres=#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment