Hacker News new | ask | show | jobs
by aidanhs 3974 days ago
I think you're being overly dismissive when it comes to easy dev environments. I was recently fixing the reddit vagrant environment and it was absolutely excruciating:

- Creating a scratch VM (not even provisioning) is a speed bump when you want to re-running scripts on a pristine environment to validate them. Starting a Docker image takes ~1s.

- Provisioning is slow! Reddit suggests installing a plugin (vagrant-cachier) to keep you sane. I ended up downloading a plugin to take VirtualBox snapshots of my VM and even that was depressingly slow. Docker commit takes maybe 20s on a big layer.

- VirtualBox shared folders are pretty bad, so apparently I should install vagrant-bindfs (and NFS packages). -v is effectively zero effort.

- I had to keep on shutting down and starting up the VM to tweak memory settings - too big and my laptop died, too small and nothing would start. You get far more flexible controls in Docker.

I couldn't help but think all the way through that putting everything in a Docker container would just be a far nicer experience, even if it does violate the single process rule - for this use case, Docker solves some papercuts very effectively.

3 comments

I hear ya, but there are tools for this sort of thing

- snapshots, provision your VM once, snapshot it, power off.

- clone a new machine from that snapshot (its still powered on, and do what you will with it)

Bonus points for attaching an ephemeral drive.

- provisioning is slow, thats why you have hot spares to clone from/use directly.

To minimise hassle, I use the very same infrastructure that I deploy on in prod. This means that there is no difference between prod and dev.

I understand the need to run stuff on laptops, but for me, its really not worth it. Using the same systems and sized machines as in prod makes life so much simpler. Plus I can hand over a machine to another dev really simply.

lol i just deployed reddit on docker. very, very nice. will put it up on github if you are interested.