Context:
I'm developing a python module that needs to know his own version. I'm using versioningit in my build-system pyproject.toml configuration for setting the module version at install/build time from the project git information:
...
[build-system]
requires = ["hatchling==1.27.0", "versioningit==3.1.2"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "versioningit"
default-version = "0.0.0+unknown"
...
I checked that the base image used does not contain git so my package is installed in this line https://github.com/dagger/dagger/blob/main/sdk/python/runtime/main.go#L416 with a default version.
I tried to use my own local image with git by configuring this in the pyproject.toml, but I suspect that the container of the dagger engine doesn't have access to my local images:
...
[tool.dagger]
base-image = "dummy/python:3.12-slim-git"
...
It is trying to search it in: docker.io/dummy/python:3.12-slim-git
I also tried using a local container registry this way:
...
[tool.dagger]
base-image = "localhost:5000/dummy/python:3.12-slim-git"
...
But it returns connection refused.
I need to be able to have git installed only for the developing environment.
Questions:
What do you think is the best approach in this case?
How can I provide a local image as the base image for the python dagger SDK module?