Fix docker save with empty timestamp of layer created time

Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit e0b2c0af4d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Lei Jitang 2016-11-29 03:44:02 -05:00 committed by Victor Vieux
parent 375e970991
commit d9329742d0

View file

@ -234,7 +234,9 @@ func (s *saveSession) saveImage(id image.ID) (map[layer.DiffID]distribution.Desc
var layers []string
var foreignSrcs map[layer.DiffID]distribution.Descriptor
for i := range img.RootFS.DiffIDs {
v1Img := image.V1Image{}
v1Img := image.V1Image{
Created: img.Created,
}
if i == len(img.RootFS.DiffIDs)-1 {
v1Img = img.V1Image
}