首页 > 代码库 > docker-py execute echo无效

docker-py execute echo无效

错误写法:
cli.execute(‘9b2606a50304‘,‘echo "bibo">/tmp/1.txt‘)
 
争取写法:
cli.execute(‘9b2606a50304‘,‘bash -c "echo \‘yuanyuan\‘ > /tmp/2.txt"‘)
 
参考:https://bugzilla.redhat.com/show_bug.cgi?id=1146821

技术分享

docker-py execute echo无效