-
Notifications
You must be signed in to change notification settings - Fork 492
/
build.sh
executable file
·29 lines (23 loc) · 683 Bytes
/
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
#!/bin/bash
# Run the build utility via Docker
set -e
# Make sure our working dir is the dir of the script
DIR=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)
cd $DIR
# Unique number for this build
BUILD_NUM=${BUILD_NUM-$RANDOM}
# Home dir of the docker user
HOME_DIR=/root
imagename=kapacitor-builder-img-$BUILD_NUM
PROTO_VERSION=3.18.3
# Build new docker image
docker build -f Dockerfile_build_ubuntu64 --build-arg PROTO_VERSION=$PROTO_VERSION -t $imagename $DIR
echo "Running build.py"
# Run docker
docker run \
--rm \
-v "$DIR:/kapacitor" \
-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \
$imagename \
"$@"