forked from CiscoSecurity/tr-05-serverless-meraki-mx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·32 lines (28 loc) · 785 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
30
31
32
#! /usr/bin/env sh
echo " .:|:.:|:. "
echo " C I S C O "
echo " SecureX "
echo
echo " Development Dockerfile build script."
echo
module_name="Docker relay"
image_name="tr-05-docker-relay"
CONFIG_FILE=code/container_settings.json
if [ -f $CONFIG_FILE ]; then
echo
echo "The configuration file (container_settings.json) already exists."
echo
version=`jq -r .VERSION code/container_settings.json`
else
read -p 'Version: ' version
echo {\"VERSION\": \"$version\", \"NAME\": \"$module_name\"} > code/container_settings.json
fi
echo " Integration Module: $module_name"
echo " Version: $version"
echo
echo "Starting build process ..."
echo
docker build -t "$image_name:$version" .
echo
echo "Please ensure you update module_type.json with correct url."
echo