我试图在Windows 10 Enterprise上作为管理员运行docker命令:
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 {} \;"
但是它抛出了另一个错误
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"
我怎样才能解决这个问题?当我在容器中插入这个命令时,Normaly -一切正常。
发布于 2017-06-29 13:13:34
改为使用sh:
docker-compose exec --user magento2 web sh -c 'find /var/www/sample-data -type d -exec chmod g+ws {} \;'https://stackoverflow.com/questions/44826054
复制相似问题