File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed
Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,9 @@ impl BuildDriver for BuildahDriver {
310310 "manifest" ,
311311 "push" ,
312312 "--all" ,
313+ if let Some ( compression_fmt) = opts. compression_type => format!(
314+ "--compression-format={compression_fmt}"
315+ ) ,
313316 image,
314317 format!( "docker://{}" , opts. final_image) ,
315318 ) ;
Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ pub struct ManifestCreateOpts<'scope> {
9898pub struct ManifestPushOpts < ' scope > {
9999 /// The final image to push.
100100 pub final_image : & ' scope Reference ,
101+
102+ /// Compression format to use when pushing images in manifest.
103+ pub compression_type : Option < CompressionType > ,
101104}
102105
103106/// Options for building, tagging, and pushing images.
Original file line number Diff line number Diff line change @@ -396,6 +396,9 @@ impl BuildDriver for PodmanDriver {
396396 "podman" ,
397397 "manifest" ,
398398 "push" ,
399+ if let Some ( compression_fmt) = opts. compression_type => format!(
400+ "--compression-format={compression_fmt}"
401+ ) ,
399402 image,
400403 format!( "docker://{}" , opts. final_image) ,
401404 ) ;
@@ -471,6 +474,9 @@ impl BuildChunkedOciDriver for PodmanDriver {
471474 for args,
472475 "push" ,
473476 if let Some ( authfile) = runner. authfile( ) => [ "--authfile" , authfile] ,
477+ if let Some ( compression_fmt) = opts. compression_type => format!(
478+ "--compression-format={compression_fmt}"
479+ ) ,
474480 image,
475481 format!( "docker://{}" , opts. final_image) ,
476482 ) ;
Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ pub trait BuildDriver: PrivateDriver {
237237 Self :: manifest_push (
238238 ManifestPushOpts :: builder ( )
239239 . final_image ( & tagged_image)
240+ . compression_type ( opts. compression )
240241 . build ( ) ,
241242 )
242243 } ) ?;
@@ -555,13 +556,15 @@ pub trait BuildChunkedOciDriver: BuildDriver + RunDriver {
555556 & runner,
556557 ManifestPushOpts :: builder ( )
557558 . final_image ( & tagged_image)
559+ . compression_type ( btp_opts. compression )
558560 . build ( ) ,
559561 )
560562 . and_then ( |( ) | {
561563 Self :: manifest_push_with_runner (
562564 & runner,
563565 ManifestPushOpts :: builder ( )
564566 . final_image ( & tagged_image)
567+ . compression_type ( btp_opts. compression )
565568 . build ( ) ,
566569 )
567570 } )
You can’t perform that action at this time.
0 commit comments