Skip to content

Commit

Permalink
Only reset compression if its not valid
Browse files Browse the repository at this point in the history
If we reset the default compression method, force compression no longer works.

Signed-off-by: James Hewitt <[email protected]>
  • Loading branch information
Jamstah committed Nov 25, 2024
1 parent 17ff15c commit 8ceb2ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libimage/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ func (r *Runtime) Push(ctx context.Context, source, destination string, options
destRef = dockerRef
}

// docker-archive and only DockerV2Schema2MediaType support Gzip compression
if options.CompressionFormat != nil &&
// docker-archive and DockerV2Schema2MediaType support only Gzip compression
if options.CompressionFormat != nil && options.CompressionFormat.Name() != "gzip" &&
(destRef.Transport().Name() == dockerArchiveTransport.Transport.Name() ||
destRef.Transport().Name() == dockerDaemonTransport.Transport.Name() ||
options.ManifestMIMEType == manifest.DockerV2Schema2MediaType) {
Expand Down

0 comments on commit 8ceb2ec

Please sign in to comment.