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.

Let's review Docker

187 pointsby sleepycalover 10 years ago

23 comments

bcantrillover 10 years ago
While there are some important criticisms in here, there are some misunderstandings of OS-based virtualization with respect to HW-based virtualization in terms of both history and implementation. Certainly, anyone who thinks that &quot;we have reached the point that [hardware virtualized] performance is almost as fast as bare metal&quot; is either cooking their numbers or deliberately limiting the scope of what they are evaluating to purely CPU-bound work; when it comes to anything interacting with the outside world (which is to say, I&#x2F;O), OS-based virtualization crushes HW-based virtualization.[1] That said, the security criticisms are entirely fair (though they are criticisms of Linux more than of Docker); taken together with the performance win of OS-based virtualization, they form our motivation for Docker containers running as LX-branded zones.[2][3]<p>[1] <a href="http://dtrace.org/blogs/brendan/2013/01/11/virtualization-performance-zones-kvm-xen/" rel="nofollow">http:&#x2F;&#x2F;dtrace.org&#x2F;blogs&#x2F;brendan&#x2F;2013&#x2F;01&#x2F;11&#x2F;virtualization-pe...</a><p>[2] <a href="http://www.slideshare.net/bcantrill/docker-and-the-future-of-containers-in-production" rel="nofollow">http:&#x2F;&#x2F;www.slideshare.net&#x2F;bcantrill&#x2F;docker-and-the-future-of...</a><p>[3] <a href="https://www.joyent.com/developers/videos/docker-and-the-future-of-containers-in-production" rel="nofollow">https:&#x2F;&#x2F;www.joyent.com&#x2F;developers&#x2F;videos&#x2F;docker-and-the-futu...</a>
评论 #9015701 未加载
CSDudeover 10 years ago
Some of your points seems valid (although the writing style is hostile), but calling it &quot;unnecessary&quot; is over assumption. You think Docker is only used in deployment, but you are wrong. I use it do grade programming assignments, I distribute Dockerfiles to students, and it is very useful. I believe it is very useful in other aspects as well, just because you are unhappy does not make it unnecessary. I ran almost 30.000 containers on a single machine and it saved me many hours.<p>I also had a incident with Docker in 0.6, when creating a new container it used to traverse all the containers metadata and when the container count reaches thousands it froze my server and I had to manually reboot it on 3AM, but hey that&#x27;s okay, it can be fixed, I reported it on Github and it does not happen anymore. It is still useful to me, and still necessary.
评论 #9015930 未加载
评论 #9016183 未加载
eofover 10 years ago
I fundamentally disagree.<p>Flawed? sure.. useless hype?? yeah well are all the people loving it just stupid.. or is it just placebo?<p>The author makes a lot of conjecture with very, very little backing.<p>I love docker. I&#x27;m a programmer more than a systems engineer. I&#x27;ve used Linux as my sole computing environment for 6+ years. I&#x27;ve deployed countless LAMP stacks; and countable Haskell&#x2F;postgres stacks.<p>For both having an extremely portable development&#x2F;building environment; and dead-simple disbursement of binaries-with-prereqs, Docker has been INCREDIBLY useful to me.<p>For actual deployment of single-server apps; it might be a bit more trouble than it&#x27;s worth, in some cases. I have a couple places where I develop and build in Docker; but actually deploy &quot;raw&quot;; because it is easier&#x2F;fine.<p>But when you start considering Coreos clusters and docker containers to utilize them; deployment again is made congitively simpler (to us mere mortals) thinking in terms of containers.<p>I guess this is click-bait; but even as a passive user of Docker, I find it quite offensive; and not well-grounded.<p>I opened the article with an open mind; thinking someone smarter than me knew something terrible about docker that was going to bite me in the ass some day.. only to instead get the impression of, either being trolled, or that the author is my favorite type of neck-beard elitist.
评论 #9016334 未加载
评论 #9015692 未加载
评论 #9016228 未加载
bayesianhorseover 10 years ago
I can only speak for myself. I find docker to be immensely useful. Sure, there were always VMs, but I was very frustrated with multi-vm setups before discovering docker.<p>At the very least it let me iterate on system configuration &#x2F; installation procedures more quickly. I have learned a lot just due to tweaking Dockerfiles and rebuilding them. Virtual machines are much slower in this regard.<p>In Data Science Docker is becoming revolutionary. People tried distributing virtual machines to let others reproduce their work. Dockerfiles are much more reproducible, and don&#x27;t need a few gigabyte of seperately hosted VM images. Also these VM images usually contain tons of undocumented &quot;state&quot;, whereas a Dockerfile is easier to reverse engineer and ultimately very reproducible.<p>You can include Dockerfiles in all your projects. Other developers can then go in and get started with a minimal amount of guesswork. Turns out &quot;sane&quot; development environments, which probably means one supposedly optimal configuration&#x2F;setup&#x2F;framework for all your projects, is the exception rather than then the norm.
评论 #9016093 未加载
评论 #9015740 未加载
评论 #9016174 未加载
cgb_over 10 years ago
&quot;If you expect anything positive from Docker, or its maintainers, then you&#x27;re shit outta luck.[..]If your development workflow is sane, then you will already understand that Docker is unnecessary[..]Docker would have been a cute idea 8 years ago, but it&#x27;s pretty much useless today&quot;<p>Umm ok? Judgement, jumping to conclusions. Take out some of that kind of tone and you have some legitimate criticisms of docker that might be taken more seriously.<p>There are some real warts in the docker core &amp; community, and a high barrier of entry for multi-node deployments and isolated networks, but on the flipside, deterministic image build &amp; deployment is a big win compared to many other ways of doing this stuff (at scale).<p>IMO, one of the biggest positives that Docker-like provisioning encourages is clustered-by-default architectures. When you build around failure by assuming nodes come and go (as easily as Docker makes it) your platform availability is likely to be more resilient to some types of failure.
评论 #9015762 未加载
评论 #9018186 未加载
justinsbover 10 years ago
I would agree that Docker has some flawed fundamentals, that it has many implementation flaws, and that is over-hyped. Out-of-the-box it is even almost useless for real-world production usage.<p>But - despite agreeing with your words - I wouldn&#x27;t put them together to reach the same conclusion. The container model with managed images seems to be a big step forwards vs the VM model: it encourages having immutable &#x27;machines&#x27; that are disposable, which works very well for cloud architectures.<p>I would check out the kubernetes project and where it is heading: containers orchestrated across a cluster of machines, with seamless&#x2F;automatic networking between the containers.
评论 #9015567 未加载
评论 #9015474 未加载
评论 #9015604 未加载
rdlover 10 years ago
I strongly prefer hardware-assisted virtualization wherever possible. I&#x27;d like to see more super lightweight OSes like MirageOS, as well as sane trusted computing functionality all the way up the stack, but that might be asking for a bit much.
评论 #9015874 未加载
bitwarriorover 10 years ago
The author is viewing&#x2F;reviewing Docker through a very myopic lens.<p>I work at a company that leverages Hadoop, and on each developer machine we each have a baby Hadoop cluster (3 nodes) running in VMs at the moment, in addition to a master controller. Hence, at any given time, my machine is actively running 5 OS&#x27;s (if we include the native OS) and all their associated background tasks. My computer generally idles at 25% CPU usage. Keeps my legs warm in the winter.<p>We&#x27;re finally going to dockerize the project and I couldn&#x27;t be happier. Granted, Mac OSX doesn&#x27;t natively support the LXC&#x27;s docker uses (c&#x27;mon Apple!), so we&#x27;ll still be running 1 VM, but that&#x27;s a huge improvement over our existing implementation. My CPU wouldn&#x27;t be idling nearly as high, I&#x27;m going to recover a ton of RAM, and the boot sequence is going to be substantially faster.<p>Being that these are developer machines, and simply understanding our use case, we&#x27;re not worried about malicious tenants breaking out of their environments. It&#x27;s just not a factor in our situation.<p>If anything I feel the &quot;article&quot; was a waste of time. I thought I was going to read a great summary on the state of Docker, and instead I got this unexpectedly aggressive piece from developer that couldn&#x27;t conceive how to fit this particular tool into his toolbelt.
评论 #9016286 未加载
评论 #9017950 未加载
评论 #9016396 未加载
评论 #9016347 未加载
eigenrickover 10 years ago
I partially agree with you, except for one very important point: Despite its flaws and hype, it is still incredibly useful.<p>I just wish it were easier for people to read the contents on the label. Right now everyone thinks it is good for everyone. It isn&#x27;t, and there are some sharp edges that require RTFM&#x27;ing.
评论 #9015501 未加载
评论 #9015545 未加载
kungfooguruover 10 years ago
I like it for quickly spawning up fresh places to test during development, or for a fresh environment since so many package managers gems, bundler, npm, etc fuck themselves up and install conflicting packages.<p>So I find this article to be the same as the hype around Docker, useful information surrounded by hyperbole that ruins it?<p>I don&#x27;t need a full VM usually, and being just local dev the security isn&#x27;t an issue, but used Vagrant before Docker for this.<p>Is there anything else similar?
评论 #9015659 未加载
escape_goatover 10 years ago
Look, if you&#x27;re going to submit your own blog posts to Hacker News --- I assume sleepycal is the same Cal as the Cal who wrote the blog post --- then take the time to polish them up a little, and tone down the flameshow.<p>Would you like it if I told people your blog post was useless because you buried your thesis in the third-last paragraph and led off with an either astounding or false assertion that you tested docker (which you had previously disliked) by putting it <i>in production</i> for <i>six months</i>? That sort of needs some explanation and story telling. If Docker induced so much bile in you, then how and why did you end up stuck using it in production for six months?
评论 #9015952 未加载
simonleboover 10 years ago
I came across a few of the issues mentioned in that article while using docker in the last 4 months but I have to say I will never look back.<p>What I like the most personally is how easy it is to install and experiment with 3d party tools. You want an elastic search stack? In one command you have a webserver hosting Kibana with Elastic Search and Logstash properly configured on your local. Jenkins, Elastic Search, Redis, Postgres, etc: they all have their dockerfiles and can be installed as one liners. Removing them is equally as easy.<p>Oh and I don&#x27;t know why it is written that running a Docker registry is &quot;extremely complex&quot;. Just like any Dockerized app it is a one-liner.<p>This new ease-of-install just by itself is worth of my gratitude to the guys that build it.
评论 #9016406 未加载
mwcampbellover 10 years ago
If you&#x27;re renting VMs from a provider like DigitalOcean or Linode, a VM per service can get expensive compared to running multiple containers within a single VM. So, if not Docker, some system for deploying containers in production can still be useful.
评论 #9016380 未加载
评论 #9016101 未加载
pellaover 10 years ago
&gt;All of the features which it claims to be helpful are<p>&gt;either useless or poorly implemented, and it&#x27;s primary<p>&gt;benefits can be easily achieved using namespaces directly.<p>any tutorial ? For me the docker is very easy.<p>and there are some new alternatives:<p>- LXD : <a href="https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-November/010817.html" rel="nofollow">https:&#x2F;&#x2F;lists.linuxcontainers.org&#x2F;pipermail&#x2F;lxc-devel&#x2F;2014-N...</a><p>- Rocket: <a href="https://coreos.com/blog/rocket/" rel="nofollow">https:&#x2F;&#x2F;coreos.com&#x2F;blog&#x2F;rocket&#x2F;</a><p>- Flockport : <a href="http://www.flockport.com/faqs/" rel="nofollow">http:&#x2F;&#x2F;www.flockport.com&#x2F;faqs&#x2F;</a><p>- Spoon : <a href="https://spoon.net/docs/getting-started/spoon-and-docker" rel="nofollow">https:&#x2F;&#x2F;spoon.net&#x2F;docs&#x2F;getting-started&#x2F;spoon-and-docker</a>
评论 #9015531 未加载
评论 #9015572 未加载
评论 #9015611 未加载
评论 #9016225 未加载
评论 #9016213 未加载
sleepycalover 10 years ago
Just wanted to say a huge thank you to everyone who has taken time to reply, the response has been overwhelming! There&#x27;s still many comments I&#x27;m yet to reply to, and will finish replying to these tomorrow evening, but it&#x27;s now 5am and sleep is required.
tszmingover 10 years ago
I think docker is really successful in term of marketing (no offense), I guess they&#x27;ve learnt a lot from the nodejs&#x2F;golang&#x27;s camp :)<p>Just like few years ago, everyone here on the front page is talking about nosql and seems like everyday, there&#x27;s a new webscale nosql database being born...but now, I often see more people here inclined toward traditional technologies such as Postgres as it has been greatly improved. (Yes, a lot of aged software are still improving, e.g. MySQL, Apache, PHP or even Perl5)<p>I am not saying Docker is just a hype, I also don&#x27;t think it is completely unnecessary, but it is not for me to solve my immediate problems and therefore I would rather review Docker..maybe few years later.
robszumskiover 10 years ago
What should the ideal process for building a container look like?<p>Say I have my python app, how do I transform that into a working container? If a Dockerfile is flawed, whats better?
评论 #9015640 未加载
emmelaichover 10 years ago
I always saw Docker as a fast, cheap way to test out deployments. I never considered it for production.<p>For production I&#x27;d use kvm or vmware.<p>Lastly, you might consider systemd-nspawn. It has gained snapshotting recently (on top of btrfs)<p><a href="https://plus.google.com/115547683951727699051/posts/W2itNERXvMh" rel="nofollow">https:&#x2F;&#x2F;plus.google.com&#x2F;115547683951727699051&#x2F;posts&#x2F;W2itNERX...</a>
评论 #9016201 未加载
sleepycalover 10 years ago
Feedback and constructive criticism welcome
评论 #9015516 未加载
评论 #9015527 未加载
评论 #9015752 未加载
评论 #9015600 未加载
hartrorover 10 years ago
My favourite gotcha for Docker right now is the lack of ssh agent forwarding support with Dockerfile. The only solution appears to be to give the Dockerfile a passwordless build key, which is sorta okay for CI but a total hassle for individual developers.
jiballerover 10 years ago
I find it bewildering that you ran docker in production for 6 months and yet you find that running your own docker registry a &quot;complex&quot; operation. Docker has its flaws, like any other technology, but running a registry took me all of 2 minutes on an EC2 instance. Kinda makes me wonder how much you really understand about a real docker workflow.
评论 #9018764 未加载
markbnjover 10 years ago
Ignoring the obviously opinionated cruft and hyper-aggressive uber geek disdain, which appears to make up about 70% of this post, there are still one or two actual statements worth examining. Fwiw I run a small site, fifteen or so instances, and we&#x27;ve been using Docker in our deployment for about a year now.<p>&gt; Lets say you want to build multiple images of a single repo, for example a second image which contains debugging tools, but both using the same base requirements. Docker does not support this.<p>Of course it does. It appears that it doesn&#x27;t support it the way you think it should, but to say that you can&#x27;t do it is misleading. A base image, and two images that pull from it with the different requirements will solve the problem. You apparently don&#x27;t like that solution, but that is not the same thing as not having a solution.<p>&gt; there is no ability to extend a Dockerfile<p>Yeah, this would be nice. Maybe they will add it. But it is hardly... not even close to... a make-or-break feature. Honestly I think you might just need to refactor your stuff, or perhaps Docker just isn&#x27;t a fit for what you&#x27;re doing.<p>&gt; using sub directories will break build context and prevent you using ADD&#x2F;COPY<p>You mean if you include a bunch of stuff in subdirectories that you don&#x27;t want uploaded to the demon. Again, man, not even close to make or break. You really need to log gigabytes to a subdirectory in your build context? There&#x27;s _no other way_ you could set that up? We create gigs of logs too, but most of them are events that go to logstash and get indexed into ES. Our file-based logs go to mount points outside the container. We do have images we build using context, where we ADD or COPY multi-gigabyte static data files. Seems to work fine.<p>&gt; and you cannot use env vars at build time to conditionally change instructions<p>No, you can&#x27;t. I&#x27;m not sure I would want to. I like the fact that the Dockerfile is a declarative and static description of the dependencies for a deployment. I don&#x27;t think I want to have to debug conditional evaluation at build time. There are other ways to solve those problems, like refactoring your images.<p>&gt; Our hacky workaround was to create a base image, two environment specific images and some Makefile automation which involved renaming and sed replacement. There are also some unexpected &quot;features&quot; which lead to env $HOME disappearing, resulting in unhelpful error messages. Absolutely disgusting.<p>First of all, what exactly is hacky about having a base image and two environment-specific images? I don&#x27;t know what sort of makefile automation you&#x27;re talking about, but we do some environment specific sed manipulation of configs at build time, and in some cases at container launch time. Sometimes that makes more sense than having two different versions of the container just to have a very slight change to the config.<p>Secondly... absolutely disgusting? Is that the sort of language you regularly use in technical writing? Oh, hey, look at the third paragraph: &quot;If you expect anything positive from Docker, or its maintainers, then you&#x27;re shit outta luck.&quot; I guess it is. The strike-out font was a nice touch, man. &quot;I don&#x27;t really mean this, but you can&#x27;t help reading it!&quot; Nobody&#x27;s ever done that before.<p>&gt; These problems are caused by the poor architectural design of Docker as a whole, enforcing linear instruction execution even in situations where it is entirely inappropriate<p>You&#x27;re not talking about linear instruction execution. You&#x27;re talking about grouping instructions into commited layers. I would much prefer the proposed LAYER command to conditional execution or branching, which is what I assume you mean by non-linear in your comment. But I don&#x27;t find this to be a serious problem either. That seems to be a pattern with this post: in a year of using Docker to containerize all our services - in-house python code, Django, redis, logstash, elasticsearch, postgresql - I haven&#x27;t run into these issues that are deal breakers for you. Again, you might want to try to refactor and simplify some of your image builds. It&#x27;s better to have a few simpler containers talking to each other than to try to cram a complex multi-service deployment into one. But then, I don&#x27;t know what you&#x27;re doing, and maybe it&#x27;s just not suited for containers. You seem to have a strong preference for VMs anyway, so do that.<p>&gt; However the Docker Hub implementation is flawed for several reasons. Dockerfile does not support multiple FROM instructions (per #3378, #5714 and #5726), meaning you can only inherit from a single image.<p>This whole post is like a laundry list of Absolutely Critical Things Nobody Ever Needed. I can&#x27;t imagine a situation in which you&#x27;d absolutely have to be able to inherit from multiple images. If you have that situation I would agree it&#x27;s an indicator Docker won&#x27;t work the way you currently want to do things. I do agree with you about the occasional speed issues on the hub. But they&#x27;re giving it to lots of people for free, and to me for a ridiculously low price. If I need better performance I can always run my own registry.<p>&gt; There are some specific use cases in which containerisation is the correct approach, but unless you can explain precisely why in your use case, then you should probably be using a hypervisor instead.<p>There are some specific use cases in which virtualization is the correct approach, but unless you can explain precisely why in your use case, then you should probably be using containers instead.<p>See what I did there?<p>&gt; If your development workflow is sane, then you will already understand that Docker is unnecessary.<p>I do like to read even-handed, unbiased reviews of technologies like Docker, even when I already use them. I like to have my world view challenged with an exposition of solid critical points. Maybe someone will write an article like that.
评论 #9018743 未加载
asdasdsadover 10 years ago
Who knows better, has the field to himself! says this guy <a href="https://www.youtube.com/watch?feature=player_detailpage&amp;v=zOpFCf3GWzg#t=206" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?feature=player_detailpage&amp;v=zO...</a> translation here <a href="http://www.rastko.org.rs/knjizevnost/njegos/njegos-mountain_wreath.html" rel="nofollow">http:&#x2F;&#x2F;www.rastko.org.rs&#x2F;knjizevnost&#x2F;njegos&#x2F;njegos-mountain_...</a>