docker-filebin/local_build.sh
Varakh 55f025bd35
Some checks failed
continuous-integration/drone/push Build is failing
Add automatic build for docker images and publish to dockerhub with drone
2023-03-25 09:07:43 +01:00

27 lines
585 B
Bash
Executable file

#!/usr/bin/env bash
set -e;
if [[ -v FB_VERSION ]]; then
echo "Processing with version ${FB_VERSION}"
else
echo "Set FB_VERSION before calling this script"
exit 1;
fi
BUILD_DIR="fb_src"
if [[ ! -d "${BUILD_DIR}" ]]; then
mkdir -p "${BUILD_DIR}";
echo "Created ${BUILD_DIR}"
else
rm -rf "${BUILD_DIR}";
mkdir -p "${BUILD_DIR}";
echo "Re-created ${BUILD_DIR}"
fi
git clone --branch ${FB_VERSION} https://github.com/Bluewind/filebin --depth=1 "${BUILD_DIR}";
sudo docker build --no-cache -t varakh/filebin:${FB_VERSION} -t varakh/filebin:latest .;