在Entrypoint中执行sh命令

时间:2018-05-18 14:14:52

标签: linux bash docker

我从minio / mc创建了一个图像,我希望我的容器中的cat文件可以做这样的事情。

docker run -it --entrypoint='sh cat hello.txt' my/miniomc > hello.txt

如何写这个cat是一个sh命令来执行?

在我的情况下,我无法使用docker cp

感谢您的帮助

1 个答案:

答案 0 :(得分:-1)

entrypoint参数需要二进制文件。

试试这个:

docker run --rm -it --entrypoint=/bin/cat my/miniomc hello.txt > hello.txt
相关问题