【问题标题】:How can I copy a file (.txt format) from my computer to docker container [duplicate]如何将文件(.txt 格式)从我的计算机复制到 docker 容器 [重复]
【发布时间】:2020-02-17 14:20:20
【问题描述】:

我正在尝试使用我在 powershell 中运行的以下命令将 .txt 文件从我的计算机复制到 docker 容器中:

docker cp SelectedWords.txt  27eab29f7d03:/selectwords/ 

命令运行了,但是当我检查docker时,文件没有出现。

有什么建议吗?

【问题讨论】:

  • docker cp SelectedWords.txt 27eab29f7d03:/selectwords/SelectedWords.txt 首先确保您拥有文件夹 selectwords

标签: powershell docker hdfs


【解决方案1】:

去掉尾部的斜杠

docker cp SelectedWords.txt 27eab29f7d03:/selectwords

您的文件应位于 /selectwords/SelectedWords.txt

【讨论】:

  • 感谢您的建议。现在一切都很好
  • @IoudomFoubiJephte 太好了。如果您觉得有用,请将答案标记为已接受。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-03-29
  • 2014-05-19
  • 1970-01-01
  • 2015-07-08
相关资源
最近更新 更多