I'm thinking of using Docker to build my dependencies on a continuous integration (CI) server, so that I don't have to install all the runtimes and libraries on the agents themselves. To achieve this I would need to copy the build artifacts that are built inside the container back into the host.
Is that possible?
If you don't have a running container, just an image, and assuming you want to copy just a text file, you could do something like this:
Most of the answers do not indicate that the container must run before
docker cp
will work: