bev-project/docker/run-ssh-container.sh

28 lines
648 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
# 便捷脚本启动bevfusion SSH容器
# 停止并删除旧容器(如果存在)
docker stop bevfusion_ssh 2>/dev/null
docker rm bevfusion_ssh 2>/dev/null
# 启动新容器
docker run -d \
--name bevfusion_ssh \
--privileged \
-p 12266:22 \
-v "$(dirname "$0")/start-ssh.sh:/start-ssh.sh:ro" \
-v /workspace:/workspace \
-v /data:/data \
--restart unless-stopped \
localhost/bevfusion:ssh \
/bin/bash /start-ssh.sh
echo "容器启动完成!"
echo ""
echo "连接信息:"
echo " 命令: ssh -p 12266 root@36.139.241.152"
echo " 密码: Aa@123456"
echo ""
echo "检查状态: docker logs bevfusion_ssh"