TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Docker Container Anti Patterns

18 点作者 vegasbrianc超过 8 年前

3 条评论

Terretta超过 8 年前
I read &quot;anti-patterns&quot; but then it lists a lot of good things to do, with a few anti-patterns mixed in.<p>Fix the bold to be patterns or anti-patterns, not both, or change the title to be something like lessons learned.
mikewhy超过 8 年前
&gt; Don’t use different images, or even different tags in dev, test, staging and production environment.<p>Can anyone comment on this? For example, many node projects have a list of devDependencies that have no use in production, so we build 3 images:<p>1. A base image with basically `NODE_ENV=production npm install`<p>2. A test image from the base with `NODE_ENV=development npm install`<p>3. A production image from step 1 with the CMD set.<p>Is this part of an &quot;anti-pattern&quot;? I thought it was how you&#x27;d get efficiently sized images in this situation.<p>(And yes, now that I write this I realize there only needs to be 2 images, the production one, and the test image is built from that)
评论 #12911142 未加载
oherrala超过 8 年前
&gt; Data or logs in containers<p>Instead of volume mapping like the article suggested, why not just log to stdout?