我想用 docker python sdk 替换下面的命令
docker exec 6d9c9b679541 /u01/app/oracle/product/12.0.0/dbhome_1/bin/sqlplus sachin/sachin@orcl @1.sql
这是我正在编写的代码和使用 python3 时遇到的错误
>>> import docker
>>> client = docker.from_env()
>>> client.exec_run('6d9c9b679541',command='/u01/app/oracle/product/12.0.0/dbhome_1/bin/sqlplus sachin/sachin@orcl @1.sql')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/docker/client.py", line 205, in __getattr__
raise AttributeError(' '.join(s))
AttributeError: 'DockerClient' object has no attribute 'exec_run'
如何解决这个问题?