3 ms·
Fast Development with Zed and Dev Containers
- bev-erage 2y ago[dead]
- kuratkull 2y agoWhy? I have a Containerfile to which I add new stuff regularly. I build and run it as my 'workspace' container. Works very well.
- ndndjdueej 2y agoI imagine that is a bit tricky to optimize for build speed on a monorepo. Say you have 3 things to build you need to pick the order OR you could use multiple targets amd copy stuff around I suppose. Is the debugging experience good?
- attendant3446 2y agoI've asked the same question and still haven't got a concrete answer as to why anyone would use devcontainers. As I understand it, devcontainers use some base image and then instructions in json file with steps what to add for that specific app. Why not just make a docker image with everything your app needs and use it?
- mikeocool 2y agoYeah I’ve spent a lot of time digging into devcontainers, and I think the basic answer is that they play nice with VScode/codespaces and not much else. If you are using those, it gives you a nice push button way to get up and running. If you’re not using those, they’re pretty awkward — you just end up with images/containers that can only be built/run/interacted with using the devcontainer-cli tooling. Would be nice if there was a simple standard way to point to a dockerfile in your repo (or even an image name) and say “build and run this for the dev env.” And the tools ecosystem could then reference and use standard container tools to build and run.
- ndndjdueej 2y agoPlease reply to this then :) https://news.ycombinator.com/item?id=41940213 https://news.ycombinator.com/item?id=41940213 Genuine question. I want to use Docker for local dev loop but speed puts me off. I typically use it for "ready to push" tests.
- shepherdjerred 2y agoCheck out Earthly :)
- ndndjdueej 2y agoLooks super nice. I checked out the FAQ and didn't find it but does it support debugging (or at least not get in the way)
- xelamonster 2y agoThis sounds better if you never use cloud editor platforms; devcontainer can be useful if you jump between local coding and say GitHub Codespaces where devcontainer.json is automatically recognized. IME a hybrid of your approach and devcontainers works best in that situation though, because I don't want to rely on or even figure out how to use the devcontainer recipes, and building them every time the thing spins up takes forever. I like a workspace container defined in a Dockerfile that publishes to a registry and a very basic devcontainer config to use it.
- laerus 2y agoIDE integration. For example, I use the Jetbrains RustRover IDE on Fedora Atomic, which is an immutable Linux distribution that is based on keeping the OS setup as clean as possible. I use DevContainer to install the toolchains I need for my project and the IDE takes care of setting up my development environment.
- roland35 2y agoI think a lot of it is ide integration. You can see devcontainer details in a tab in vs code for example. But I think the biggest thing is code reuse - there are a lot of plugins for dev containers so it is easy to spin up a new project with things like git, node, defining users, etc etc