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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Lessons from Building a Node App in Docker

134 点作者 JohnHammersley大约 9 年前

6 条评论

z3t4大约 9 年前
The article should mention <i>why</i> you would like to run something in docker. What many forget is that when putting stuff in a container, you create future work for yourself to manage not only your own stuff, but also all the dependencies in the container. If you&#x27;re just after isolation, that could be accomplished with Linux name-spaces and apparmor.
评论 #11548052 未加载
评论 #11548614 未加载
评论 #11548023 未加载
评论 #11549218 未加载
评论 #11548053 未加载
misterdai大约 9 年前
I think it&#x27;s brilliant that this gives security more prominence with setting up the unprivileged user. Pretty much every Docker post &#x2F; article I&#x27;ve seen tends to skip over details like that.
评论 #11547944 未加载
glifchits大约 9 年前
This is incredibly clear and well-written. Great article!
rhinoceraptor大约 9 年前
If your NPM installs are mysteriously slow in Docker, try adding this line before &#x27;npm install&#x27;:<p>RUN npm config set registry <a href="https:&#x2F;&#x2F;registry.npmjs.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;registry.npmjs.org&#x2F;</a><p>I don&#x27;t know why it works, but it does.
评论 #11548908 未加载
voltagex_大约 9 年前
<a href="https:&#x2F;&#x2F;imagelayers.io&#x2F;?images=node:4.3.2" rel="nofollow">https:&#x2F;&#x2F;imagelayers.io&#x2F;?images=node:4.3.2</a> - I wonder how small we could get an image that&#x27;s still capable of running node and having an extra user (Buildroot is root-only by default)
评论 #11547861 未加载
tayo42大约 9 年前
Any reason why you wouldn&#x27;t use some kind of supervision for your process when running it in production?
评论 #11547120 未加载
评论 #11547133 未加载