Just-in-Time Files
Just-in-time files are produced by calling a Dagger Function that returns the File
type.
Just-in-time files might be produced by a Dagger Function that:
- Builds language-specific binaries
- Combines multiple input files into a single output file, such as a composite video or a compressed archive
Here is an example of a linter Dagger Function that returns the linting rules used by it as a file:
dagger call -m github.com/dagger/dagger/dev/ruff@a29dadbb5d9968784847a15fccc5629daf2985ae lint --source https://github.com/dagger/dagger report
Once the command completes, you should see something like this output:
_type: File
name: ruff-report.json
size: 1476
This means that the function succeeded, and a File
type representing the linting report file was returned.
Here is another example of a file builder Dagger Function that returns a ZIP archive of the cmd/dagger
directory in the Dagger GitHub repository:
dagger -m github.com/sagikazarmark/daggerverse/arc@40057665476af62e617cc8def9ef5a87735264a9 call archive-directory --name=dagger-cli '--directory=https://github.com/dagger/dagger#main:cmd/dagger' create --format=zip