From 3dddb82bede8b5e4bac054ef74c9714c4b06f700 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Wed, 29 Aug 2018 16:56:42 -0700 Subject: [PATCH] Updated created by time for built image Should fix #312 --- pkg/executor/build.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/executor/build.go b/pkg/executor/build.go index cb04737bc6..22807d6a7a 100644 --- a/pkg/executor/build.go +++ b/pkg/executor/build.go @@ -24,6 +24,7 @@ import ( "os" "path/filepath" "strconv" + "time" "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1" @@ -150,6 +151,10 @@ func DoBuild(opts *options.KanikoOptions) (v1.Image, error) { return nil, err } if finalStage { + sourceImage, err = mutate.CreatedAt(sourceImage, v1.Time{Time: time.Now()}) + if err != nil { + return nil, err + } if opts.Reproducible { sourceImage, err = mutate.Canonical(sourceImage) if err != nil {