Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop caching encrypted layers in docker destination #1314

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions copy/copy.go
Expand Up @@ -1620,6 +1620,7 @@ func (c *copier) copyBlobFromStream(ctx context.Context, srcStream io.Reader, sr
finalizer = fin
inputInfo.Digest = ""
inputInfo.Size = -1
inputInfo.CryptoOperation = types.Encrypt
encrypted = true
}
}
Expand Down
4 changes: 3 additions & 1 deletion docker/docker_image_dest.go
Expand Up @@ -205,7 +205,9 @@ func (d *dockerImageDestination) PutBlob(ctx context.Context, stream io.Reader,
}

logrus.Debugf("Upload of layer %s complete", computedDigest)
cache.RecordKnownLocation(d.ref.Transport(), bicTransportScope(d.ref), computedDigest, newBICLocationReference(d.ref))
if inputInfo.CryptoOperation != types.Encrypt {
cache.RecordKnownLocation(d.ref.Transport(), bicTransportScope(d.ref), computedDigest, newBICLocationReference(d.ref))
}
return types.BlobInfo{Digest: computedDigest, Size: sizeCounter.size}, nil
}

Expand Down