To copy a file from inside a running container to a location on the host, use:
docker cp containerid:/path/to/file/in/container /location/on/host
See docs here.

Articles, notes and random thoughts on Software Development and Technology
To copy a file from inside a running container to a location on the host, use:
docker cp containerid:/path/to/file/in/container /location/on/host
See docs here.
I can never remember how to do this, so leaving this here:
select post_title, post_content from wp_posts order by post_date asc into outfile '/var/lib/mysql-files/yourfile.txt';
Also see:
To use ‘select … into outfile’ on MySQL the user needs to have the FILE permission as described here.
Even with this privilege however, if there server is running with the –secure-file-priv option you’ll see this error:
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option
When this option is enabled there’s usually one or more paths by default that are configured that you can import and export to. You can find these paths using:
mysql> SHOW VARIABLES LIKE "secure_file_priv"; +------------------+-----------------------+ | Variable_name | Value | +------------------+-----------------------+ | secure_file_priv | /var/lib/mysql-files/ | +------------------+-----------------------+ 1 row in set (0.02 sec)
Knowing where our trusted location is for importing/exporting, lets try again:
select examplecol from exampletable
order by createdate desc limit 1
into outfile '/var/lib/mysql-files/mysqlout.txt';
Success!
This is discussed in answer to this question here.
After a fresh install of Oracle Linux 7.4 and trying to run a ‘sudo yum update’ I get:
One of the configured repositories failed (Latest Unbreakable Enterprise Linux Server 7 Server (x86_64)
Following the recommendations following the error didn’t help, and this post suggested trying a ‘sudo yum clean’, but this didn’t fix it either.
Checking if I have network connectivity, it’s seems I can’t ping www.google.com or ping 8.8.8.8. I’ve come across this before with RHEL/CentOS installs and forgetting to enable the network interface options during install. Checking /etc/sysconfig/network-scripts/ifcfg-* the ONBOOT property was set to no. Changing it to yes and rebooting did the trick.