Skip to content

Commit

Permalink
Updated created by time for built image
Browse files Browse the repository at this point in the history
Should fix #312
  • Loading branch information
Priya Wadhwa committed Aug 29, 2018
1 parent 49f9298 commit 3dddb82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/executor/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"os"
"path/filepath"
"strconv"
"time"

"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 3dddb82

Please sign in to comment.