Files
KnowledgeBase/docker-images/import-images.sh
lizhuoran 3c206e9e06 feat: 新增 Docker 部署支持、Swoole/Octane 集成及相关优化
- 添加 Dockerfile 与多套 docker-compose 配置(开发/生产环境)
- 集成 Laravel Octane (Swoole) 提升性能
- 新增健康检查、监控脚本及部署文档
- 新增 Docker 镜像离线导入包(MySQL/Redis/Meilisearch)
- 优化文档转换、预览服务及队列任务
- 添加 CreateAdminUser 命令与路由健康检查接口
- 新增 Swoole 队列兼容性测试套件

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 15:51:19 +08:00

44 lines
1021 B
Bash
Executable File
Raw Permalink 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镜像导入脚本
# 自动生成用于导入导出的Docker镜像
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "开始导入Docker镜像..."
# 检查Docker是否运行
if ! docker info >/dev/null 2>&1; then
echo "错误: Docker未运行或无法访问"
exit 1
fi
# 导入所有tar文件
for file in "$SCRIPT_DIR"/*.tar*; do
if [[ -f "$file" ]]; then
echo "导入镜像: $(basename "$file")"
if [[ "$file" == *.gz ]]; then
# 解压并导入
if gunzip -c "$file" | docker load; then
echo "✓ 镜像导入成功"
else
echo "✗ 镜像导入失败"
fi
else
# 直接导入
if docker load -i "$file"; then
echo "✓ 镜像导入成功"
else
echo "✗ 镜像导入失败"
fi
fi
fi
done
echo "镜像导入完成"
echo "可用镜像列表:"
docker images