Description
As part of #128, we want to implement "repo"-mode for envbuilder as an alternative to the current "filesystem"-mode.
Filesystem-mode work like this:
- Check if repository is cloned
- If no, clone the repository to the filesystem
- If yes, skip clone
- Read devcontainer/Dockerfile from filesystem
In that last step, the devcontainer or Dockerfile may be old or locally modified. It depends on what the user has done.
Repo-mode differs from filesystem-mode in that it will always clone the repo (to a temporary location) and use the devcontainer/Dockerfile from there. This way the resulting container is always in-sync with the repo.
For now, we can keep this simple and always clone the repo. This feature should be implemented as a package that can be used by both envbuilder and a future envbuilder Terraform provider.
In the future, we can improve performance by only reading the relevant files from the repo.