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.

Basic Docker Commands for Beginners

124 pointsby bjokoabout 5 years ago

4 comments

wicketabout 5 years ago
&gt; If you’re trying to learn Docker you will first have to master its various terminal commands.<p>This is completely the wrong way to go about learning Docker. The biggest problem with Docker is that there are too many people using it who claim they know Docker because they learnt a few commands they read on the internet, but they don&#x27;t actually understand what a container is. In reality, this leads to all sorts of problems, like the deployment of insecure containers in the wild. Guides like this are recipe for disaster.
评论 #22968267 未加载
评论 #22968231 未加载
globular-toastabout 5 years ago
The problem with these kind of Docker &quot;recipe books&quot; is users very quickly build up an unmanageable number of containers, images, networks, volumes etc. on their Docker hosts. When these users inevitably run into unexpected behaviour (or run out of disk space) their only solution is to &quot;destroy the world&quot; with some other recipe like a &quot;docker prune&quot;.<p>I see similar things with git users who only learn recipes. I die a little inside every time I see someone fix their problems by deleting and recloning the repo because that&#x27;s what it says to do on &quot;ohshitgit.com&quot;.
评论 #22966386 未加载
评论 #22966435 未加载
评论 #22966338 未加载
评论 #22967588 未加载
pibefisionabout 5 years ago
I prefer Docker Compose to script all my docker tasks. It&#x27;s easy, requires some understanding first (ie: environment variables) but after that you have reusable recipes.
评论 #22974154 未加载
评论 #22969613 未加载
team-oabout 5 years ago
I personally find the interactive switch very useful to actually control the container. You can use &quot;-it&quot; flag for this.<p><pre><code> docker run -it [IMAGE_NAME] [ENTRYPOINT] </code></pre> e.g.<p><pre><code> docker run -it ubuntu:xenial &#x2F;bin&#x2F;bash</code></pre>
评论 #22966832 未加载