3 ms·
Because docker for Mac has always kind of sucked, I’ve moved on to making nix-based development environments and I’ve been very pleased so far. Lately I’ve bee
by hamandcheese 4y ago
Because docker for Mac has always kind of sucked, I’ve moved on to making nix-based development environments and I’ve been very pleased so far.
Lately I’ve been trying https://devenv.sh/ https://devenv.sh/ and it works great!
I haven’t tried it for ruby, though I have used vanilla nix shell for ruby projects before and it worked quite well after I over-rode GEM_PATH and GEM_HOME to the correct values.
- nerdponx 4y agoI've been using Colima lately and it's been a great experience. The only thing that didn't quite work was pushing an image to AWS ECR, but pulling images, building images (with BuildKit), and running containers all worked fine, and faster than Docker.
- hamandcheese 4y agoI've tried Colima too but it has always felt sluggish compared to local dev. I don't think any form of cross-host filesystem sharing could ever be fast enough.
- MuffinFlavored 4y agoisn’t Buildkit Docker?
- MuffinFlavored 4y agohttps://github.com/moby/buildkit https://github.com/moby/buildkit it looks like it is not, kind of?
- krab 4y agoMoby is Docker.
- nerdponx 4y agoWhatever it is, Colima seems to have faster image builds and faster container startup, which makes my life better.
- brigandish 4y agoI hadn't heard of Colima before seeing your comment, decided to give it a whirl and it's a breath of fresh air. Much faster and uses less resources. Thanks!
- bpye 4y agoI’ve been using Nix for a few years and really like the direction of devenv. I much prefer the Nix model over containers everywhere.
- MuffinFlavored 4y agohelp me understand nix file helps you build OCI image and then you run it not locally/somewhere else? can that be compared apples to apples to docker where you can build with Dockerfile syntax, and then run locally the image?
- hamandcheese 4y agoNix builds native software for your platform reproducibly. There is no OCI image, no Docker, just a way to reliably install software, which is a great foundation for building per-project development environments. (Aside: you can build oci images using nix, but that’s probably what you would use for building deployable artifacts for production, not for development). I would not say it is comparable with a Dockerfile - a Dockerfile is closer to a shell script, with caching between each step. Credit to Dockerfile syntax for being very easy to grok, but it is inherently not reproducible. The perceived reliability of docker for development probably comes from the fact that you can share a prebuilt image, but rebuilding might not always work.
- jbverschoor 4y agoWhile it looks really nice, "Without containers" at this point in time with the supplychain attacks doesn't seem to be a good thing. Can devenv environment put itself in a chroot / sandbox where it cannot access my files, and is firewalled by default?