-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
50 lines (37 loc) · 1.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SHELL=/usr/bin/env bash
TAG?=$(shell date +%F)-$(shell git describe --always --tag --dirty)
REPO?=147263665150.dkr.ecr.eu-west-1.amazonaws.com
REPO_USER?=AWS
REPO_REGION?=eu-west-1
.PHONY: all
all: build-all
.PHONY: push
push: push-all
.PHONY: build-all
build-all: build-dealgood build-ironbar build-skyfish
.PHONY: build-dealgood
build-dealgood:
docker build -f Dockerfile-dealgood -t dealgood:${TAG} .
.PHONY: build-ironbar
build-ironbar:
docker build -f Dockerfile-ironbar -t ironbar:${TAG} .
.PHONY: build-skyfish
build-skyfish:
docker build -f Dockerfile-skyfish -t skyfish:${TAG} .
.PHONY: push-all
push-all: push-dealgood push-ironbar push-skyfish
.PHONY: push-dealgood
push-dealgood: build-dealgood docker-login
docker tag dealgood:${TAG} ${REPO}/dealgood:${TAG}
docker push ${REPO}/dealgood:${TAG}
.PHONY: push-ironbar
push-ironbar: build-ironbar docker-login
docker tag ironbar:${TAG} ${REPO}/ironbar:${TAG}
docker push ${REPO}/ironbar:${TAG}
.PHONY: push-skyfish
push-skyfish: build-skyfish docker-login
docker tag skyfish:${TAG} ${REPO}/skyfish:${TAG}
docker push ${REPO}/skyfish:${TAG}
.PHONY: docker-login
docker-login:
aws ecr get-login-password --region ${REPO_REGION} | docker login --username ${REPO_USER} --password-stdin ${REPO}