Develop with containers
What are development containers?
Containers are pieces of software that package code and all of the dependencies that code needs to run, including the runtime, tools, libraries, and settings. Development containers specifically let you code within this piece of software, providing a separate coding environment from your computer.
A Python dev container would include your Python app along with all the Python runtimes and dependencies already set up for you, no extra downloads necessary:
In your class, you could have a specific container for an assignment. Each student in your class will get the same exact same version of dependencies, such as the same version of Python or a C++ compiler, regardless of their operating system or any other files already installed on their computer.
In the diagram below, you'll see an example of three dev containers: one for Python, one for Java, and one for C++. Each of these dev containers would include the app and the dependencies that app needs to run. The dependencies are separate from the rest of your computer (which are represented by the Infrastructure and Host Operating System).
Get started with dev containers in VS Code
To get started with using dev containers in VS Code, you'll need to download the Remote - Containers extension from the Extension Marketplace.
You'll also need to download Docker, which is the industry standard for building and sharing containers.
Sample dev containers
Rather than creating dev containers from scratch, Remote - Containers has several ways to help you create dev containers or access existing dev containers.
Below is a list of sample dev containers we'd recommend starting out with:
- Try Out Development Containers: Python
- Try Out Development Containers: Java
- Try Out Development Containers: C++
- Try Out Development Containers: Node.js
- Try Out Development Containers: .NET
- Try Out Development Containers: Go
- Try Out Development Containers: PHP
- Try Out Development Containers: Rust
To learn how to get started with the Remote - Containers extension, check out this 5-minute introductory video:
You can also read more in our Development Containers in Education blog post.
We also highly recommend checking out the step-by-step Containers tutorial.