Suppose I have the following directory structure
parent-dir
+ child-dir
+ grandchild-file-a
+ grandchild-file-b
uncle-dir
.
..
Now on unix - if I run the command
parent-dir> cp child-dir ../uncle-dir
Then I expect to get
uncle-dir
+ child-dir
+ grandchild-file-a
+ grandchild-file-b
But if I repeat this with docker cp
then I get
uncle-dir
+ grandchild-file-a
+ grandchild-file-b
Which might be reasonable on unix if I had done:
parent-dir> cp child-dir/* ../uncle-dir
My question is: What are the reasons Docker cp works differently to Unix cp?