piler-docker/build/build.sh
2023-01-22 20:02:53 +01:00

36 lines
749 B
Bash

#!/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
sed -i 's/MARIADB_VERSION=.*/MARIADB_VERSION="'$MARIADB_VERSION'"/g' ../piler.conf
MARIADB_VERSION
# Package Download
rm -f $buildPth/*.deb
curl -o $buildPth/$PILER_PACKAGE https://bitbucket.org/jsuto/piler/downloads/$PILER_PACKAGE
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" .