Ken Muse

Using Development Containers

Did you know that you don’t have to setup a complete development environment anymore?

The first step to this process was the ability of IDEs to natively interact with Docker containers. Being able to deploy and debug our developer code within a container created a way to test code that is isolated from the development environment. It was a great first step, but as developers, we often strive for better than great 🤗

The real problem for developers is setting up the development environment. Correctly configuring a developer environment can take anywhere from minutes to days, depending on the complexity. We need plugins, personal configurations, and the app-specific needs. Then we need to setup the environment for testing and debugging. This can include queues, databases, file services, and more. The solution? Separate the heart of the IDE from the UI, enabling it to run headless in a container. Out of this simple innovation came Dev Containers.

A Development Container is an infrastructure-as-code solution that defines a complete development environment. The entire development environment is repeatable, reproducible, and version-controlled. An IDE can create an instance of a Development Container and connect to it. Within the container, a complete, stand-alone environment configuration can be defined and deployed. Because these environments are distributed as code, it’s easy for a team to get started developing. There’s a few ways to take advantage of this:

More options are undoubtedly on the way. At the moment, these solutions don’t work for Visual Studio. For now, those users will need to settle for just deploying and debugging containers. I suspect that may change in the future.

And for what it’s worth … this blog is developed in a container. 😎