mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-10 20:04:36 +00:00
- Enforce Level 1-3 structural numbering based on SUMMARY.md hierarchy - Remove structural numbering from Level 4+ headings - Eliminate single child headings by converting to bold text - Auto-inject summary text for headings with multiple children missing intro text - Exclude Appendix chapters from structural numbering - Avoid modifying code block contents - Add script to detect non-standard English usage in headers
880 B
880 B
8.9 本章小结
相关信息如下表:
| 场景 | DNS 行为 | 备注 |
|---|---|---|
| 默认网络 | 继承宿主机 | 不支持容器名解析 |
| 自定义网络 | Docker 嵌入式 DNS | ✅ 支持容器名解析 |
| 手动指定 | 使用 --dns |
覆盖默认配置 |
8.9.1 延伸阅读
| 要点 | 说明 |
|---|---|
| -p | 指定端口映射 (常用),如 8080:80 |
| -P | 随机映射所有 EXPOSE 的端口 |
| 安全性 | 默认监听所有 IP,敏感服务应绑定 127.0.0.1 |
| 查看 | 使用 docker port 或 docker ps |