2023-01-22 19:02:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Path Settings
|
|
|
|
buildPth=`pwd`
|
|
|
|
|
|
|
|
cd $buildPth
|
|
|
|
|
|
|
|
# chmod start.sh
|
|
|
|
chmod a+x start.sh
|
|
|
|
|
|
|
|
# build config load
|
|
|
|
. ./build.conf
|
|
|
|
|
|
|
|
# set Piler Version
|
|
|
|
sed -i 's/PILER_VERSION=.*/PILER_VERSION="'$PILER_VERSION'"/g' ../piler.conf
|
|
|
|
|
|
|
|
# set Maria-DB Version
|
2023-01-22 20:29:57 +00:00
|
|
|
sed -i 's/MARIA_DB_VERSION=.*/MARIA_DB_VERSION="'$MARIA_DB_VERSION'"/g' ../piler.conf
|
|
|
|
|
2023-01-22 19:02:53 +00:00
|
|
|
|
|
|
|
# Package Download
|
|
|
|
rm -f $buildPth/*.deb
|
|
|
|
|
2023-01-22 20:29:57 +00:00
|
|
|
curl -OL https://bitbucket.org/jsuto/piler/downloads/$PILER_PACKAGE
|
2023-01-22 19:02:53 +00:00
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
set -o pipefail
|
|
|
|
set -o nounset
|
|
|
|
|
|
|
|
IMAGE_NAME="simatec/piler:$PILER_VERSION"
|
|
|
|
|
|
|
|
if [ ! -f $buildPth/$PILER_PACKAGE ]; then
|
|
|
|
echo "ERROR: missing package name" 1>&2; exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
docker build --build-arg PACKAGE="$PILER_PACKAGE" -t "$IMAGE_NAME" .
|
2023-01-22 21:12:37 +00:00
|
|
|
exit 0
|