Files
multi_camera/docker-build.sh

30 lines
705 B
Bash
Executable File
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.

#!/bin/bash
# Docker镜像构建脚本
IMAGE_NAME="multi-camera-monitor"
IMAGE_TAG="latest"
echo "🐳 构建多摄像头监控系统Docker镜像..."
# 检查Docker是否安装
if ! command -v docker &> /dev/null; then
echo "❌ 错误: 未找到Docker请先安装Docker"
exit 1
fi
# 构建镜像
echo "📦 构建镜像: ${IMAGE_NAME}:${IMAGE_TAG}"
docker build -t ${IMAGE_NAME}:${IMAGE_TAG} .
if [ $? -eq 0 ]; then
echo "✅ 镜像构建成功!"
echo ""
echo "运行镜像:"
echo " docker run -d -p 5002:5002 --name multi-camera ${IMAGE_NAME}:${IMAGE_TAG}"
echo ""
echo "访问地址: http://localhost:5002"
else
echo "❌ 镜像构建失败!"
exit 1
fi