Answering an old question for references. To copy a file from an image, create a temporary container, copy the file from it and then delete it:
id=$(docker create image-name)
docker cp $id:path -> local-tar-file
docker rm -v $id
Программирование Highload PHP, Laravel, Backend, MySQL, Docker
Answering an old question for references. To copy a file from an image, create a temporary container, copy the file from it and then delete it:
id=$(docker create image-name)
docker cp $id:path -> local-tar-file
docker rm -v $id