-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-containers.sh
65 lines (54 loc) · 1.68 KB
/
build-containers.sh
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Build all Docker containers
# Posts Service
POST_IMAGE="posts"
echo "\n📦 Building [$POST_IMAGE]"
cd posts/
docker build -t codesandtags/posts:latest .
echo "\n📪 Pushing [$POST_IMAGE] to Docker Hub"
docker push codesandtags/posts:latest
#echo "\n🚨 Running Security Scan for [$POST_IMAGE] image"
#docker scan codesandtags/posts:latest
cd ..
# Comments Service
COMMENTS_IMAGE="comments"
echo "\n📦 Building [$COMMENTS_IMAGE]"
cd comments/
docker build -t codesandtags/comments:latest .
echo "\n📪 Pushing [$COMMENTS_IMAGE] to Docker Hub"
docker push codesandtags/comments:latest
#echo "\n🚨 Running Security Scan for [$COMMENTS_IMAGE] image"
#docker scan codesandtags/comments:latest
cd ..
# Moderation Service
MODERATION_IMAGE="query"
echo "\n📦 Building [$MODERATION_IMAGE]"
cd moderation/
docker build -t codesandtags/moderation:latest .
echo "\n📪 Pushing [$MODERATION_IMAGE] to Docker Hub"
docker push codesandtags/moderation:latest
cd ..
# Query Service
QUERY_IMAGE="query"
cd query/
echo "\n📦 Building [$QUERY_IMAGE]"
docker build -t codesandtags/query:latest .
echo "\n📪 Pushing [$QUERY_IMAGE] to Docker Hub"
docker push codesandtags/query:latest
cd ..
# Event Bus Service
EVENT_BUS_IMAGE="event-bust"
echo "\n📦 Building [$EVENT_BUS_IMAGE]"
cd event-bus/
docker build -t codesandtags/event-bus:latest .
echo "\n📪 Pushing [$EVENT_BUS_IMAGE] to Docker Hub"
docker push codesandtags/event-bus:latest
cd ..
# Client Web App
WEB_IMAGE="web-app"
echo "\n📦 Building [$WEB_IMAGE]"
cd client/
docker build -t codesandtags/client:latest .
echo "\n📪 Pushing [$WEB_IMAGE] to Docker Hub"
docker push codesandtags/client:latest
cd ..
echo "\nDocker containers generated. 🍻"