Introduction
Copying files with Docker can be confusing. Let’s check out some common docker cp
commands for copying files with Docker.
Start with docker ps
to obtain your relevant container IDs.
Container to Host
One specific file can be copied to the container like:
Host to Container
One specific file can be copied from the container like:
or
Container to Container
From a container to a container mixes (1) and (2):