如何将文件从一个文件夹复制到Docker中容器中的另一个文件夹?

时间:2017-01-19 01:24:05

标签: docker docker-compose dockerfile

我已经找到了在主机和容器之间移动文件的方法,但是无法弄清楚如何使用YML在同一容器内移动文件。有人可以帮我这个吗?

1 个答案:

答案 0 :(得分:0)

您可以使用ssh命令。首先找到每个docker容器的IP,然后ssh到一个终端来传输文件。

man scp
The very basic usage:

scp remote_user@remote_host:/path/to/remote/file /path/to/local/file
and vice versa:

scp /path/to/local/file remote_user@remote_host:/path/to/remote/file
相关问题