I pulled a new Oracle-DB image using the following command: docker pull container-registry.oracle.com/database/enterprise:12.2.0.1
And then ran the 1st container successfully. I’m using the default database that has been created by the docker/oracle container and I can connect to it from the application that I’m running in localhost.
Now, I’m trying to run the 2nd container using same image I used above with the following command: docker run -itd --name Oracle-DB-2 -P store/oracle/database-enterprise:12.2.0.1
The container has been created and I executed the following command in order to run a few maintenance scripts from sqlplus: docker exec -it Oracle-DB-2 bash -c "source /home/oracle/.bashrc; sqlplus sys/Oradoc_db1@ORCLCDB as sysdba"
I’m getting the below error message upon executing the above command: sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
To diagnose the issue, I logged into the 1st container and checked where the file, libsqlplus.so exists and found it is in: ./u01/app/oracle/product/12.2.0/dbhome_1/lib/libsqlplus.so
However, above file is not found in the 2nd container. I’m new to docker and wondering if I’m running it correctly, particularly when it comes to running multiple containers using the same image. How can I fix the above issue? Appreciate any thoughts.
This is how my env looks like:
macOS Big Sure
Docker Desktop 4.1.0