Copy files from container to host
docker cp <container_id>:/path/to/original/file/filename.ext /path/to/save/to/new_filename.ext
Example: docker cp ~/Downloads/views-7.x-3.14.tar.gz 13a562293114:/var/www/docroot/sites/all/modules/views-7.x-3.14.tar.gz
Copy files from host to container
docker cp /path/to/original/file/filename.ext <container_id>:/path/to/save/file/to/new_filename.ext
Note: You need to specify the actual file name for both the source and destination. Using something like "/path/to/destination/." will not work! Important
Alternative for copying files from host to container
cat /local/file/path | docker exec -i <running-container-id> sh -c 'cat > /inside/docker/file/path'
Note: Replace '/local/file/path' with the actual path to the file on your computer
Note: Replace '\<running-container-id\>' with the actual ID of the container you want to copy files to.
Note: Replace '/inside/docker/file/path' with the actual location you would like to save the file to inside your container.