12 ms·
Docker Considered Harmful (2016)
- ohiovr 8y agoI'm not at all convinced that reams and reams of shell scripts to deploy complex applications is a good idea. But by all means go for it if you think that is the way to go.
- tormeh 8y agoThis. Save me from shellscript. I guess it's possible to write good/tolerable shellscript, but most of it is garbage. Obfuscated disasters waiting to happen.
- ohiovr 8y agoThen OS updates and or application updates can break your scripts. It is also nice not having to be married to a particular linux distro. That seems magical to me.
- ben509 8y agoI think he's trying to describe the complexity of it, so a fairer way to characterize it might be some scripts in Python or Ruby. But then once you added enough features that that became unmanageable, you'd write it in a proper systems language like Go, and oh, right, now you're writing Docker.
- zbentley 8y agoI have the same problem. Docker as a means of making deployable, system-imaged tarballs super-easily? Great! And they'll run almost anywhere given the aggressive portability emphasis of Docker-the-product? Even better! Networking, volume mounts, and quotas included? Holy shit, this is awesome! ...now tell me about how all this stuff gets configured. ...shell scripts, you say? &&-spliced because lots of infrastructure is affected by a layer limit? And everything's committed so you can't hook parent containers' "$package_manager upgrade" phases? So everyone is running bunches of time-consuming (or superstitious/witchcraft) commands multiple times throughput the build hierarchy cautionarily if you don't control every layer? What the fuck?! Seriously. Docker is a great product, period. But their community totally dropped the ball on provisioning. Being able to bail back out to shell commands is an important ability, but that being the default for conventional, complex deploys is batshit insane. That's what Puppet/Chef/Ansible/Packer/pick-your-favorite-provisioning-tool were designed to solve. These aren't specialized, high-learning-curve "old-school sysadmin-club members only" technologies. They're easy, accessible, and save you from short (quicker initial provisioning/predictability), medium (updates to low-level parts of your infrastructure), and long-term (tracking security-related dependencies) headaches. Even if people don't use one of these tools for its portability benefits (because they're on Docker, so fuck portability . . . until it manifests as a random-container-linux compatibility issue), I'm baffled as to why they don't pick them up for the benefits in maintainability. Anyone who has had to deploy more than a handful of low-level package updates in a complex containerized deploy has to have asked "isn't there a better way?!" at least twice.
- jzelinskie 8y agoThis article concludes that systemd-nspawn is a more unix-style alternative to Docker. Interestingly enough, this is what rkt uses for its default isolation (stage1). What Docker did is bring all of the aspects mentioned in this article together into something that could be easily understood and used. Now that the ideas are familiar and there are standards like the Open Container Initiative, I think we'll see more smaller and specialized tools being built and used. Take for example CRI-O, which is Red Hat's container runtime that only targets the execution of Pods for Kubernetes.
- wmf 8y agoBTW, were these cool systemd features invented after Docker by any chance?
- majewsky 8y agoAccording to the "Initial release" dates on Wikipedia, systemd is 3 years older than Docker (2010 vs 2013). And one of the core objectives of systemd was to take advantage of then-still-new Linux kernel features like cgroups.
- justincormack 8y agosystemd did not have a container runtime until much more recently.
- majewsky 8y ago> I think you could reimplement [some random part of what Docker does] easily yourself with a small shell script and some calls to mount; but I haven't bothered. Exactly.
- majewsky 8y agoBonus round: > For most purposes, the main interesting thing that Docker containers provide is isolated networking. [...] What else prevents applications from using ports? The firewall that you already have installed on your server. Again, pointless abstraction to address already-solved problems. Comically missing the point.
- geggam 8y agountil you realize the firewall is the same iptables that you use to isolate the network in docker containers
- ecnahc515 8y agoNot at all. IP tables is used to route traffic between containers, yes, but the isolation is done by network namespaces.
- geggam 8y agoInteresting... so you create a network and isolate it from the rest of the network ? How do your applications serve traffic ? Or... you create a network with namespaces and use iptables aka the firewall to network that to the other networks you created with namespaces ? Think about it logically... when you use TCP you share the connections... your namespace isolation is exposed by the very thing that firewalls it... make sense ?
- nazka 8y agoI remember seeing that here actually. Docker in 100 lines of code. https://github.com/p8952/bocker https://github.com/p8952/bocker
- bbrunner 8y agoThis feels a bit like "Why use Dropbox when rsync exists?" type of argument. Sure, you can do everything docker does with shell scripts, and you've been able to for decades, but many people didn't, because it was "complicated". There is often a huge amount of value in simplifying things, even if it means losing some of the power and the end result being objectively worse.
- cremp 8y agoDocker has reached the point that it is complicated. A lot of people never did cgroups just because it is lower, starting to touch kernel stuff. Few people want to go there. Docker is one of those things that you can install and run; it takes a small amount of time to get running. As you said, value in simplifying things. That being said... Anyone who takes the stance that containers are better than X/Y/Z are just showing that they don't have the drive to get into the why of how it all works. Any argument of 'it saves overhead' can take that argument and run with it until the cows come home; but they don't understand that the overhead is all relative. As a programmer; I stopped caring about overhead and starting worrying about the fact that people will break my stuff, I just need to stop them from breaking other things using that as the foothold.
- bbrunner 8y agoI think the base use case of Docker is still relatively simple, although like all things it has gotten to the point where, if you want to dig deep, you definitely can get way into the weeds, especially when you start talking about networking, orchestration, composing containers, and all of the tooling that now exists on top of Docker. When you choose Docker/containers, you make a choice to expose yourself to a distinct class of problems. You make a tradeoff of saving overhead in exchange for opening up other issues. This isn't an absolute good or bad thing, as sometimes shaving off overhead is worth it even if your failure case becomes much worse. I will say that, in general, I've found a lot people don't make this type of consideration and just go with a dogma of "Just use {technology} because it's popular".
- pknopf 8y agoI use Docker daily, and I almost never find it complicated. I use it for build servers and my companies infrastructure. The alternative would be a nightmare to me.
- XVincentX 8y agoIn theory he's totally right. In practice Docker is bringing all these things in a unified and standard tools — basically bringing such technology to the "masses". If you can craft your own system, feel free to move forward with that.
- guildencrantz42 8y agoThe power of docker became clear to me when I handed basic instructions to our web devs and watched it just work. The tooling was docker's secret sauce, nothing more. And, yes, you still need somebody who knows what the system is actually doing keeping an eye on things; you can't just hand a bunch of devs docker and fire your ops team.
- SteveNuts 8y agoThis feels similar to the infamous HN Comment about Dropbox.
- Sohcahtoa82 8y agoThis one? https://news.ycombinator.com/item?id=9224 https://news.ycombinator.com/item?id=9224
- SteveNuts 8y agoYes, the comments about how Docker is really just a bunch of tools strung together reeks of the same ignorance.
- greenhouse_gas 8y agoJust wondering how he must feel now!
- titanomachy 8y ago"Why would I ever want to use this easy-to-use technology when I could get exactly the same effect by combining 6 different standard tools with some custom software that I've written using my decades of Linux administration experience?"
- andrewguenther 8y agoLike any hyped up technology, Docker gets pitched as an "easy, works out of the box, secure by default solution" but it is almost anything but. But also like any technology, if you take the time to really understand what it is doing and what problems it can solve for you, it can be really awesome to work with. Every "Docker Considered Harmful" post I've read basically boils down to "Why would you use Docker if you can use the 10 technologies it wraps around and manage them yourself instead?" Why would I want to do that if I don't have to? Docker wraps these things well. There are weird defaults and there are some popular patterns in the community that are a bit backwards, but you have the power to work around it. Don't run your containers as root and run a dumb init process in your container. That's half of the posts complaints gone right there. Complaining about defaults is one thing, claiming that bad defaults make a technology "harmful" is just lazy.
- bunderbunder 8y ago> Every "Docker Considered Harmful" post I've read basically boils down to "Why would you use Docker if you can use the 10 technologies it wraps around and manage them yourself instead?" Why would I want to do that if I don't have to? Or if you can't? One feature driving Docker adoption that I think a lot of people miss is that it's got fairly workable (if warty in one case and obnoxious in the other) implementations for OS X and Windows. That removes a lot of friction for developers who work in companies where IT won't support Linux on employee workstations. Sure, your ops team can put together a bunch of stuff manually. And then you can create a bunch of extra stuff that makes it easier for development to handle all of that inside virtual machines, and get the network bridging between those apps and the host machine working properly, and all that fun stuff. And by the time you've got it completed and working nicely, you'll be ready to launch your own Docker competitor onto the market.
- geggam 8y agoIt empowers developers to side step many of the best practices learned in SDLC over the last 20 years and ship code they shouldn't The code is then running on a fault tolerant platform which masks the bugs and makes ops life hell when it comes to actual debugging. Additionally upgrades and other assumptions about the base OS and system management are simply swept under the carpet with pretending those issues no longer exist. Effectively it makes much much more work when things break and is great when it runs well or you run it in GCP where they take care of that part for you.
- kenforthewin 8y agoAside from being a bad argument for the reasons already listed, I'm honestly getting tired of the "X considered harmful" meme, when the author never actually makes an argument that docker is harmful, only superfluous.
- carrja99 8y agoAn old favorite: “Considered Harmful” Essays Considered Harmful (https://meyerweb.com/eric/comment/chech.html https://meyerweb.com/eric/comment/chech.html).
- deleted 8y ago[deleted]
- lolsal 8y agoThe biggest complaint that I have is that Docker is a huge leaky abstraction. I end up having to mess with a lot of stuff in order to get docker, docker-compose, etc. all working Just Right®. It saves time, but it's very, very leaky, which makes it a bit of a minefield (which you can learn to navigate).
- ex3ndr 8y agoSo i should learn every possible combination of init system to convert some random launch scripts from the internet to run in my particular setup? Instead of `docker run postgres`? Or how i should do the same in K8s? Invent some packaging format? Wait a second.. aren't all linux packaging formats are overly complicated and are really hard to maintain comparing to docker images? What if some package work only on some ridiculous version of linux?
- titanomachy 8y agoI've tried and failed a couple times to make Debian packages. The system is so old and crufty, writing a dockerfile is an order of magnitude simpler and there are lots of useful examples and tutorials that were written more recently than 20 years ago.
- zbentley 8y ago> I've tried and failed a couple times to make Debian packages. That's a real problem. Distributions have really dropped the ball here (to varying degrees). But there's a big difference between "Docker is $distribution_package_manager done right!" and "Docker at least sucks less than the alternatives". The tradeoff when packaging via Docker is often in integration with other facilities provided by the OS. Some of the hassles of packaging for a native OS package manager are senseless, bad UX to be sure. But others are there for a reason: how to integrate with init systems, standard directory locations, shared cache locations, or (god forbid) desktop/windowing systems? If your answer to those is "fuck it, use Docker", you often end up with a user experience akin to driving a portable mobile home down a small city street: technically fits and obeys traffic patterns, but doesn't behave in a way that anyone who has lived there for awhile expects it to.
- mmt 8y ago> But others are there for a reason: how to integrate with init systems, standard directory locations, shared cache locations, or (god forbid) desktop/windowing systems? Having tried (and succeed) many times in making Debian packages, I can attest to the value of these "hassles" and ones like them. Much of the value is just in making sure one thinks about that whole breadth of issues and how they'll affect your environment. You may decide that a particular hassle actually is too much effort for not enough benefit, but at least the decision is conscious and, if it "bites" you later, you know where/how to go back and change things. Additional value can come from all the taken-for-granted work that's been done over those past 20 years. Need multiple versions of something installed at the same time? Maybe the distro people already have a standard way to do that. Of course, all of this value can only be obtained after a remarkably huge up-front investment of learning, and, from what I recall, already knowing RPM didn't substantially lessen that load when learning debianization. It's tough to fault the attitude of "fuck it, use Docker for packaging" (for any value of "Docker", including "tarball", "pip", "npm", etc) for anyone whose career isn't Ops.
- aaaronic 8y agoPretty weak arguments all around, IMO. Docker has its issues, but most of them aren't really even mentioned here.
- User23 8y agoThe reasons for using Docker are social, not technological.
- aespinoza 8y agoWhat do you mean? Are you referring to the Docker Hub in particular?
- mixmastamyk 8y agoPartly yes. The other is a tool almost everyone knows, like git. Even if it isn't the best one, there is value in everyone knowing it.
- deleted 8y ago[deleted]
- tgsovlerkhgsel 8y agoThis article is ignoring the benefits of standardization. Let's compare it to some other "unnecessary" thing, actual containers: You can put stuff on ships without them, but turns out that once you start using them, just the fact that everything is standardized gives you insane benefits. Of course you could reimplement each part of Docker differently. Of course it's not magic. Nothing is magic about a metal box, and yet that metal box completely revolutionized shipping.
- mayoff 8y agoAnyone interested in the history and effects of the standard shipping container can read (or listen to) “The Box: How the Shipping Container Made the World Smaller and the World Economy Bigger” by Marc Levinson. http://a.co/20Ok77s http://a.co/20Ok77s
- catern 8y agoThat's a nice metaphor, but it's still not at all certain that Docker is the standard solution. We've had Linux for 20 years and we still don't have a single standard package manager; Docker's been around for 5 years and it's already been abstracted over by systems like Kubernetes, making Docker itself less and less relevant. What is certain is that systems like Debian and Fedora are not going away. Your Docker images couldn't be built without them, after all. And the other tools mentioned in the article, too, are not going anywhere. So why don't you just standardize on the real underlying platform?
- breeny592 8y agoBecause there's standardisation beyond just where the app/server/whatever is going to run in production - having a standard way to spin up, describe and control applications & their dependencies that works cross OS lets developers & devops speak the same language, with the same commands. Is docker the silver bullet for this? No, there's tons of other options. But "everyone should use Debian and Fedora" isn't a realistic standardisation.
- koffiezet 8y ago> and it's already been abstracted over by systems like Kubernetes, making Docker itself less and less relevant. But k8s still uses the same concepts used with docker-style 'containers', with registries, layered, isolated filesystem, separate networking, ... all in one box. Docker was just a big nudge in the direction of democratising scalable cloud infrastructure/application stacks. Yes it can be used for other stuff, but that's what it's extremely good at.
- vajrapani666 8y agoI think Docker is very useful for beginning developers and for spinning up and trying out services quickly. The barrier for getting started with web development used to be so much higher, even for people on Mac OSX. To setup a rails development environment with a modern JS frontend, you'd have to setup xcode, mysql, redis, a node build pipeline, homebrew, and futz with system ruby vs rails-specific ruby. You'd have to setup all the above, without knowing what each part did, and barely being comfortable with bash vs terminal. Don't even get me started on how difficult it was for someone with a windows machine to get started with modern development. Now novices can just install docker and type "docker-compose up". Even vagrant didn't make things that easy. A few years ago, I wanted to try out Pentaho's BI platform. I spent hours configuring the JDK, Tomcat, installing all of Pentaho's dependencies, and struggling with configuration errors and outdated documentation. Today, If I wanted to give Pentaho a spin, I could also just pull the docker image. I see your point about most other use-cases for docker, but be careful when you make a blanket statement like "Docker considered harmful". It could be discouraging to those that docker has helped getting started with development and who do find it convenient for certain tasks.
- qqqturing 8y agoThe author seems a bit out of touch. I'm a junior dev and starting a db for development is as easy as `docker run redis`. I don't even know half the tools he mentioned and i will not read the linux source documentation like he suggested to get isolation for my services.
- dom96 8y agoStarting redis manually isn't that much harder though: brew install redis redis-server I personally feel that people reach for Docker too quickly. It's worthwhile to learn how things actually work so that you know what to do when Docker eventually fails you.
- trowawee 8y agoFor me, it's less about the ease of starting one thing than it is the ease of juggling a lot of things. I've got docker containers on my machine for multiple work projects and a few organizations I do volunteer dev work for. Between them, I'm running two versions each of Ruby and Python and a number of instances of Postgres and MySQL, plus local Redis containers for three separate projects. Shifting between them is as simple as docker-compose down/cd/docker-compose up. When I'm done developing for the day, I just take everything down and bring it back the next morning.
- ghshephard 8y agoDocker by itself probably doesn't make any sense to an engineer until they get a chance to see kubernetes in action. There is nothing more awesome than seeing, on the fly, your worker pool being scaled out by 100x by nothing more than kubectl --context k8s-uw1a-gcp -n customerx scale deploy someapp_worker --replicas 100 to make you appreciate what docker can do for you.
- geggam 8y agoWhereas my AWS autoscale group does it for me while I go get me a foo foo drink at $ESTABLISHMENT
- joshribakoff 8y agoKubernetes also has auto scale.
- dharmab 8y agoYou can use one of the two container autoscalers to handle the scaling automatically based on any metric(s) you like, and the cluster autoscaler will scale the ASG as needed :) This is useful for workloads that need to scale on some metric other than CPU/MEM, e.g. request rate, worker queue length...
- merb 8y agosadly it's not cheap to built aws on bare metal.
- geggam 8y agoAnd you think k8s is simple to run on bare metal ? To care and maintain ? Do you understand the kernel tuning and routing Google does to avoid the NAT hell you are going to run into when you manage k8s on your own ?
- merb 8y agoI actually run 3 small bare metal clusters in production. Maintain is basically just a `kubeadm upgrade` on all nodes + reboot (easily scriptable), after some updates get announced. OS Upgrades are done through container-linux-update-operator. NAT is not a problem if you are below or equal to 50 nodes. Not sure if you run into problems if there are more nodes, thought. Also BGP+metallb is quite good. (P.S.: openstack uses NAT heavily as well. and IPVS for k8s should fix most problems if you are running into problems)
- Steltek 8y agoThis article could use some work so I thought I'd chime in with my complaints about Docker... * Patching security vulnerabilities in container images (aka "the next Heartbleed problem") and auditing for the same. * docker-compose is installed via a curl to github. Say what? It's like Docker revels in ignoring the system's package manager. Docker does not and should not replace apt-get but people pretend it does. * Too much config delegated to container entrypoint script. * Firewall rules get wiped out too easily. More a pet peeve of mine but it'd be nice to solve this without "service docker restart". * "--rm" should probably have been the default and the migration to something better needs to start now. In the grand scheme of things, nothing too negative to outweigh the benefits although security vulnerabilities give me some pause.
- NightlyDev 8y agoAbout firewalls and docker... It's so fu##ing annoying that docker changes the default iptables setting for forwarding when installed. :@
- closed 8y ago> docker-compose is installed via a curl to github. pip install docker-compose
- cpuguy83 8y ago> Patching security vulnerabilities in container images (aka "the next Heartbleed problem") and auditing for the same. This is a lot of tooling out there to deal with this, including multiple complimentary (both as in free and tools which compliment each other) implementations of security scanners. > Too much config delegated to container entrypoint script. Can you explain what you mean here? Config of what? Also, have you peered into init scripts for any given application? Application initialization often requires a fair amount of setup that is completely dependent on what the application is. This is not really possible to abstract outside of forking and making the image itself less generic, which is perfectly fine. > Firewall rules get wiped out too easily. More a pet peeve of mine but it'd be nice to solve this without "service docker restart". Using firewalld helps with this as dockerd can (and does) monitor the firewalld for the need to reload rules. Watching iptables directly is rather difficult outside of just polling iptables to see if the ruleset matches what's expected. Not sure it's feasible outside of "does the DOCKER chain exist? No -> reload" > --rm" should probably have been the default and the migration to something better needs to start now. You can't change the default for something like this. It also isn't necessarily the desired behavior. If you really want this to be default, use swarm services instead. --- Full disclosure, worked at Docker for 4 years (now recently at MSFT) and am a maintainer on the docker engine.
- djohnston 8y agoif you work by yourself feel free to use whatever arcane shell scripting you desire, but for the love of humanity, if you are going to expose other people to your code, please use a standardized tool like docker.
- nisa 8y agothe result is arcane shellscripting in the docker image...
- aespinoza 8y agoWhat I got out of this post is a very good insight in how Docker works internally. And it does raise my interest in containers. I have been disconnected from the cloud for quite some time, but I have always been interested in sandboxes, mainly for security purposes. I have used chroot before, seccomp, apparmor and firejail. This is not related to Docker directly, but the author makes the bridge for Docker to be interesting to me.
- wmf 8y agoIf you want to learn more about container security I recommend https://blog.jessfraz.com/ https://blog.jessfraz.com/ and https://github.com/projectatomic/bubblewrap https://github.com/projectatomic/bubblewrap
- aespinoza 8y agoThank you very much for sharing. These links have been added to my bookmarks.
- sixhobbits 8y agoObligatory link to why "considered harmful" essays might be harmful[0]. I'm not a docker "fan". I've seen one too many "hello-world" projects wrapped in docker and had to waste 30+ minutes and 2GB HDD space to do something that should have been a script. That said, any essay that criticises docker without acknowledging the huge benefit of a layer between a full VM (more overhead, more space, more time) and dealing with platform specific issues (oh, if you're using version 3.5 of X and 4.2 of Y then you need to roll back the latest update of Z and sacrifice a goat to the Linux gods), is missing something. I love the plain HTML and that I could read this in the train on a very spotty mobile connection. [0] https://meyerweb.com/eric/comment/chech.html https://meyerweb.com/eric/comment/chech.html
- bcheung 8y agoI think the author misses the point that Docker is a standard and that is where the value is. The value is the ecosystem and tooling that is possible once people standardize. Most of the article reads like "Programming language X is Turing complete, therefore all other programming languages are pointless."
- markbnj 8y agoAll of these arguments are well-aired, and the tone of the article doesn't make this particular presentation of them more useful than any of the others. I would guess a large portion of the developers actively using containers are well aware that they are built from existing system capabilities that can be utilized without docker or any container runtime. I mean this is from 2015: https://chimeracoder.github.io/docker-without-docker/#1 https://chimeracoder.github.io/docker-without-docker/#1. You can argue that the new way of bundling these things together is not better, simpler, more reproducible or less error prone, but whatever... the market has voted. I personally think it is all those things, but we can disagree about that. One thing in particular I wanted to respond to and that is the idea of your container filling up with orphan zombie processes because init is not pid 1. If I understand the issue correctly this can only happen if pid 1 creates child processes and then itself dies/exits. I've never personally seen this issue in four years of working with containers, and since all of our containers now run on k8s they would be restarted if pid 1 exited abnormally or otherwise. I'll be interested to see if any other HN commenters have actually had this problem. Also re: the supposed absurdity of one process per container... it's just simpler and works more robustly with orchestration. Containers are lightweight, so there's no reason to try to pack a whole system into an image. It's simpler to reason about a composition of containers than a mess of processes running inside a single container, imo.
- adrianmonk 8y agoYeah, their zombie process argument is weak. In theory, you are vulnerable because you've eliminated the zombie reaping mechanism. In practice, the fact that you're running only one application allows you to make lots of simplifying assumptions so you can avoid getting into this situation quite easily. Just stick with a model where parents never exit before children (and always reap children). You don't need an adoptive parent if you never create orphans. And even if it did happen, the resource consumption is tiny. Zombie processes free all their memory, close all their files, etc. The only remainder is a small data structure necessary to support stuff like the wait() call returning the process's exit status.
- raesene9 8y agoThis article probably needs a (2016) tag. Docker has moved on quite a bit since then...
- Arzh 8y agoAnything new since the last time this was posted?
- jek0 8y agoDocker wins because it's easy to use and becomes a de-facto standard. The author misses that completely. I get it, you can do "manually" the same things as docker when you're a good system administrator. You'll come up with your own unique solution to most problems addressed by docker. Regardless of the fact that it'll probably be specific to a single linux distribution, you probably won't have anyone interested in investing time in learning your unique way of doing containers. I did not waste time when I learned how docker does it. I login into a server managed by this author, curse him for using all those "standard" techniques in his own unique way. Spend hours figuring out the details. I login into a server running things with docker: I already know all I need. `docker ps` will tell me what services it runs, `docker inspect` for more info, `docker logs` give me the logs of whatever service I need to check, etc.
- mmt 8y ago> Docker wins because it's easy to use. > The author misses that completely. That's inconsistent with what the article says right in the introductory paragraph: > Docker is genuinely more complex and harder to use than the alternatives. > I'm recommending them because they are simpler to learn and use. You may disagree with their relative ease, but it's disingenuous to say that the author misses that. > You'll come up with your own unique solution to most problems addressed by docker. "Unique" is a pretty extraordinary claim, considering the author is advocating using pre-existing tools and facilities. Replacing AUFS with Btrfs is a far cry from writing ones own filesystem entirely. > I login into a server managed by this author, curse him for using all those "standard" techniques in his own unique way. Spend hours figuring out the details. They're not "standard" (with quotes). They're standard (without quotes). They have man pages. They're well-documented and (one would hope, if Docker makes heavy use of some of them) well-understood. Again, just because he didn't use them in the Docker way, doesn't make that way unique. Chances are, if it takes you hours to figure it out, especially if you already know what and how Docker does it, you're doing something woefully wrong. > I login into a server running things with docker: I already know all I need I could make exactly the same statement with the situations reversed, except with the addition that I now have to learn this "docker" tool with its added complexity and new syntax to make sure I don't break anything in case I have to make a change. Already knowing a tool fails to address the author's point.
- derefr 8y agoThe point of Docker is basically that the container-image developer is specifying the sandbox, instead of the sysadmin specifying the sandbox. None of the things mentioned solve the problem of the sysadmin having to "design" the solution from the top down. Docker does. A Docker image is an appliance. You don't architect it; you just configure it. You don't have to care which OS it's running inside. Docker images running on Windows don't even care whether it's Windows Core or Ubuntu inside them, even. It's a black box with defined configurability-points. The only real comparisons to Docker are 1. Amazon's AMIs (though nobody hosts a public AMI registry except for Amazon, so it's not really a good comparison); 2. Canonical's "snap" format (https://snapcraft.io https://snapcraft.io) Both of these achieve the same things that Docker achieves: developer-distributed virtual appliances configured by the sysadmin but "managed" automatically by the runtime. And both are just as complicated as Docker. The complexity is necessary.
- marios 8y agoYou do have to care which OS it's running inside if only to know when to patch it for $vulnerability_of_the_day. It sure is convenient to consider it as a blackbox that you 'just' need to configure, but that's just pushing responsibility to the developer(s). In my short experience, the latter seldom care about security. When a security breach occurs, who is going to take the fall ? The sysadmins that supposedly run operations, or the developers that failed to provided an updated appliance ?
- cup-of-tea 8y agoConceptually it seems quite possible to automatically send alerts to the devs responsible when something in the container is out of date. It means that the containers have to be specified using supported methods, but I think a lot can be covered quite easily.
- cellularmitosis 8y ago> You do have to care which OS it's running inside if only to know when to patch it for $vulnerability_of_the_day. I think grandparent was using "you" to refer to the docker container developer, not the host OS maintainer.
- meddlepal 8y agoThis post totally misses the forest for some trees. Docker isn't a success because it is some amazing revolutionary technology that doesn't exist in another form. Docker is a success and beloved by many because it provides a UX that doesn't require learning about a lot of this stuff upfront so you can get a lot of the immediate benefit without knowing a ton.
- ben509 8y agoEspecially, the ton you don't need to know is the endless configuration headaches associated with running a VM, communicating with the VM, mucking about with the filesystem, etc. I've been computering for 20 years, I've seen my share of OS's, but if I want to use a new one, it's back to square one as I'm poking around for manpages and other bullshit. I don't feel smarter after learning yet another deranged mind's conventions.
- Theodores 8y agoSilly question, but I have heard that around a fifth of the websites that you see on the internet use 'Wordpress'. 'Wordpress' is a simple blogging platform that has a really nice editor that people like working with. There are many add-ons for 'Wordpress' that enable people to customise what it does and what it looks like. These can complicate matters, however, at the end of the day, 'Wordpress' is just a neat blogging tool and does not require rocket surgery to work with. In this age of fancy build tools and containerisation, is it necessary and advantageous to develop 'Wordpress' with Docker, Vagrant or any other containerisation? I could see this as being helpful if you are only allowed a consumer operating system, e.g. Microsoft Windows, but is containerisation the way one would develop a simple Wordpress site if your company's IT department allowed you to run a linux machine? Admittedly 'Wordpress' is the Hello World of getting online but I genuinely do not know if containerisation is what people would do these days for such a simple use case.
- nisa 8y agoSure, you can do that - https://themeisle.com/blog/local-wordpress-development-using-docker/ https://themeisle.com/blog/local-wordpress-development-using... You can also install something like WAMP on Windows and develop locally http://www.wampserver.com http://www.wampserver.com As for the benefit... you can switch i.e. PHP version by simply editing the docker-compose.yml file - this is everything but simple on most Linux distributions.
- sleepybrett 8y ago... 2016.
- sctb 8y agoThanks, updated.
- autotune 8y agoPersonally, and somewhat surprised it wasn't mentioned, I'm less concerned about everything mentioned in this post and more concerned about the docker ecosystem involving people using random and potentially compromised containers off of DockerHub: https://arstechnica.com/information-technology/2018/06/backdoored-images-downloaded-5-million-times-finally-removed-from-docker-hub/ https://arstechnica.com/information-technology/2018/06/backd...
- sebringj 8y agoI find myself using it for development more than anything else and it is very nice for that. For example I have a little universe of very singularly purposed things that work together in a bundle. Come time to actually deploy it in production, I would typically have these individual things broke out into their own clusters of servers or cherry pick managed services that make the most sense for cost/reliability/ease of use etc. but I'm sure I'm just inexperienced with all the different scenarios larger orgs would do. At least for development, it really is beautiful to work with and saves loads of time fiddling to get some monstrosity of permutation settings just right after googling many hours to get there. I don't recall spending a day on setting up an env and thinking that it was worth knowing how to do or time well spent.
- IshKebab 8y agoI think we've reached the point where "X considered harmful" articles can be dismissed as easily as headlines that end with a question mark.
- mmagin 8y agoI don't know if it was true when the article was written, but at least today some of what the author writes in http://catern.com/posts/docker.html#sec-4 http://catern.com/posts/docker.html#sec-4 is untrue. https://docs.docker.com/engine/security/security/#linux-kernel-capabilities https://docs.docker.com/engine/security/security/#linux-kern...
- catern 8y agoFrom your link: >One primary risk with running Docker containers is that the default set of capabilities and mounts given to a container may provide incomplete isolation, either independently, or when used in combination with kernel vulnerabilities.
- crooked-v 8y agohttps://xkcd.com/1988/ https://xkcd.com/1988/
- luckycharms810 8y agoI think people who don't prefer Docker find it hard to articulate what is wrong with it. To me it is really a question of, how do you vet software before you use it ? Will you take the time to understand your stack before it's deployed? When you employ certain abstractions, how much visibility do you lose ? Is it worth it ? Docker is fine as one of many alternatives, but to turn your nose up at well written, battle tested software which is part of most Linux distro's is a little crazy. I would definitely bet that people who chose to learn how cgroups work, how systemd works will see their skills age more gracefully. It reminds me of Dev-ops candidates that I have interviewed that laugh at the idea of ssh-ing to deploy a new version of code, without understanding that Ansible is generally doing the same.
- deleted 8y ago[deleted]
- hrcxxx 8y agoWith docker you can adhere to the "Build once, deploy anywhere" philosophy.
- codedokode 8y agoI think that Docker became popular because of very limited functionality of distributions' package managers that doesn't match developers' expectations. Traditionally in Linux there is no concept of "system" and "applications". There is only one large "system" and you can add parts to it. In old times, you downloaded C source code, make'd and installed it. Now you use a package manager to extend your system with new features, like playing music or editing images. There are no "applications". If you download Firefox package from Debian repository, it is not the Firefox application; it is a version of Firefox, tuned, patched and customized for integrating into Debian. You probably won't be able to run it even in Ubuntu, let alone other distributions. Paths are often hardcoded; you cannot install a program into your home directory or an USB drive (apt-get might let you do that but it won't fix the embedded file paths for you). It might be good enough for a user (as we see with Google Play Store on Android), but it is very inconvenient for a developer. You often need to have several versions of a program, for example, PHP interpreter or Go compiler; no way a package manager lets you do that, compile them yourself. You might want to use an application with project-specific config rather than the one in /etc and start it on demand rather than install as a system daemon. That is not easy too. Apt-get and dpkg has literally hundreds of configuration knobs in the manual but you cannot choose installation directory. If you want to run an old application, like Firefox 2.0, get prepared for troubles. While newer versions of libraries like gtk are supposed to be backwards compatible, it won't run with them (I tried). You will have to obtain and build old versions of gtk manually; good luck with that. On the good side, I can add that Debian maintains an archive of old packages and you need only to write a custom package manager to install them along with their dependencies. Often official repositories have outdated versions of software; you have to add third-party repositories while giving them full root access to your machine. Want to install Sublime Text in Debian? You have to trust its authors because they can replace your sshd and you won't even notice. Also, third-party repos sometimes break or conflict with system ones. Package managers are a pain for developers too. They have to maintain packages for all popular distributions, and even for different versions of those distribution. Because there is no "apps", you have to integrate your program into every distibution manually. Of course, you will have to do it again and again when anything changes in the distro. Distro maintainers often have to do the same thing, maintaining private patches. And on top of that, different distributions use different package format. Maybe one of the reasons for this is a lack of a standard package manager and build system for C programs. You cannot download from Github and build a C program with dependencies with a single command. It is disappointing if you got used to languages like PHP where it has been possible for a long time. Docker seems to solve many of these problems (and some other, like hardcoded server port numbers) by using a lightweigt virtual machine with full-blown distribution in it. Of course it looks more like a quick hack rather than reliable and well-thought solution. Also, Docker requires many resources: space on disk to store multiple images, memory and CPU time to run unnsesessary daemons inside virtual machines. I don't like it. By the way Linux kernel has similar problem with drivers that are a part of a kernel rather than separate entities.
- gsich 8y agoDocker is the new way of doing "curl|bash".
- AzzieElbab 8y agoI absolutely love docker myself. However, in my in enterprise is mostly valuable to interns and consultants. They show managers how quickly they can get things running and leave it to ops to actually getting things working
- fiatjaf 8y agoI'm waiting for someone to invent a simple Heroku-on-your-own-server kind of thing that you can use to run small apps, maybe on top of Docker. Dokku is not that option. Dokku is a super-complex operating system by itself, a mistery of stuff glued into each other by bash scripts, full of bugs and corner cases.
- mesozoic 8y agoIts a bit like - Why use C when assembly exists. Why use C++ when C exists. Why use Python when C++ exists. They all have uses.
- deleted 8y ago[deleted]
- quacker 8y agoSure. I "just" have to go read man pages for days to understand 20 different commands. "Just" use several commands to isolate my not-a-container. "Just" use debootstrap (or not on different distros!), or actually maybe "just" use nix and guix. And "just" carefully use several btrfs-subvolume commands (or not if you want aufs, zfs, or something else!). And "just" a few more things after that - maybe "just" use systemd-nspawn (or not, for any non systemd system). It's always "just" one more tool I can cobble together to provide what Docker gives me. This is not simple. Docker is not a bad tool for abstracting away all of these underlying details. I'm not going to pretend that Docker is simple or flawless. But it has reasonable defaults and is easy to use. It is easy to pull containers and run them. It is easy to install on Linux, OS X, and Windows (or maybe I should "just" figure out how to run a hypervisor). It is easy to read and write a dockerfile. Critically, it is just as easy for my coworkers to use Docker as well.
- cdmckay 8y agoExactly. I fail to see how having to understand the internals of Linux containers and writing custom C programs is easier than writing a Dockerfile and running docker build.
- heavenlyblue 8y agoThen "just" figure out how to run all of these commands over the network so that you could connect several hosts together. Then "just" fix all of the bugs and holes in the security of this implementation. Docker _is_ by itself a bunch of shell scripts managed by a networked daemon.
- pxc 8y agoThat alternative tools have their own learning curves (which generally compare unfavorably to Docker's, which is exceptionally gentle) and that you have to make decisions about how to fit them together is a very valid and relevant point. But it struck me that all of your 'just's really didn't seem like a big deal to me. I set up a Nix installation on a separate BTRFS subvolume on a Debian-based system that I got as a multimedia PC for my uncle as a gift a few weeks ago. I also had to replace the default initial ramdisk image generator with another one to get the subvolume mounted early enough for systemd to automatically launch services that lived on the Nix subvolume on first boot. It really didn't seem like that big of a deal for me. Each piece of it was just a small step away from a background of Linux administration knowledge I built up as a teenager when I used to distrohop and play around for fun. All of this is to say that a difference in background is likely behind this gap of perceptions. Someone with a background in ops is likely invested in traditions that have different strengths and weaknesses than the approach that Docker offers. For people in positions like that, approaches that are perhaps more involved but preserve more of the virtues of those traditional toolsets may seem like a smaller leap than the one to containers. You've used the word 'just' here to highlight what to you seem unreasonable levels of difficulty or required background knowledge, which makes sense. But couldn't I just as well say that Docker advocates would have us 'just' abandon the very notion of shared libraries, 'just' try to get by without actually knowing how to build or verify our dependency chains, 'just' grab binaries from strangers on the net, 'just' download gigabytes of binary data to perform builds, 'just' virtualize Linux on macOS in order to use software that runs natively on it, etc.? At the same time, for things like microservices development, Docker also makes some serious demands on time and knowledge, e.g., 'just' refactor all of your legacy services so they can be safely started in any order or 'just' learn Kubernetes so that your can initialize services in order of dependencies.
- 40four 8y agoPlus one for the scathing and unapologetic criticism of Docker. I'm admitedly pretty inexperienced with Docker, but I feel like everything I've read on it seems to have virtually nothing bad to say about it, so it's nice to hear an opposing opinion. That being said, this also feels like a "Get off my lawn" type of rant from an experienced devoloper who is stuck in their ways, and/or has a little bit too big of an ego regarding their own skillset/knowledge. It's like the author is mad at a successfull project just because they knew how to do all these things before said project came along and combined them all in an easy to use package. I'm a junior level developer (just finished 1st year of professional work), so I look at these things in a totally different way. Maybe Docker is just reinventing the wheel, but if it makes it easier for inexperienced developers like myself to do things that require a long, complex tool chain, & concepts that aren't obvious to someone who hasn't been coding since the old days, then I'm all for it. The point is to get work done & get it done quickly. For sure it's important to learn all the underpinnings, but I think junior developers tend to grind out passable work first, and fill in the gaps of knowledge slowly but surely as they go (at least that's my experience). But this is also why I up voted this & one of the main reasons I frequent HN, because articles like this are illuminating, & point me in directions I didn't know I should be looking :)
- koffiezet 8y ago> Maybe Docker is just reinventing the wheel... Docker is way more than that, and he's completely ignoring the bigger picture, and many people seem to be missing that. It's importance is not limited to "my little server" - it's the concepts that matter - not the technological details. Docker standardised a set of concepts, which have been adopted at a rapid pace for a reason. It's no accident big corporations like RedHat Google, Microsoft, Amazon are jumping on Kubernetes (which uses the docker concepts, and massively extends them), for cloud deployments, it's the future. It enables a standard way to quickly deploy and configure applications in a relative standardised way, and democratised doing this at cloud-scale. Sure you can use it locally and for smaller-scale, but that was never that hard, although it made it easier and faster too in some situations. I'm a devops/sysadmin guy that introduced docker to quite a few developers, and most were very hesitant and sceptical at the beginning. But once they saw the power of what docker can do for them, that attitude quickly changed - and a lot went overboard with it initially (as did I in the early days I must admit). Stuff the devs especially loved was the fact that with a single command, they could launch the entire application stack of whatever project they were working on locally, and with another command stop or destroy it. Database servers, amqp/rabbitmq/..., reverse proxies with path rewriting, ... One person had to maintain the docker-compose config, all the others just did 'docker-compose up -d'. It also allowed them to easily add dev supporting services like mailhog, that fakes an SMTP server, where they could visualise the emails they sent in a webui, add a chaos monkey for testing, ... For ops it also made stuff easy - the "works on my machine" virtually disappeared or at least was very quick to fix. Configuration and deployment was clear and straight-forward, even if eventually it wasn't deployed on docker.
- sabujp 8y agothe nice thing about docker is that it's been standardized across multiple platforms, we even have windows native containers now. There's also buildkit which one can use to create a cached/incremental build system
- lsc 8y agoAs far as I can tell, Docker is a lot like amazon AWS in that the primary reason to use it in corp (I'm talking about corp IT; as opposed to production/customer facing stuff) is that due to the hype, it somehow got past security, and you are allowed (by corp security types) to do things in it that would require filling out forms in triplicate to do on cheaper or more secure infrastructure. I've worked places where they wouldn't let us run virtual machines of any type... except docker. Custom docker images were just fine. In the aughts, I worked places where spinning up a virtual machine on our internal infrastructure required manager approval and a day and a half of someone manually jiggering the thing. (I've been that someone doing the jiggering, too) - and I could totally understand that when aws opened for business, people practically fled to that platform. What's interesting about AWS is that most places still don't have AWS level provisioning of virtual machines, even though there exist tools like ganeti that work and are pretty easy to use (though difficult to tie into accounting)
- VeejayRampay 8y agoI'm still waiting for a good Docker tutorial with an actual project using actual bricks that people use in real life (like nginx, an Express app, maybe some memcache, redis, LBs, etc). All the tutorials you find revolve around mundane things like getting your environment ready and never on the actual issues that people face when using the tech.
- apexalpha 8y ago"Wordpress Considered Harmful" Why not host your own blog with Bootstrap? ... Every tool trying to simplify or standardise something will inevitably be met with critisism from someone saying: 'but it's not hard, you just do <insert entire manpage here>', completely missing the point.
- 0x7f800000 8y agoThere are two certainties in software development: 0. A new technology will arise and it will be named 'X' 1. Eventually someone will write an article titled 'X Considered Harmful'