2023-01-03 05:35:53 +01:00
|
|
|
@echo off
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
|
|
|
|
:: Static Environment Variables
|
|
|
|
set IMAGE_NAME=hay1tsme/bananatools-build:latest
|
|
|
|
set CONTAINER_NAME=bananatools-build
|
|
|
|
|
|
|
|
:: Main Execution
|
|
|
|
docker build . -t %IMAGE_NAME%
|
|
|
|
|
|
|
|
if ERRORLEVEL 1 (
|
|
|
|
goto failure
|
|
|
|
)
|
|
|
|
|
2023-01-04 20:24:44 +01:00
|
|
|
docker run -it --rm -v %~dp0:/bananatools --name %CONTAINER_NAME% %IMAGE_NAME%
|
2023-01-03 05:35:53 +01:00
|
|
|
|
|
|
|
if ERRORLEVEL 1 (
|
|
|
|
goto failure
|
|
|
|
)
|
|
|
|
|
|
|
|
docker image rm -f %IMAGE_NAME%
|
|
|
|
|
|
|
|
goto success
|
|
|
|
|
|
|
|
:failure
|
|
|
|
echo bananatools Docker build FAILED!
|
|
|
|
goto finish
|
|
|
|
|
|
|
|
:success
|
|
|
|
echo bananatools Docker build completed successfully.
|
|
|
|
goto finish
|
|
|
|
|
|
|
|
:finish
|
|
|
|
pause
|