Skip to content

Commit 0a30a13

Browse files
author
mahesh bisl
committed
fixed clean
1 parent ad9a4ba commit 0a30a13

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
VERSION:=9.5
22
TAG:=base
33
APP:=postgres
4-
#NOTE: CNAME will not work because of the certificates
54
REPO:=822924222578.dkr.ecr.us-east-1.amazonaws.com/$(APP)
65
URL:=$(REPO):$(TAG)
76

87
default:
98
@echo "Usage make [image | stopdb | rundb | runpsql | commit | push | check]"
109

11-
image:
10+
login:
1211
`aws ecr get-login --region us-east-1`
12+
13+
image:login
1314
echo "Building $(APP)"
1415
docker build -t $(URL) $(VERSION)/.
1516
make push
@@ -23,7 +24,7 @@ rundb:stopdb
2324
runpsql:
2425
docker run -it --rm --link $(APP):postgres postgres psql -h postgres -U postgres
2526

26-
commit:
27+
commit:login
2728
docker commit $(APP) $(URL)
2829
make push
2930

@@ -35,7 +36,7 @@ check:
3536
docker images $(URL)
3637

3738
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}')
39+
-docker rmi `docker images -a | grep "^<none>" | awk '{print $3}'`
40+
-docker rmi `docker images -a | grep "$(REPO)" | awk '{print $3}'`
4041

4142

0 commit comments

Comments
 (0)