create.create()
Generate a Dockerfile and .dockerignore from an analysis directory.
Usage
create.create(
project=Path("."), FROM=None, exclude=None, verbose=False, **kwargs
)Scans project for Python dependencies using pigar, writes them to a requirements.txt files, and generates a Dockerfile that copies the analysis directory into the image and installs those dependencies with uv. Since tugboat uses uv under the hood, it should be immediately compatible with any project that is already set up to use uv.
Parameters
project: str = current working directory-
Path to the analysis directory to generate a Dockerfile from.
FROM: str or None = None-
Base Docker image to use in the generated Dockerfile’s
FROMinstruction. If None, defaults topython:{version}-slimusing the running Python’s version. exclude: list of str, str, or None = None-
File(s) or sub-directorie(s) to exclude from the Docker image via the generated
.dockerignore. verbose: bool = False-
Whether to print the generated Dockerfile contents.
**kwargs: Any-
Additional keyword arguments forwarded to pigar’s dependency-scanning
generatefunction (e.g.dry_run,index_url).
Returns
None