Skip to content

ggcr: mutate.Time should set AccessTime and ChangeTime #1523

@zx96

Description

@zx96

Describe the bug

Layers stored in the PAX format can contain file access times and creation times in addition to modification times. However, the layerTime function only sets ModTime.

I believe this to be the root cause of issue 2005 in Kaniko.

Expected behavior

Images mutated with mutate.Time should set all timestamps in the image, including AccessTime and ChangeTime:

// Time sets all timestamps in an image to the given timestamp.
func Time(img v1.Image, t time.Time) (v1.Image, error) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions