- Docker installed and running
- User in docker group or root access
git clone <your-repo-url>
cd dev-docker
chmod +x setup.shDefault (Ubuntu 22.04, Full Mode - Recommended)
./setup.shUbuntu 24.04, Full Mode
./setup.sh -o ubuntu2404 -m fullUbuntu 22.04, Minimal Mode (Faster)
./setup.sh -o ubuntu2204 -m minimalCentOS 8, Full Mode
./setup.sh -o centos8 -m full# The script will show you the IP and SSH command
# Example output:
# Container IP: 172.17.0.2
# SSH command: ssh sheen@172.17.0.2
# Default password: 123456| Feature | Full Mode | Minimal Mode |
|---|---|---|
| Shell | ZSH + Oh My Zsh | Bash |
| LLVM/Clang | ✅ v18 | ❌ |
| Python | Miniconda | System Python3 |
| Build Time | ~10-15 min | ~5-8 min |
| Image Size | ~2-3 GB | ~800 MB |
| Use Case | Full development | Quick dev/CI |
# List available OS versions
./setup.sh -l
# Show current config
./setup.sh -c
# Stop and remove container
./setup.sh -s
# Get container IP only
./setup.sh -i
# Run existing container (no rebuild)
./setup.sh -r./setup.sh -h- 已安装并运行 Docker
- 用户在 docker 组或具有 root 权限
git clone <your-repo-url>
cd dev-docker
chmod +x setup.sh默认配置(Ubuntu 22.04,完整模式 - 推荐)
./setup.shUbuntu 24.04,完整模式
./setup.sh -o ubuntu2404 -m fullUbuntu 22.04,精简模式(更快)
./setup.sh -o ubuntu2204 -m minimalCentOS 8,完整模式
./setup.sh -o centos8 -m full# 脚本会显示 IP 和 SSH 命令
# 示例输出:
# Container IP: 172.17.0.2
# SSH command: ssh sheen@172.17.0.2
# 默认密码:123456| 功能 | 完整模式 | 精简模式 |
|---|---|---|
| Shell | ZSH + Oh My Zsh | Bash |
| LLVM/Clang | ✅ v18 版本 | ❌ |
| Python | Miniconda | 系统 Python3 |
| 构建时间 | ~10-15 分钟 | ~5-8 分钟 |
| 镜像大小 | ~2-3 GB | ~800 MB |
| 使用场景 | 完整开发 | 快速开发/CI |
# 列出可用的操作系统版本
./setup.sh -l
# 显示当前配置
./setup.sh -c
# 停止并删除容器
./setup.sh -s
# 仅获取容器 IP
./setup.sh -i
# 运行已存在的容器(不重新构建)
./setup.sh -r./setup.sh -hsudo usermod -aG docker $USER
# Then logout and login again# Remove old container first
./setup.sh -s
# Then build again
./setup.sh -b# Set proxy if needed
export HTTP_PROXY="http://proxy:8080"
export HTTPS_PROXY="http://proxy:8080"
./setup.shFor detailed documentation, see:
- README.md - Full documentation
- EXAMPLES.md - More examples
- README.zh-CN.md - 完整中文文档