-
Notifications
You must be signed in to change notification settings - Fork 52
/
docker-build.sh
executable file
·40 lines (27 loc) · 1 KB
/
docker-build.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
#!/bin/sh
if [ -z $1 ]; then
echo "Required argument misses. Please provide docker image tag."
echo ""
echo "USAGE"
echo " docker-build.sh tag [latest]"
echo "DESCRIPTION"
echo " tag\t\t- arbitrary docker image tag. In bytechef we use yyyyMMdd to reflect date of image build"
echo " latest\t- optional flag that would instruct script to tag image with additional tag with value \`latest\`"
exit 1
fi
cd server/apps/server-app
../../../gradlew clean build -Pprod
if [ -n "$2" ] && [ "latest" = "$2" ]; then
echo "Building docker image with tag \`$2\`"
docker build --platform linux/amd64 -t bytechef/bytechef-server:$2 .
fi
docker build --platform linux/amd64 -t bytechef/bytechef-server:$1 .
cd ../../../client
npm install
npm run build
cd ..
if [ -n "$2" ] && [ "latest" = "$2" ]; then
echo "Building docker image with tag \`$2\`"
docker build --platform linux/amd64 -t bytechef/bytechef:$2 .
fi
docker build --platform linux/amd64 -t bytechef/bytechef:$1 .