File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ VERSION: =9.5
2+ TAG: =base
3+ APP: =postgres
4+ # NOTE: CNAME will not work because of the certificates
5+ REPO: =822924222578.dkr.ecr.us-east-1.amazonaws.com/$(APP )
6+ URL: =$(REPO ) :$(TAG )
7+
8+ default :
9+ @echo " Usage make [image | stopdb | rundb | runpsql | commit | push | check]"
10+
11+ image :
12+ ` aws ecr get-login --region us-east-1`
13+ echo " Building $( APP) "
14+ docker build -t $(URL ) $(VERSION ) /.
15+ make push
16+
17+ stopdb :
18+ -docker rm -f $(APP )
19+
20+ rundb :stopdb
21+ docker run -d --name $(APP ) -e POSTGRES_PASSWORD=password $(URL )
22+
23+ runpsql :
24+ docker run -it --rm --link $(APP ) :postgres postgres psql -h postgres -U postgres
25+
26+ commit :
27+ docker commit $(APP ) $(URL )
28+ make push
29+
30+ push :
31+ docker push $(URL )
32+
33+ check :
34+ docker ps -f name=$(APP )
35+ docker images $(URL )
36+
37+ clean :
38+ -docker rmi $(cmd docker images -a | grep "^<none>" | awk '{print $3}' )
39+ -docker rmi $(cmd docker images -a | grep "$(REPO ) " | awk '{print $3}' )
40+
41+
You can’t perform that action at this time.
0 commit comments