I was recently trying to create a docker container and connect it with my SQLDeveloper but I started facing some strange issues. I downloaded the docker image using below pull request:
docker pull store/oracle/database-enterprise:12.2.0.1-slim
then I started the container from my docker-desktop using port 1521. The container started with a warning.
terminal message:
docker run -d -it -p 1521:1521 --name oracle store/oracle/database-enterprise:12.2.0.1-slim
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
5ea14c118397ce7ef2880786ac1fac061e8c92f9b09070edffe365653dcc03af
Now when I try connect to db using below command :
docker exec -it 5ea14c118397 bash -c "source /home/oracle/.bashrc; sqlplus /nolog"
SQL> connect sys as sysdba;
Enter password:
ERROR:
ORA-12547: TNS:lost contact
it shows this message, PASSWORD I USE IS Oradoc_db1.
Now after seeing some suggestions I tried using the below command for connecting to sqlplus:
docker exec -it f888fa9d0247 bash -c "source /home/oracle/.bashrc; sqlplus / as sysdba"
SQL*Plus: Release 12.2.0.1.0 Production on Mon Sep 6 06:15:58 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
I also tried changing permissions of oracle file in $ORACLE_HOME as well for execution permissions as well but it didn't work.
Please help me out as I am stuck and don't know what to do.
sqlplus / as sysdba
. the message is probably because the host and container CPU architectures don't match and docker is using an emulation layer that might cause performance issues and other general issues--platform linux/amd64
as an option on yourdocker run
command?The database is ready for use . /usr/bin/tail: cannot open '/u01/app/oracle/diag/rdbms/orcl/ORCL/trace/alert_ORCL.log' for reading: No such file or directory /usr/bin/tail: no files remaining