Skip to main content

Wiki Development Environment

Here are some experiences that I have gotten to prepare a best-practice development environment for projects. I would like to update to keep up with the latest tech stacks.

VS Code

As of now, the VS Code is the most popular IDE among developers. Absolutely, for me, it's my first choice and favorite developing tool.

Dev Container

Developing inside a Container using Visual Studio Code Remote Development

What is Dev Container?

A "Dev Container" typically refers to a development environment that is containerized. Containers are lightweight, portable, and consistent environments that encapsulate an application and its dependencies. They provide a standardized way to package and run software across different environments, ensuring that the application behaves consistently regardless of where it is deployed.

The benefits of using Dev Containers include:

  1. Consistency: Developers work in the same environment, reducing the chances of environment-related issues.
  2. Isolation: Dev Containers are isolated from the host system, preventing conflicts with other software installed on the developer's machine.
  3. Reproducibility: The development environment can be easily recreated by anyone using the container specifications.
  4. Portability: Dev Containers can be easily shared, allowing developers to work on the same project with minimal setup.

Best ways to customize the environment in Dev containers?

How to Write Dockerfile for Dev containers?

You can refer to this repo GitHub - devcontainers/images: Repository for pre-built dev container images published under mcr.microsoft.com/devcontainers

What magics does the Dev Containers extension do when starting?

  1. Hook a default startup command while sleep 1000; do :; done to keep the container not exit. Disable this behavior by setting overrideCommand: false.

How to run a container inside of Dev containers?

For instance, I use the Docker-in-Docker method to always test/run Docker containers inside of Dev containers.

C/C++

Resources