Import Crates
The imports section in a manifest lets you create cascading manifests that include commands from other crates.
Example
Section titled “Example”This manifest imports commands from two other crates:
manifest: name: demo_import imports: - bulker/alpine:default - bulker/demo:default commands: - command: pi docker_image: nsheff/pi docker_command: piWhen you activate this crate, bulker merges commands from all imported crates (in priority order) with this manifest’s own commands.
Available base crates
Section titled “Available base crates”The bulker namespace in the default registry provides several crates designed for importing:
| Crate | Purpose |
|---|---|
bulker/alpine | Minimal host utilities for strict environments (id, ls, which, env, etc.). Recommended for strict mode. |
bulker/alpinebase | Extends alpine with basic shell utilities (grep, cat, sed, awk, bash, make). For strict environments that need light scripting. |
bulker/coreutils | Full GNU coreutils as containerized commands (cat, sort, cut, head, wc, tr, etc. — ~80 commands). For fully containerized strict environments. |
bulker/biobase | Large collection of bioinformatics tools (samtools, bedtools, bowtie2, STAR, picard, trim_galore, fastqc, etc.). Imports alpine and coreutils. |
bulker/demo | Cowsay and fortune — for testing and tutorials. |
bulker/pi | Prints digits of pi — for testing multi-crate activation. |
For strict mode, the container engine works automatically (via engine_path in config), but you’ll typically import bulker/alpine (for basic host utilities like ls and which) or bulker/coreutils (full shell environment). For bioinformatics pipelines, bulker/biobase gives you a wide base of tools to build on.
How imports work in bulker
Section titled “How imports work in bulker”Imports are resolved at runtime, not at install time. This means:
- Updating an imported crate propagates automatically to all manifests that import it.
- No rebuilding or reinstalling needed — just activate and go.
- You can define cascading manifests: one manifest imports another, which imports another.
Bulker detects circular imports and enforces a maximum import depth of 32 levels. If your import chain exceeds this limit, bulker reports an error with the chain that was followed.
Step by step
Section titled “Step by step”- Create a manifest with
imports:
manifest: name: my-tools imports: - bulker/coreutils commands: - command: samtools docker_image: quay.io/biocontainers/samtools:1.9--h91753b0_8- Activate:
bulker activate ./my-tools.yaml- Verify:
bulker crate inspect my-toolsThe imported commands appear alongside the manifest’s own commands.
Comparison with Dockerfiles
Section titled “Comparison with Dockerfiles”The import concept is similar to the FROM directive in a Dockerfile, but more flexible: you can import from multiple crates, and imports don’t duplicate underlying images — they only add shimlinks.