This dev container is designed to be used with the Remote - Containers extension for VS Code. This extension allows you to open any folder in a container, on a remote machine, or in WSL and take advantage of VS Code's full feature set.
- Docker
- VS Code
- Remote - Containers extension
- Docker extension
- Create a new repository using this template
- Clone the repository
- Open the repository in VS Code
- Click the green "Open a Remote Window" button in the bottom left corner of the window
- Select "Remote-Containers: Open Folder in Container..."
- Select the repository folder
- Wait for the container to build
- You're done! You can now use VS Code as normal
This service is named python-devcontainer
by default.
If you want to change the name of the service, you need to change the name in many files:
This container is named python-devcontainer
by default.
Name of the container is defined in the docker-compose.dev.yml file.
This devcontainer is named python-devcontainer
by default.
Name of the devcontainer is defined in the devcontainer.json file.
By default this devcontainer is not included in the production docker-compose file.
But it provide the extending one for development that can be used as standalone and override the production one for development purpose in dev container.
"dockerComposeFile": [
// "../../docker-compose.yml", // ! π Uncomment or change this to the path of your docker-compose file.
"./docker-compose.dev.yml" // π this is the development file.
],
If you want to include it, you need to add it to the docker-compose.yml file.
"dockerComposeFile": [
"../../docker-compose.yml", // π Here is done.
"./docker-compose.dev.yml"
],
If you want to add your own git template base, you need to add it to the devcontainer.json file.
"containerEnv": {
"GIT_TEMPLATE_REPO_URL": "https://github.com/tomblancdev/python-devcontainer.git", // ! π Change this to your template repository.
"GIT_TEMPLATE_REMOTE_NAME": "template" // ! π Change this to your template remote.
},
The template will be set at the first build of the devcontainer.
When container start, it will check if your current repository is up to date with the template repository.
Please refer to provided tools DOC for more information
Please refer to issues DOC for more information