forked from TrueCloudLab/distribution
Merge pull request #7689 from vbatts/vbatts-tarsum_versioning
TarSum: versioning
This commit is contained in:
commit
a81b3ec0d7
1 changed files with 4 additions and 1 deletions
|
@ -407,7 +407,10 @@ func (r *Session) PushImageLayerRegistry(imgID string, layer io.Reader, registry
|
||||||
|
|
||||||
log.Debugf("[registry] Calling PUT %s", registry+"images/"+imgID+"/layer")
|
log.Debugf("[registry] Calling PUT %s", registry+"images/"+imgID+"/layer")
|
||||||
|
|
||||||
tarsumLayer := &tarsum.TarSum{Reader: layer}
|
tarsumLayer, err := tarsum.NewTarSum(layer, false, tarsum.Version0)
|
||||||
|
if err != nil {
|
||||||
|
return "", "", err
|
||||||
|
}
|
||||||
h := sha256.New()
|
h := sha256.New()
|
||||||
h.Write(jsonRaw)
|
h.Write(jsonRaw)
|
||||||
h.Write([]byte{'\n'})
|
h.Write([]byte{'\n'})
|
||||||
|
|
Loading…
Reference in a new issue