Developing Inside a Container
The Visual Studio Code Dev Containers extension allows developers to create a development environment within a container, ensuring consistent tool access and runtime stacks. Users need Docker installed and can enhance functionalities with extensions like Remote Development.
Read original articleThe Visual Studio Code Dev Containers extension enables developers to work within a container as a comprehensive development environment. By utilizing a devcontainer.json file in the project, Visual Studio Code can access or create a development container with a predefined tool and runtime stack. This container allows running applications or isolating tools, libraries, and runtimes necessary for working with a codebase. Workspace files are mounted or copied into the container, and extensions run inside it, providing full access to tools and the file system. This setup enables seamless switching of the development environment by connecting to a different container, ensuring a consistent development experience with features like IntelliSense, code navigation, and debugging. The extension supports using a container as a primary development environment or attaching to a running container for inspection. It adheres to the open Dev Containers Specification, allowing configuration of a consistent development environment across different tools. To get started, users need to have Docker installed locally or on a remote host, meeting specific system requirements outlined for different operating systems and container environments. Extensions like Remote Development can be installed for additional functionalities.
Related
Automatically setup pgAdmin with a Docker database
Developer experience is enhanced by configuring a PostgreSQL local environment with Docker Compose. Defining variables and leveraging folders streamlines setup. Integrating pgAdmin automates connections, improving efficiency and simplifying future deployments.
Copy-on-Write Performance and Debugging
The article discusses Copy-on-Write (CoW) linking in Dev Drive for Windows systems, enhancing performance during repo builds. CoW benefits C# projects, with upcoming Windows updates enabling CoW by default for faster builds.
Open Source 'Eclipse Theia IDE' Exits Beta to Challenge Visual Studio Code
The Eclipse Foundation's Theia IDE, a competitor to Visual Studio Code, exits beta after 7 years. It emphasizes open-source principles, customization, and privacy, appealing to developers for diverse use cases.
Developer experience: What is it and why should you care? (2023)
Developer experience (DevEx) optimizes software development by empowering behaviors naturally. It enhances productivity, satisfaction, and collaboration among developers, leading to improved business outcomes. Generative AI and continuous feedback play key roles in DevEx advancement.
Introducing the Theia IDE
The Theia IDE, launched in June 2024, is a versatile, open-source code development tool with VS Code extension compatibility, an extensive extension registry, and a focus on user privacy and community collaboration.
Dependencies, env vars, dev databases, ports, everything all written up in code and ready to use once you open the workspace. All without messing up your host pc. Works also via ssh.
I've been doing this for years, it seems to me like the absolutely hands-down easiest way to keep projects encapsulated and easily shareable with coworkers.
Set up the env in a docker container, mount a volume to a local fs where all the sources live, ssh into the container if necessary, interact with app(s) within the container over http.
What's MS adding here, what am I missing? They streamline the process and integrate scripts with VS?
Yesterday, though, I ran into an issue where Bun was occasionally not completing http requests. I thought it was a bug with Bun (it might be), but the issue went away when I ran it outside of a container.
Containers do add layers which sometimes cause issues, or at least make diagnosis trickier.
Now, for every project I start, I quickly create a Docker container with all dependencies the project needs, and then I develop inside the container using vscode. If I need to develop in another machine (laptop instead of my desktop for example), I just download the Docker image, and everything is already setup to start coding.
If you are doing a k8s deployment anyways then tilt is really quiet nice once properly setup.
The one thing that isn't so nice is local package caching. That's a hard problem to solve and containers makes it annoying to get right.
Docker compose also has a "watch" command that can do lots of the the things devcontainers does, and I use it for more simple setups.
DevContainers are good. I find them especially nice for working on k8s stuff. For those comparing them against Nix, it's likely that most developers are already familiar with Docker, while Nix's language and tools have a pretty steep learning curve.
(I'm also a biased person as I'm a Nix person at heart)
Does the container approach bring something more than using Nix?
My next goal was to use Docker for this, but since I don't know docker yet, I'm not sure if that would a good idea for having a ready prod env right after a commit.
- Re-opening the project in a dev container felt like overhead
- I sometimes stuggled with setting the work directory
- Restarting the development container for various reasons interrupts the development
Does the container approach bring something more than using Nix?
https://github.com/microsoft/vscode-docs/blob/3bafb9f610bd6b...
Hacker Olds, amirite.
Related
Automatically setup pgAdmin with a Docker database
Developer experience is enhanced by configuring a PostgreSQL local environment with Docker Compose. Defining variables and leveraging folders streamlines setup. Integrating pgAdmin automates connections, improving efficiency and simplifying future deployments.
Copy-on-Write Performance and Debugging
The article discusses Copy-on-Write (CoW) linking in Dev Drive for Windows systems, enhancing performance during repo builds. CoW benefits C# projects, with upcoming Windows updates enabling CoW by default for faster builds.
Open Source 'Eclipse Theia IDE' Exits Beta to Challenge Visual Studio Code
The Eclipse Foundation's Theia IDE, a competitor to Visual Studio Code, exits beta after 7 years. It emphasizes open-source principles, customization, and privacy, appealing to developers for diverse use cases.
Developer experience: What is it and why should you care? (2023)
Developer experience (DevEx) optimizes software development by empowering behaviors naturally. It enhances productivity, satisfaction, and collaboration among developers, leading to improved business outcomes. Generative AI and continuous feedback play key roles in DevEx advancement.
Introducing the Theia IDE
The Theia IDE, launched in June 2024, is a versatile, open-source code development tool with VS Code extension compatibility, an extensive extension registry, and a focus on user privacy and community collaboration.