Docker python sdk question | oracle database connection

From: kunwar singh <krishsingh.111_at_gmail.com>
Date: Mon, 30 Mar 2020 10:07:52 -0400
Message-ID: <CAJSrDUqGaZ=rhqiA5KwLpfoJr_-SK933c5c1fOBzCU-uybmFDQ_at_mail.gmail.com>



Hi Listers,
I am trying to convert my call to oracle database in docker with python docker sdk

*Docker cli command *:docker exec 4b3e6b612345 /u01/app/oracle/product/12.0.0/dbhome_1/bin/sqlplus testuser/testpwd_at_orcl _at_run.sql

*Python code:*

>>> import docker
>>> client = docker.from_env()
>>>

client.exec_run('4b3e6b612345',command='/u01/app/oracle/product/12.0.0/dbhome_1/bin/sqlplus testuser/testpwd_at_orcl _at_run.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'

OEL 7.7 is the OS

Can you please suggest me if i am doing something wrong with the syntax. Still a newbie in python & docker , apologies in advance :)

-- 
Cheers,
Kunwar

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 30 2020 - 16:07:52 CEST

Original text of this message