TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Docker Storage: An Introduction

102 pointsby nslateralmost 9 years ago

2 comments

rburhumalmost 9 years ago
Glad to see more articles like this. I find tons of writings about stateless containers, but hardly any about best practices for stateful containers. Just yesterday I was going over the Django tutorial in the official Docker docs. Everything there made sense except that it completely ignores how to handle "media" folders (i.e. the Django folder that, among other things, contains user uploads). Yes, the database is in a volume so I am glad that survives creating/destroying the postgres container, but I kind of need the other files, too.
评论 #12145804 未加载
评论 #12144552 未加载
andrewstuart2almost 9 years ago
So I was going to be snarky about the author not having their linux user as a member of the &quot;docker&quot; group (thus requiring sudo every command) but that sparked a line of thought; so I&#x27;ll ask:<p>Is it better practice to leave yourself out of the docker group, thus forcing explicit use of sudo, since the daemon runs as root? Is there a better daemon auth model that&#x27;s not in use so you can at least have longer-lived tokens, etc?<p>Also, in case you do want to skip the sudo every time (careful with the potential security risk):<p><pre><code> sudo usermod -aG docker $(whoami)</code></pre>
评论 #12144472 未加载
评论 #12144603 未加载
评论 #12145580 未加载
评论 #12144435 未加载