Skip to content

Timestamp of /etc cannot be changed #3148

@AkihiroSuda

Description

@AkihiroSuda
$ cat Dockerfile 
FROM debian:bullseye-20220912@sha256:3e82b1af33607aebaeb3641b75d6e80fd28d36e17993ef13708e9493e30e8ff9
RUN touch --date=@0 /bin /etc

$ sudo buildctl build --frontend dockerfile.v0 --output type=tar,dest=a.tar --local dockerfile=. --local context=.

$ tar tvf a.tar
drwxr-xr-x 0/0               0 1970-01-01 09:00 bin/
...
drwxr-xr-x 0/0               0 2022-10-04 21:48 etc/
...

bin has the expected timestamp, etc does not.

  • BuildKit: master 092e977
  • runc v1.1.4
  • Ubuntu 22.04 (kernel 5.15)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions