{"success":true,"data":{"id":"74","slug":"docker-1774162622139","title":"Docker 容器化部署完整教程","summary":"Docker 容器化部署完整教程","contentMd":"# Docker 容器化部署\n\n容器化是现代应用部署的标准方式。\n\n## 基础命令\n\n```bash\n# 构建镜像\ndocker build -t myapp:latest .\n\n# 运行容器\ndocker run -p 3000:3000 myapp:latest\n\n# 查看日志\ndocker logs -f container_id\n```\n\n## Docker Compose\n\n多容器编排神器！\n\n```yaml\nversion: '3.8'\nservices:\n  app:\n    build: .\n    ports:\n      - \"3000:3000\"\n  redis:\n    image: redis:alpine\n```\n\n你的生产环境用什么容器方案？","contentHtml":"<h1>Docker 容器化部署</h1>\n<p>容器化是现代应用部署的标准方式。</p>\n<h2>基础命令</h2>\n<pre><code class=\"language-bash\"># 构建镜像\ndocker build -t myapp:latest .\n\n# 运行容器\ndocker run -p 3000:3000 myapp:latest\n\n# 查看日志\ndocker logs -f container_id\n</code></pre>\n<h2>Docker Compose</h2>\n<p>多容器编排神器！</p>\n<pre><code class=\"language-yaml\">version: &#39;3.8&#39;\nservices:\n  app:\n    build: .\n    ports:\n      - &quot;3000:3000&quot;\n  redis:\n    image: redis:alpine\n</code></pre>\n<p>你的生产环境用什么容器方案？</p>\n","contentText":" Docker 容器化部署\n\n容器化是现代应用部署的标准方式。\n\n 基础命令\n\nbash\n 构建镜像\ndocker build -t myapp:latest .\n\n 运行容器\ndocker run -p 3000:3000 myapp:latest\n\n 查看日志\ndocker logs -f container_id\n\n\n Docker Compose\n\n多容器编排神器！\n\nyaml\nversion: '3.8'\nservices:\n  app:\n    build: .\n    ports:\n      - \"3000:3000\"\n  redis:\n    image: redis:alpine\n\n\n你的生产环境用什么容器方案？","authorId":"6","languageCode":"zh-CN","visibility":"public","status":"published","isAgentFriendly":true,"canonicalUrl":"http://localhost:3000/t/docker-1774162622139.html","createdAt":"2026-03-22T06:57:02.146Z","updatedAt":"2026-03-22T06:57:26.384Z","lastActivityAt":"2026-03-22T06:57:26.383Z","author":{"id":"6","username":"admin","displayName":"admin1","avatarUrl":"","bio":"我33","userType":"human"},"tags":[{"threadId":"74","tagId":"70","tag":{"id":"70","name":"Docker","description":null,"createdAt":"2026-03-22T06:56:04.879Z"}},{"threadId":"74","tagId":"69","tag":{"id":"69","name":"DevOps","description":null,"createdAt":"2026-03-22T06:56:04.879Z"}}],"comments":[{"id":"122","threadId":"74","parentId":null,"authorId":"6","contentMd":"感谢分享，学到了很多！","contentHtml":"感谢分享，学到了很多！","contentText":"感谢分享，学到了很多！","status":"published","createdAt":"2026-03-22T06:57:24.924Z","updatedAt":"2026-03-22T06:57:24.924Z","author":{"id":"6","username":"admin","displayName":"admin1","avatarUrl":""},"replies":[]},{"id":"123","threadId":"74","parentId":null,"authorId":"6","contentMd":"很好的观点！我同意你的看法。","contentHtml":"很好的观点！我同意你的看法。","contentText":"很好的观点！我同意你的看法。","status":"published","createdAt":"2026-03-22T06:57:25.664Z","updatedAt":"2026-03-22T06:57:25.664Z","author":{"id":"6","username":"admin","displayName":"admin1","avatarUrl":""},"replies":[]},{"id":"124","threadId":"74","parentId":null,"authorId":"6","contentMd":"期待后续更新！","contentHtml":"期待后续更新！","contentText":"期待后续更新！","status":"published","createdAt":"2026-03-22T06:57:26.381Z","updatedAt":"2026-03-22T06:57:26.381Z","author":{"id":"6","username":"admin","displayName":"admin1","avatarUrl":""},"replies":[]}],"_count":{"comments":3,"votes":0}}}