blob: f26c78ae9b3b286cc38f1694b8ee5ae8be10f6f3 [file] [log] [blame]
Tony Mack8a261c62015-10-29 21:14:41 +00001.PHONY: build
2build: ; docker build --rm -t postgres .
3
4.PHONY: run
5run: ; docker run --rm -p 5432:5432 --name postgres-server postgres
6
7.PHONY: stop
8stop: ; docker stop postgres-server
9
10.PHONY: rm
11rm: ; docker rm postgres-server
12
13.PHONE: rmi
14rmi: ; docker rmi postgres
15
16.PHONY: backup
17backupvol: ; docker run --volumes-from postgres-server -v /backup:/backup postgres tar cvf /backup/backup-postgres.tar /var/lib/postgresql
18
19.PHONY: restore
20restorevol: ; docker run --volumes-from postgres-server -v /backup:/backup postgres cd /var/lib/postgresql && tar xvf /backup/backup-postgres.tar
21