I'm trying to copy some files from my docker container to my localhost, I read the documentation that the way to do this is
docker cp 'container':path/to/file dest/path
But this requires I know the path and directory within the container that I want to get to, how can I view the container's directory? I tried docker diff and docker inspect but these don't show me the container's file directory
You'll first need to know the name of the instance running?
Now, get inside the container and look for what you need. Assuming the container name is, some-image.
If you already know the folder:
EDIT:
as noted by @Konrad Botor it's possible to use also the container id instead of the container name and more importantly not all images have
bash
installed (alpine is the most popular image not using it).Here's an example with alpine: