A development container, from now on dev container, is a running Docker container with a well-defined tool/runtime stack and its prerequisites.
You can try out development containers with GitHub Codespaces or Visual Studio Code Remote - Containers
This is a template project that using a dev container, automatically configures a Python development environment with few easy steps.
Check out others dev container template projects
This template includes a
GitHub Action which ensures that any
changes made to the dev
branch still allow Docker to build the dev container
correctly. If so, then the main
branch is merged with the dev
oen.
You should never directly push on the
main
branch as Git best practices recommend
Feel free to dive into configuration files and modify them to suit your needs.
Follow these steps to open this sample in a Codespace:
-
Click the Code drop-down menu and select the Open with Codespaces option
-
Select + New codespace at the bottom on the pane
For more info, check out the GitHub documentation.
Follow these steps to open this sample in a container using the VS Code Remote - Containers extension:
-
If this is your first time using a dev container, please ensure your system meets the pre-reqs (i.e. have Docker installed)
-
Clone this repository to your local filesystem
-
Press F1 and select the Remote-Containers: Reopen in Container... command
For more info, check out the VS Code documentation.