Skip to content

Commit

Permalink
Merge pull request #328 from priyawadhwa/timestamp
Browse files Browse the repository at this point in the history
Updated created by time for built image
  • Loading branch information
priyawadhwa committed Aug 30, 2018
2 parents 49f9298 + 3dddb82 commit 7646817
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 7646817

Please sign in to comment.