2024-01-20 17:45:24 +01:00
|
|
|
|
@echo off
|
|
|
|
|
chcp 65001 >nul
|
|
|
|
|
|
|
|
|
|
docker -v >nul 2>&1
|
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
|
echo [31mDocker is not installed.[0m
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
docker info >nul 2>&1
|
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
|
echo [31mDocker engine is not running.[0m
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
2024-01-20 18:06:54 +01:00
|
|
|
|
cd %~dp0
|
2024-01-20 17:45:24 +01:00
|
|
|
|
echo [32mBuilding docker image...[0m
|
2024-01-20 18:06:54 +01:00
|
|
|
|
docker-compose -f ../docker/docker-compose.yml build
|
2024-01-20 17:45:24 +01:00
|
|
|
|
if %errorlevel% neq 0 (
|
2024-01-20 18:06:54 +01:00
|
|
|
|
echo [31mBuilding docker image failed.[0m
|
2024-01-20 17:45:24 +01:00
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
echo [32mThe image was built successfully.[0m
|