From 3baf626aa417c64a92a4af9e79209c4cbe130e31 Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Fri, 13 Mar 2020 23:21:25 -0700 Subject: [PATCH] add file info to files cp into container --- pkg/container/docker_run.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go index f3eb09e..d76920b 100644 --- a/pkg/container/docker_run.go +++ b/pkg/container/docker_run.go @@ -352,6 +352,8 @@ func (cr *containerReference) copyDir(dstPath string, srcPath string) common.Exe // update the name to correctly reflect the desired destination when untaring header.Name = strings.TrimPrefix(file, srcPrefix) + header.Mode = int64(fi.Mode()) + header.ModTime = fi.ModTime() // write the header if err := tw.WriteHeader(header); err != nil {