Hacker News new | ask | show | jobs
by vajrapani666 2919 days ago
I 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.

2 comments

Your first point alone would make Docker worth it for me if that was literally all it did. I've on-boarded junior devs on several projects over the last few years, and being able to give them pull access, send them the instructions for installing Docker and docker-compose and then having a working dev environment on their local device an hour after they open their computer for the first time is invaluable. The whole universe of tools that have grown up around Docker are also fantastic, but erasing the friction of starting up is a killer application on its own (also, making it so I never again have to hear "Well it works on my machine!" is also, on its own, worth pretty much any pain Docker brings).

And what I've seen is that at some point, at least a few of the junior devs get interested in what's going on under the hood and ta-da, we have our candidates for dev-ops work. Erasing the initial friction doesn't mean they erase their curiosity.

The 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.
Starting 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.
For 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.
when you have to manage a large number of services with a bunch of different devs touching things, Docker is almost required to get a consistent development state.

There's literally nothing wrong with reaching for Docker right away. It allows you to have the same, repeatable development environment. Maybe you deploy to production without Docker, but any project I start I'll reach for Docker right away.

> i will not read the linux source documentation like he suggested to get isolation for my services.

that are likely running as root on a base kernel that is out of date with vulnerabilities..