microsoft/Docker-PowerShell

Copy-ContainerFile doesn't work for directory

friism opened this issue · 0 comments

Output of $PSVersionTable (from a powershell process):

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14931.1000
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14931.1000
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Output of ipmo Docker; (module Docker).Version.ToString() (from a powershell process):

ipmo Docker; (module Docker).Version.ToString()
0.1.0.100
(paste your output here)

Steps to reproduce the issue:
1.

docker create alpine ash
d2fc2b6997b25d3d4647bdc0435dd1459c37a203a7a9e01f2bd9d8d3192c302a
Copy-ContainerFile -Id d2fc2b6997b25d3d4647bdc0435dd1459c37a203a7a9e01f2bd9d8d3192c302a -Path /lib -Destination .\hestsmed

Copy-ContainerFile : Attempted to read past the end of the stream.
At line:1 char:1
+ Copy-ContainerFile -Id d2fc2b6997b25d3d4647bdc0435dd1459c37a203a7a9e0 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Copy-ContainerFile], EndOfStreamException
    + FullyQualifiedErrorId : Docker Client Exception,Docker.PowerShell.Cmdlets.CopyContainerFile

What actually happened?:

Error

What did you expect to happen?:

File copied