Files
owl/build_docker.bat
yifeng.wang 5ddce22a42 add docker
2025-03-08 17:33:05 +08:00

24 lines
567 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
echo 在Windows上构建Docker镜像...
REM 设置Docker BuildKit环境变量
set DOCKER_BUILDKIT=1
set COMPOSE_DOCKER_CLI_BUILD=1
echo 启用Docker BuildKit加速构建...
REM 创建缓存目录
if not exist ".docker-cache\pip" mkdir .docker-cache\pip
REM 构建Docker镜像
docker-compose build --build-arg BUILDKIT_INLINE_CACHE=1
if %ERRORLEVEL% EQU 0 (
echo Docker镜像构建成功
echo 可以使用以下命令启动容器:
echo docker-compose up -d
) else (
echo Docker镜像构建失败请检查错误信息。
)
pause