How can I copy a file from one folder to another folder within a container in Docker?

假如想象 提交于 2019-12-12 02:07:31

问题


I already found ways for moving file between host and container but was not able to figure out on how to moves files within same container using YML. Can some one help me on this?


回答1:


You can use ssh command. First find IP of each docker container and then ssh into one terminal to transfer file.

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


来源:https://stackoverflow.com/questions/41732234/how-can-i-copy-a-file-from-one-folder-to-another-folder-within-a-container-in-do

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!