TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Development Containers

131 pointsby shchekleinover 2 years ago

14 comments

pamelafoxover 2 years ago
Disclosure: I work at Microsoft &#x2F; Azure.<p>I am a dev container addict. I work on tons of different projects across languages, and it&#x27;s so nice for the dev environment to just work (mostly- if it doesn&#x27;t, it&#x27;s because of M1 issues). I also love Github Codespaces (that uses dev containers), I&#x27;ve been using it for all my workshops lately and attendees tend to prefer Codespaces instead of local dev.<p>If you&#x27;re looking for example dev containers, I&#x27;ve got a bunch of repos linked from my read me that have support: <a href="https:&#x2F;&#x2F;github.com&#x2F;pamelafox">https:&#x2F;&#x2F;github.com&#x2F;pamelafox</a><p>The trickiest ones have involved databases, but I was happy to be able to get PostgreSQL running inside the container, along with an admin for it! We did a Youtube stream showing that here: <a href="https:&#x2F;&#x2F;t.co&#x2F;0Kl57Ew46C" rel="nofollow">https:&#x2F;&#x2F;t.co&#x2F;0Kl57Ew46C</a><p>Yesterday I got docker-in-docker working as I&#x27;m running a Docker workshop today and want Codespaces to be an option. So cool. That&#x27;s at <a href="https:&#x2F;&#x2F;github.com&#x2F;pamelafox&#x2F;flask-surveys-container-app&#x2F;tree&#x2F;main&#x2F;.devcontainer">https:&#x2F;&#x2F;github.com&#x2F;pamelafox&#x2F;flask-surveys-container-app&#x2F;tre...</a>
评论 #34520787 未加载
评论 #34520144 未加载
评论 #34520588 未加载
shchekleinover 2 years ago
The way I see it - it&#x27;s a really nice way to make reusable modules out of your Docker files (e.g. we need to install a tool and we need to run apt-get + some config, etc). And a simpler, JSON syntax to apply those modules on top of a base image.<p>I love the experience so far, we&#x27;ve done a few features (modules) - e.g. this one to install `nvtop` to see GPU utilization [0]<p>The whole CUDA + nvtop + (some other tools) setup for a project to be run on a remote machine (e.g. via VS Code) becomes like this [1]<p>And that&#x27;s enough to run ML training on GH Codespaces with GPU support. Super cool experience.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;iterative&#x2F;features&#x2F;blob&#x2F;main&#x2F;src&#x2F;nvtop&#x2F;install.sh">https:&#x2F;&#x2F;github.com&#x2F;iterative&#x2F;features&#x2F;blob&#x2F;main&#x2F;src&#x2F;nvtop&#x2F;in...</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;shcheklein&#x2F;hackathon&#x2F;blob&#x2F;main&#x2F;.devcontainer.json">https:&#x2F;&#x2F;github.com&#x2F;shcheklein&#x2F;hackathon&#x2F;blob&#x2F;main&#x2F;.devcontai...</a>
filmgirlcwover 2 years ago
I’m a huge fan of devcontainers. If you use VS Code or Codespaces, it makes it really easy to do a remote environment exactly the same for everyone. I use them in workshops and it’s great.<p>It’s an open standard and we’re starting to see more members of the community adopt it or integrate support into their stuff too (including some larger Nix players like devenv and Jetpack.io) and I really hope others adopt it too. For me, for however many years I’ve been using these (it’s at least 2 but it could be longer, time is a circle), it has definitely improved my QoL.<p>Disclosure: I work at GitHub which uses devcontainers in Codespaces and I used to work at Microsoft which developed this and used it with VS Code and the amazing VS Code remote extension.
评论 #34518774 未加载
djha-skinover 2 years ago
My coworker uses this a lot at work to solve the problem of keeping different software versions consistent across developer machines on the team. Being by Microsoft, this dovetails really well with Visual Studio Code. I find the CLI to be okay I guess for something written in JavaScript. I prefer ASDF generally[1] for solving this problem, since there&#x27;s always a lot of fiddling you have to do with containers, but this is more cross platform so there&#x27;s that.<p>1: <a href="https:&#x2F;&#x2F;asdf-vm.com" rel="nofollow">https:&#x2F;&#x2F;asdf-vm.com</a>
评论 #34515051 未加载
mikaelumanover 2 years ago
I don&#x27;t get why I need this rather than just a plain container&#x2F;dockerfile. That is how I work today and that is my &quot;devcontainer&quot;, no separate markup needed.
评论 #34518231 未加载
评论 #34515863 未加载
评论 #34520245 未加载
mshekowover 2 years ago
containers.dev is a spec created and only implemented by Microsoft (in Visual Studio [Code] and GitHub Codespaces). Tool vendors (of IDEs) decided to go to war, instead of collaborating, it seems. XKCD&#x27;s &quot;standards&quot; comic seems to apply [0] here.<p>As I&#x27;ve blogged about here [1], there are other specs such as Devfile.io or GitPod&#x27;s proprietary gitpod.yml file.<p>[0] <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2022&#x2F;10&#x2F;30&#x2F;container-based-development-envs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2022&#x2F;10&#x2F;30&#x2F;container-based-deve...</a>
评论 #34515194 未加载
评论 #34515833 未加载
评论 #34515461 未加载
m463over 2 years ago
What I find interesting is:<p>json... with comments
评论 #34517604 未加载
评论 #34517122 未加载
评论 #34519230 未加载
epolanskiover 2 years ago
Aside of comments about the containers spec, I&#x27;d like to share that codespaces-like environments are huge for me.<p>Being able to able to open an open source project on the go just by launching a codespace is no small feat.<p>I have also been recently programming in quite heavy environments which my computer could not handle (especially when screen sharing) properly so launching the environment in a remote cloud instance with 8 core and 16GB of ram was useful.<p>All my personal projects are developed in codespaces too to minimize time I spend setting up or syncing those to lower the friction as much as possible. Going from desktop to tablet to my laptop all I need to do is to launch the codespace.<p>I hope other vendors will contribute to the spec, there&#x27;s nothing to benefit here from every cloud implementing their own spec, they will eventually lose to Microsoft rather than leverage the spec.
teerayover 2 years ago
Is this basically Nix derivations, but with a more familiar syntax? (Dockerfiles)
评论 #34515020 未加载
评论 #34518298 未加载
评论 #34516336 未加载
评论 #34518782 未加载
pphyschover 2 years ago
Your choice of dev environment should be driven by product requirements, period. Dev environments should dogfood the production supply chain <i>as much as possible</i>, meaning use the same base container&#x2F;OS&#x2F;toolchain&#x2F;etc that will be used in production.<p>Otherwise you are going to miss bugs&#x2F;vulnerabilities and spend a lot of time keeping dev&#x2F;prod provisioning in sync.<p>Deploying to containers&#x2F;k8s? Develop in a container.<p>Deploying to VM&#x2F;bare metal? Develop in a VM (Vagrant).<p>Developing a portable library? Nix may be a good fit.
jeanpraloover 2 years ago
what is the difference with docker-compose here ?
评论 #34516410 未加载
评论 #34519605 未加载
ivan_burazinover 2 years ago
I love the standard, in fact we have implemented it in the new beta version of Codeanywhere
zokierover 2 years ago
Tbh I feel that all this everything version pinned and containerized ultimately is inducing lot of fragility in the ecosystem, and makes it more and more difficult to work with wide range of tools. Reminds me of smalltalk images in one way, and in other way of one enterprise gig I did where using some ancient IBM IDE and runtime was required because the project setup was too crusty to trust it to work any other way.<p>I long for the opportunity where the software I develop would work with plain vanilla Debian stable and would require nothing else.
评论 #34515622 未加载
评论 #34515976 未加载
fatih-erikliover 2 years ago
I wouldn&#x27;t recommend. If a dev environment needs such containers you probably work in crap
评论 #34515884 未加载
评论 #34520390 未加载
评论 #34515107 未加载
评论 #34519508 未加载
评论 #34522588 未加载