How To Copy Files And Folders Between Windows Containers And The Local Filesystem With Docker

You probably already know that data created within a container is gone once the container is gone. Volumes and bind mounts are great for attaching persisting data to your containers and sharing data between multiple containers. However, there may be times when you want to copy files or folders to a Windows container from your local filesystem without using volumes or bind mounts.

In this video, Matt will walk you through the docker cp command and how to use it to copy files and folders from the local filesystem to a Windows container and also how to copy files and folders from a container to the local filesystem.

Prerequisites include: Docker for Windows