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:
parent
375e970991
commit
d9329742d0
1 changed files with 3 additions and 1 deletions
|
@ -234,7 +234,9 @@ func (s *saveSession) saveImage(id image.ID) (map[layer.DiffID]distribution.Desc
|
||||||
var layers []string
|
var layers []string
|
||||||
var foreignSrcs map[layer.DiffID]distribution.Descriptor
|
var foreignSrcs map[layer.DiffID]distribution.Descriptor
|
||||||
for i := range img.RootFS.DiffIDs {
|
for i := range img.RootFS.DiffIDs {
|
||||||
v1Img := image.V1Image{}
|
v1Img := image.V1Image{
|
||||||
|
Created: img.Created,
|
||||||
|
}
|
||||||
if i == len(img.RootFS.DiffIDs)-1 {
|
if i == len(img.RootFS.DiffIDs)-1 {
|
||||||
v1Img = img.V1Image
|
v1Img = img.V1Image
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue