Comment by hintymad

Comment by hintymad 3 days ago

12 replies

Honest question: why do people prefer developing code inside a docker? I get the benefits of docker as a deployment unit, but wouldn’t configuring a dev container and using it a hassle nonetheless, compared to not doing them at all?

tkiolp4 3 days ago

Personally I don’t trust running npm/pip/gradle/etc in my own machine. I feel more secure running them in containers or VMs. Some IDEs like jetbrains’ support remote development (it’s not perfect but better than risking my own machine)

  • MuffinFlavored 3 days ago

    Do you feel safe driving in traffic / breathing polluted air / having restaurants prepare your food?

blurrybird 3 days ago

If you commit the .devcontainer.json and associated files your whole team gets a consistent, local-feeling, environment for free.

Containerisation solved the "Works on my machine" gap between local and prod. This is just solving for the same gap between Dev 1 and Dev 2.

  • globular-toast 3 days ago

    That's a different thing. You're talking about running the software under development in a container. I think the commenter was asking about running the dev tooling in a container, which I find a massive pain.

    • dymk 3 days ago

      No, that’s what they’re talking about - running the tooling in a container. Dev tool chains are a pain in the ass to keep consistent in even small teams. Devcontainers solve that.

  • ColonelPhantom 3 days ago

    Devcontainers don't "feel" local to me, since my CLI tools are not available in them. Think ripgrep or fd, for example.

    • 3eb7988a1663 3 days ago

      You could include those as part of the tooling. I have been experimenting with including mise as part of the image and then layer on the extra tools within there. Put all of those steps into the build so it is automatic.

magic_hamster 3 days ago

Separation of dependencies and ability to easily interconnect containers.

lvl155 3 days ago

If you’re like me and want to maintain a clean dev machine. I don’t want my machine to get in my way when I need to get work done. That means I don’t want some X messing things up somewhere that I didn’t know about. Older I get my memory isn’t as sharp and things like this matter.

dboreham 3 days ago

If the host OS is not Linux (usually Windows or macos) then "running in a container" is cover for "running on the right OS".