Files
light/build-with-docker.bat
Doubleyin 11e1e5d42b
All checks were successful
构建并部署 Spring Boot 应用 / build-and-deploy (push) Successful in 15m11s
微信连接,本地数据上传
2025-10-15 23:41:09 +08:00

38 lines
879 B
Batchfile

@echo off
setlocal
echo Building Light Delivery application with Docker...
REM 第一步:编译项目
echo Step 1: Compiling the project...
call mvn clean package -DskipTests
if %errorlevel% neq 0 (
echo Error: Maven build failed
exit /b %errorlevel%
)
REM 第二步:构建 Docker 镜像
echo Step 2: Building Docker image...
docker build -t light-delivery-app .
if %errorlevel% neq 0 (
echo Error: Docker build failed
exit /b %errorlevel%
)
REM 第三步:验证镜像
echo Step 3: Verifying Docker image...
docker images | findstr light-delivery-app
echo.
echo Build completed successfully!
echo.
echo To run the container locally:
echo docker run -d --name light-delivery -p 8080:8080 -p 8443:8443 light-delivery-app
echo.
echo To export the image for cloud deployment:
echo docker save light-delivery-app -o light-delivery-app.tar
echo.
pause