A Python development container for Visual Studio Code.
The intention behind this project is to create a base development container that can be used in individual project repositories to setup an out-of-the-box development experience so that developers can get going quickly.
The easiest way to get started is to download the /templates/.devcontainer folder into your current project.
curl -L https://github.com/klein2ms/python-devcontainer/archive/master.tar.gz | tar -xz --strip=2 python-devcontainer-master/template/.devcontainer
The templates folder also contains a launch.json file which adds a nice F5 keyboard shortcut to run django. You can grab the whole .vscode folder using the following.
curl -L https://github.com/klein2ms/python-devcontainer/archive/master.tar.gz | tar -xz --strip=2 python-devcontainer-master/template/.vscode
In VSCode, open the Command Palette F1 and select Remote-Containers: Reopen in Container.
The base devcontainer image accepts build arguments that can be set when building a derived image to extend the base image with additional packages and configurations.
This prevents the need of having to author additional code in the Dockerfile for a derived image. But, obviously that can be done as well.
Add DEBIAN_DEPS with a list of space separated packages to the list of build arguments.
# .devcontainer/docker-compose.yml
app:
build:
args:
DEBIAN_DEPS: "nano tree"
Add NPM_DEPS with a list of space separated packages to the list of build arguments.
# .devcontainer/docker-compose.yml
app:
build:
args:
NPM_DEPS: "yarn gulp"
Add PIP_DEPS with a list of space separated packages to the list of build arguments.
# .devcontainer/docker-compose.yml
app:
build:
args:
PIP_DEPS: "pylint pylint-django"
This repository is under an MIT license unless otherwise indicated.
Content type
Image
Digest
Size
494.4 MB
Last updated
almost 6 years ago
docker pull klein2ms/python-devcontainer