Skip to main content

write_config_raw

Function write_config_raw 

Source
pub fn write_config_raw<ObjectID: FsVerityHashValue>(
    repo: &Arc<Repository<ObjectID>>,
    config_json: &[u8],
    refs: HashMap<Box<str>, ObjectID>,
    image: Option<&ObjectID>,
    image_v1: Option<&ObjectID>,
    boot_image: Option<&ObjectID>,
    boot_image_v1: Option<&ObjectID>,
) -> Result<ContentAndVerity<ObjectID>>
Expand description

Rewrites a container configuration in the repository from raw JSON bytes.

Like write_config, but takes pre-serialized JSON bytes instead of an ImageConfiguration. This must be used when rewriting an existing config (e.g. to add EROFS image refs) to preserve the original JSON bytes and avoid changing the sha256 content digest.