Some tasks might require copying files from a local machine into a container or from a container to the local machine. This article describes how to perform these operations.
Consider the option defined below depending on your needs:
docker cp <src-path> <container>:<dest-path>For example:
kubectl cp <src-path> <your-pod-name>:<dest-path>
docker cp "C:\ProcDump\procdump64.exe" sitecore-xm1_cm_1:"C:\"
kubectl cp "C:\ProcDump\procdump64.exe" k8s-xm-cm-pod:procdump64.exe
docker cp <container>:<src-path> <local-dest-path>For example:
kubectl cp <your-pod-name>:<src-path> <local-dest-path>
docker cp sitecore-xm1_cm_1:"C:\inetpub\wwwroot\App_Data\logs" "C:\" kubectl cp k8s-xm-cm-pod:some-file.txt "C:\"
Because files can be copied to/from the "C:\inetpub\wwwroot" folder, it might be necessary to move/copy files inside the container. It could be done using PowerShell session: KB013773.
To read more about cp commands, refer to the following links: