2017-06-29 48 views
1

我试图在Windows上运行泊坞窗命令10作为企业管理:与发现-exec选项泊坞窗EXEC(发现:缺少参数`-exec')

docker-compose exec --user magento2 web find /var/www/sample-data -type d -exec chmod g+ws {} \; 

,但我得到了错误:

find: missing argument to `-exec' 

我试图用 '' 或 “逃跑”:

docker-compose exec --user magento2 web "find /var/www/sample-data -type d -exec chmod g+ws {} \;"

但它抛出anouther错误

rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "exec: \"find /var/www/sample-data -type d -exec chmod g+ws {} \\\\;\": sta t find /var/www/sample-data -type d -exec chmod g+ws {} \\;: no such file or directory"

我怎样才能解决这个问题?通常当我在容器中插入这个命令 - 一切正常。

回答

2

使用SH代替:

docker-compose exec --user magento2 web sh -c 'find /var/www/sample-data -type d -exec chmod g+ws {} \;'