Files
full-stack-doc/backend/build_with_docker.sh
2025-10-14 20:05:29 +08:00

23 lines
733 B
Bash
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构建Linux可执行文件
echo "=== 使用Docker构建Linux可执行文件 ==="
# 构建Docker镜像
echo "构建Docker镜像..."
docker build -f Dockerfile.build -t cloud-drive-builder .
# 运行构建容器并提取结果
echo "运行构建..."
docker run --rm -v $(pwd):/output cloud-drive-builder bash -c "cp -r /opt/cloud-drive/* /output/"
echo "=== 构建完成 ==="
echo "Linux可执行文件已生成到当前目录"
echo "文件列表:"
ls -la cloud-drive-server start.sh README.md .env.example
echo ""
echo "部署文件已准备就绪可以上传到Linux服务器"
echo "建议下一步:"
echo "1. 将所有文件上传到Linux服务器"
echo "2. 运行 sudo ./install.sh 进行安装"