зеркало из https://github.com/microsoft/docker.git
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:
Родитель
3f0886c8c3
Коммит
de9fba7172
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче