xiaowei-system/skills/devops/docker/references/docker-learning-plan.md

54 lines
1.3 KiB
Markdown
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.

# Docker 学习计划
> 来源2026-05-20 与牧尘对话Docker 被定为急需技能
> 目标:能写 Dockerfile能构建镜像能为 Muchen 写生产级 Dockerfile
---
## 学习里程碑
| 里程碑 | 完成标准 |
|--------|---------|
| D1 | Docker 安装成功docker version 能跑 |
| D2 | 能跑容器docker run/pull/ps|
| D3 | 能写简单 Dockerfile 并 build 镜像 |
| D4 | 能写多阶段构建Go 编译 + Ubuntu 运行)|
| D5 | 为 Muchen 写生产级 Dockerfile |
---
## 学习任务(每次 cron 执行选一个推进)
1. **检查 Docker 是否已安装**
```bash
docker version
```
- 如果没装,尝试安装或记录问题
2. **基础命令练习**
- `docker run hello-world`
- `docker ps -a`
- `docker images`
3. **Dockerfile 语法**
- 写一个简单的 Python/Go 应用的 Dockerfile
- 理解 FROM/RUN/COPY/EXPOSE/CMD
4. **多阶段构建**
- 为 Go 程序写多阶段 Dockerfile
- 编译阶段用 golang:1.23,运行阶段用 ubuntu:24.04
5. **Muchen Dockerfile**
- 为 Muchen 的某个组件写 Dockerfile
- 目标:能独立运行、可迁移
---
## 当前状态
- 检查:`/home/muc/docker_progress.md`
- Cron 频率:每 3 小时一次
---
*更新2026-05-20 | 尚未开始*