Commandes Linux : docker-machine scp


Commande : docker-machine scp
Usage: docker-machine scp [OPTIONS] [arg...]

Copy files between machines

   Arguments are [[user@]machine:][path] [[user@]machine:][path].

   --recursive, -r	Copy files recursively (required to copy directories)
   --delta, -d		Reduce amount of data sent over network by sending only the differences (uses rsync)
   --quiet, -q		Disables the progress meter as well as warning and diagnostic messages from ssh


Copier des fichiers entre machines Docker :

docker-machine scp machine:/path/to/machinerep/filename /path/to/hostrep
docker-machine scp machine:/path/to/machinerep/filename machine:/path/to/machinerep
docker-machine scp -r machine:/path/to/machinerep machine:/path/to/machinerep

ex :

$ cat foo.txt
cat: foo.txt: No such file or directory
$ docker-machine ssh dev pwd
$ docker-machine ssh dev 'echo A file created remotely! >foo.txt'
$ docker-machine scp dev:/home/docker/foo.txt .
foo.txt                                                           100%   28     0.0KB/s   00:00
$ cat foo.txt
A file created remotely!


Fermer le menu
%d blogueurs aiment cette page :