From ed72c5a0b823288158b514e0a197b0433d5a3618 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Tue, 6 Oct 2020 14:37:55 +0100 Subject: [PATCH] main: set CopyUIDGID: true for copy to container (#428) This ensures that uploaded files "inherit" the owner that is the USER listed in the image definition. --- docker/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker.go b/docker/docker.go index fc8d80c..4051c35 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -229,7 +229,7 @@ func (d *docker) CopyToContainer(containerName, destination, fileName string, co if err := t.Close(); err != nil { return err } - return d.c.CopyToContainer(context.Background(), containerName, destination, &buf, types.CopyToContainerOptions{AllowOverwriteDirWithFile: true}) + return d.c.CopyToContainer(context.Background(), containerName, destination, &buf, types.CopyToContainerOptions{AllowOverwriteDirWithFile: true, CopyUIDGID: true}) } func (d *docker) CopyFromContainer(containerName, filePath string) (io.Reader, error) {