This project | |
Usage example | |
Base image | |
Template engine |
The assumption is that you are developing a Python project and managing the project-level Python dependencies with a modern standards-compliant packaging system like Hatch or Flit. Thus you should have a pyproject.toml
file in your project directory.
Install Cruft, change to your project root (the directory inside of which you want to create .devcontainer
) and run
cruft create https://github.com/maresb/cookiecutter-micromamba-devcontainer
(It's possible to replace cruft create
with cookiecutter
but then you won't be able to perform updates.)
Then fill in the following variables:
package_name
: The name of the main package of your project, as you wouldimport
it from Python.timezone
: The timezone to configure in the devcontainer.packages_dir
: The directory wherepackage_name
is located (oftensrc
), or.
for the project root.
To update to a newer revision, run
cd .devcontainer
cruft update
In case you get the error "Cruft cannot apply updates on an unclean git project", you can run git stash
to temporarily stash your tracked files, and then run git stash pop
to restore them after the update has finished. In case you have only untracked files, you can run cruft update --allow-untracked-files
.
Please refer to Micromamba Devcontainer.