I can see that it's possible to insert a file into a Docker container via insert
:
docker insert IMAGE URL PATH
Is there a way to fetch the contents of a file in a Docker container and save them somewhere on the host operating system? I'd like to extract the value of a configuration file and store it on my host operating system.
Best Answer
Depends on which version of the docker tool you're using:
The current version has an ordinary 'cp' command, according to cp doc v0.6.3:
For older version, you may consider to use 'export' as from export doc v0.5.3:
(There may also be other options, based on capabilities of your container.)