Payload checksum now match the checksum simple
Backported for backward compatibility. Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
This commit is contained in:
parent
d2b2bf0393
commit
4f29181d9b
1 changed files with 3 additions and 1 deletions
|
@ -437,8 +437,10 @@ func (r *Registry) PushImageLayerRegistry(imgID string, layer io.Reader, registr
|
|||
|
||||
utils.Debugf("[registry] Calling PUT %s", registry+"images/"+imgID+"/layer")
|
||||
|
||||
h := sha256.New()
|
||||
tarsumLayer := &utils.TarSum{Reader: layer}
|
||||
h := sha256.New()
|
||||
h.Write(jsonRaw)
|
||||
h.Write([]byte{'\n'})
|
||||
checksumLayer := &utils.CheckSum{Reader: tarsumLayer, Hash: h}
|
||||
|
||||
req, err := r.reqFactory.NewRequest("PUT", registry+"images/"+imgID+"/layer", checksumLayer)
|
||||
|
|
Loading…
Reference in a new issue