Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connect autonomous database with fn through python

3497231Sep 11 2019

Hi Everyone,

Can anyone ,please suggest me in the below .

I wanted to run my python code through oracle serverless computing( through fn function)

Therefore I am facing challenge in connecting to adwc database with fn.

In order to connect I need a init image file in python or Dockerfile in python.

Can anyone suggest me, how to connect to autonomous database using fn .

I tried connecting using instant client . How ever it didn't worked.

Here is the dockerfile

FROM oraclelinux:7-slim

ARG release=18

ARG update=5

RUN  yum -y install oracle-release-el7 && yum-config-manager --enable ol7_oracle_instantclient && \

     yum -y install oracle-instantclient${release}.${update}-basic oracle-instantclient${release}.${update}-devel oracle-instantclient${release}.${update}-sqlplus && \

     rm -rf /var/cache/yum && \

     echo /usr/lib/oracle/${release}.${update}/client64/lib > /etc/ld.so.conf.d/oracle-instantclient${release}.${update}.conf && \

     ldconfig

Please suggest.

ENV PATH=$PATH:/usr/lib/oracle/${release}.${update}/client64/bin

CMD ["sqlplus", "-v"]

Comments
Post Details
Added on Sep 11 2019
0 comments
301 views