# jackin-image (https://jackin.tailrocks.com/reference/crates/jackin-image/)



{/* GENERATED from crates/jackin-image/README.md — edit the README, not this file */}

Image generation and binary-artifact management for jackin❯. Builds the derived role image, acquires/caches the agent and capsule binaries, and decides the image-build vs reuse path.

## What this crate owns [#what-this-crate-owns]

* Derived-image Dockerfile generation (`derived_image`, `image_recipe`) and the build pipeline (`image_build`).
* Agent + capsule binary acquisition and caching (`agent_binary`, `capsule_binary`, `binary_artifact`).
* The image *decision* — build vs reuse vs published (`image_decision`, `version_check`) and image naming (`naming`).

## Architecture tier and allowed dependencies [#architecture-tier-and-allowed-dependencies]

**L1 application (image subsystem).** Allowed workspace dependencies: `jackin-core`, `jackin-manifest`, `jackin-docker`, `jackin-diagnostics`, `jackin-build-meta`. No presentation or runtime dependencies — image materialization is a domain/app concern consumed by `jackin-runtime`.

## Structure [#structure]

| Module                                                                                                                                                                                  | Owns                                | Tests                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------- |
| <RepoFile path="crates/jackin-image/src/lib.rs">`lib.rs`</RepoFile>                                                                                                                     | crate root, re-exports              | —                                                                                       |
| <RepoFile path="crates/jackin-image/src/derived_image.rs">`derived_image.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/derived_image.rs">`derived_image/`</RepoFile>         | derived-image Dockerfile generation | <RepoFile path="crates/jackin-image/src/derived_image/tests.rs">`tests.rs`</RepoFile>   |
| <RepoFile path="crates/jackin-image/src/image_recipe.rs">`image_recipe.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/image_recipe.rs">`image_recipe/`</RepoFile>             | Dockerfile recipe                   | <RepoFile path="crates/jackin-image/src/image_recipe/tests.rs">`tests.rs`</RepoFile>    |
| <RepoFile path="crates/jackin-image/src/image_build.rs">`image_build.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/image_build.rs">`image_build/`</RepoFile>                 | build pipeline                      | <RepoFile path="crates/jackin-image/src/image_build/tests.rs">`tests.rs`</RepoFile>     |
| <RepoFile path="crates/jackin-image/src/agent_binary.rs">`agent_binary.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/agent_binary.rs">`agent_binary/`</RepoFile>             | agent binary acquisition + cache    | <RepoFile path="crates/jackin-image/src/agent_binary/tests.rs">`tests.rs`</RepoFile>    |
| <RepoFile path="crates/jackin-image/src/capsule_binary.rs">`capsule_binary.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/capsule_binary.rs">`capsule_binary/`</RepoFile>     | capsule binary acquisition + cache  | <RepoFile path="crates/jackin-image/src/capsule_binary/tests.rs">`tests.rs`</RepoFile>  |
| <RepoFile path="crates/jackin-image/src/binary_artifact.rs">`binary_artifact.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/binary_artifact.rs">`binary_artifact/`</RepoFile> | shared artifact helpers             | <RepoFile path="crates/jackin-image/src/binary_artifact/tests.rs">`tests.rs`</RepoFile> |
| <RepoFile path="crates/jackin-image/src/image_decision.rs">`image_decision.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/image_decision.rs">`image_decision/`</RepoFile>     | build-vs-reuse decision             | <RepoFile path="crates/jackin-image/src/image_decision/tests.rs">`tests.rs`</RepoFile>  |
| <RepoFile path="crates/jackin-image/src/version_check.rs">`version_check.rs`</RepoFile> · <RepoFile path="crates/jackin-image/src/version_check.rs">`version_check/`</RepoFile>         | version check                       | <RepoFile path="crates/jackin-image/src/version_check/tests.rs">`tests.rs`</RepoFile>   |
| <RepoFile path="crates/jackin-image/src/naming.rs">`naming.rs`</RepoFile>                                                                                                               | image naming                        | —                                                                                       |

## Public API [#public-api]

The image-build decision and materialization entry points consumed by `jackin-runtime`. The `construct` Dockerfile (operator-built base) lives under `docker/construct/`; this crate generates *derived* images on top of it.

## How to verify [#how-to-verify]

```sh
cargo nextest run -p jackin-image
cargo clippy -p jackin-image --all-targets -- -D warnings
```
