Skip to main content

Dev Containers

A development container, or dev container, is a portable and consistent development environment encapsulated within a container. These containers provide an isolated environment for code development, ensuring that all team members work within the same setup, regardless of their local machine configurations.

##Why Use Dev Containers?

Consistency

Dev containers guarantee that every developer works in an identical environment, reducing the "it works on my machine" problem. This consistency extends to dependencies, tools, and runtime environments.

Isolation

Working in a dev container isolates the development environment from the local machine. This isolation helps prevent conflicts between different projects and makes it easier to manage dependencies.

Portability

Dev containers can be easily shared and replicated across different machines, making onboarding new team members or switching devices a seamless process.

Orbstack as a Requirement

We use Orbstack as our containerization tool of choice due to its lightweight nature and additional functionalities, such as assigning custom domain names to containers. Orbstack replaces Docker Desktop in our workflow, aligning with our need for efficient and feature-rich container management.

Code and Volumes

In our setup, even the code you work on is stored in a volume inside another Docker container. This means no code actually resides on your local machine, further enhancing the isolation and portability of your development environment.

What is a Volume?

A volume in Docker is a persistent data storage mechanism that exists independently of the lifecycle of a container. Volumes are used to store and share data between containers or between a container and the host system. In our context, using volumes ensures that your work remains consistent and safe, regardless of container status.

Conclusion

Using dev containers in our workflow enables a more reliable, efficient, and collaborative development process. By leveraging Orbstack and Docker volumes, we ensure a high degree of consistency and isolation in our development practices, making our team's work smoother and more streamlined.