Benutzer-Werkzeuge

Webseiten-Werkzeuge


knowledge_base:linux:docker:copy_files

Dies ist eine alte Version des Dokuments!


Docker Copy files

Good Examples

Official Documentation

The first example copies a file from the /tmp directory on the host machine into the Grafana install directory in the grafana container:

docker cp /tmp/config.ini grafana:/usr/share/grafana/conf/

To copy files from the grafana container to the /tmp directory on the host machine, we just switch the order of the parameters:

docker cp grafana:/usr/share/grafana/conf/defaults.ini /tmp

We can also copy an entire directory instead of single files. This example copies the entire conf directory from the grafana container to the /tmp directory on the host machine:

docker cp grafana:/usr/share/grafana/conf /tmp
/app/www/public/data/attic/knowledge_base/linux/docker/copy_files.1614719980.txt.gz · Zuletzt geändert: 2021/09/24 19:10 (Externe Bearbeitung)