Merge pull request #7478 from AkihiroSuda/archive-whiteout-source-date-epoch
archive: add WithSourceDateEpoch() for whiteouts
This commit is contained in:
@@ -31,6 +31,7 @@ import (
|
||||
"github.com/containerd/containerd/diff"
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/containerd/pkg/epoch"
|
||||
"github.com/containerd/containerd/pkg/progress"
|
||||
"github.com/containerd/containerd/rootfs"
|
||||
"github.com/containerd/containerd/snapshots"
|
||||
@@ -142,6 +143,14 @@ var diffCommand = cli.Command{
|
||||
diff.WithLabels(labels),
|
||||
}
|
||||
|
||||
ep, err := epoch.SourceDateEpoch()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if ep != nil {
|
||||
opts = append(opts, diff.WithSourceDateEpoch(ep))
|
||||
}
|
||||
|
||||
if idB == "" {
|
||||
desc, err = rootfs.CreateDiff(ctx, idA, snapshotter, client.DiffService(), opts...)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user