Skip to content

Commit

Permalink
fix: sourceImage's CreatedAt timestamp should not be included in cach…
Browse files Browse the repository at this point in the history
…e key
  • Loading branch information
Martin Zihlmann committed Oct 10, 2024
1 parent e328007 commit 0c543bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/executor/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ func newStageBuilder(args *dockerfile.BuildArgs, opts *config.KanikoOptions, sta
l := snapshot.NewLayeredMap(hasher)
snapshotter := snapshot.NewSnapshotter(l, config.RootDir)

digest, err := sourceImage.Digest()
sourceImageNoTimestamps, err := mutate.CreatedAt(sourceImage, v1.Time{})
if err != nil {
return nil, err
}
digest, err := sourceImageNoTimestamps.Digest()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0c543bd

Please sign in to comment.