Skip to content

Commit dc8d7dc

Browse files
oci: add workaround for containers/skopeo#2750
We're going to start referring to OCI images by their names starting with `sha256:` (as podman names them in the `--iidfile`) soon. Skopeo doesn't like that, so add a workaround. This will soon let us get rid of some of the hacking about we do in our `examples/` build scripts. Signed-off-by: Allison Karlitskaya <[email protected]>
1 parent 35c235a commit dc8d7dc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/composefs-oci/src/skopeo.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ impl<ObjectID: FsVerityHashValue> ImageOp<ObjectID> {
4848
None
4949
};
5050

51+
// See https://github.com/containers/skopeo/issues/2750
52+
let imgref = if let Some(hash) = imgref.strip_prefix("containers-storage:sha256:") {
53+
&format!("containers-storage:{hash}") // yay temporary lifetime extension!
54+
} else {
55+
imgref
56+
};
57+
5158
let config = match img_proxy_config {
5259
Some(mut conf) => {
5360
if conf.skopeo_cmd.is_none() {

0 commit comments

Comments
 (0)