-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_docker_images.sh
executable file
·48 lines (35 loc) · 1.07 KB
/
build_docker_images.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
#!/usr/bin/env bash
GREEN='\033[0;32m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
printf "=== ️Building Docker Images of %s Apps 🚀 ===\n\n" "${PWD##*/}"
./_tools/_check_requirements.sh
## Worker app
cd worker
printf "** Start building %s app 🔨 ...\n\n" "${PWD##*/}"
docker build -t worker-python:1.0.0 -q .
echo "Done ✅"
cd ..
## Hasher app
cd hasher-java
printf "** Start building %s app 🔨 ...\n\n" "${PWD##*/}"
printf "${RED}Note this is a long process and could take 10-20 min!!${NC}"
# Build JVM-based image
../mvnw -B -Dmaven.test.skip=true clean package
docker build -t hasher-jvm:1.0.0 -q .
# Build Native-based
../mvnw -B -Dmaven.test.skip=true spring-boot:build-image
echo "Done ✅"
cd ..
## RNG app
cd rng-java
printf "** Start building %s app 🔨 ...\n\n" "${PWD##*/}"
printf "${RED}Note this is a long process and could take 10-20 min!!${NC}"
# Build JVM-based image
../mvnw -B -Dmaven.test.skip=true clean package
docker build -t rng-jvm:1.0.0 -q .
# Build Native-based
../mvnw -B -Dmaven.test.skip=true spring-boot:build-image
echo "Done ✅"
cd ..