2019-05-23 01:57:00 +03:00
|
|
|
@echo off
|
2019-10-24 22:43:35 +03:00
|
|
|
cd %~dp0
|
2019-05-23 01:57:00 +03:00
|
|
|
if "%~1"=="" goto help
|
|
|
|
|
2020-05-02 21:30:59 +03:00
|
|
|
WHERE choco >NUL 2>NUL
|
|
|
|
IF %ERRORLEVEL% NEQ 0 call tools\setup-choco.cmd
|
|
|
|
|
|
|
|
WHERE docker >NUL 2>NUL
|
|
|
|
IF "%ERRORLEVEL%"=="0" goto docker_ok
|
|
|
|
choco install -y docker-desktop
|
|
|
|
choco install -y docker-cli
|
|
|
|
:docker_ok
|
|
|
|
|
2019-05-23 01:57:00 +03:00
|
|
|
del .buildtools 2>NUL
|
|
|
|
docker info
|
|
|
|
docker version
|
|
|
|
|
|
|
|
set IMAGE_NAME=%1
|
|
|
|
echo Running in container %IMAGE_NAME%
|
|
|
|
sc query com.docker.service
|
|
|
|
|
|
|
|
echo Building docker image...
|
|
|
|
docker build --rm -t %IMAGE_NAME% docker/%IMAGE_NAME%
|
|
|
|
|
|
|
|
echo Starting build...
|
|
|
|
docker run -it -v %CD%:/build %IMAGE_NAME% /build/build.sh
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
:help
|
|
|
|
echo.
|
|
|
|
echo Usage: build-docker.cmd [container_name]
|
|
|
|
echo.
|
|
|
|
echo Supported containers:
|
|
|
|
dir /B docker
|