otiai10 / copy

Go copy directory recursively

Home Page:https://pkg.go.dev/github.com/otiai10/copy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to preserve special files

pmhahn opened this issue · comments

Similar to rsync --specials an option to handle special files as special is required: Currently the code tries to always copy the content of such files, e.g. /dev/console, pipes, sockets, … instead of copying it as a special files.
This is causing kaniko to stall when building base images: GoogleContainerTools/kaniko#960

Couldn't take time to think about the best arch on this.
For quick workaround, you can use Skip option.
Still open and I'm wiling to tackle this issue.

Couldn't take time to think about the best arch on this. For quick workaround, you can use Skip option.

Skip only solves half of the problem, namely that you do not fill up all space by copying the content.
But you still need to create the /dev/console special file using man:mknod(1).
And it does not scale to kaniko because there you do not have a static list of files, but just a user-supplied hierarchy of files.

Still open and I'm wiling to tackle this issue.

Thank you for this and your previous work.