How to install Oracle Database 23c Developer Edition on Docker

Drop into the command line and type the following command. It’ll take a couple of minutes to complete.

docker pull container-registry.oracle.com/database/free:latest

Now, with the image downloaded, we are ready to run Docker. You can do this by using the following command.

docker run -d --name ora23c -p 1521:1521 -e ORACLE_PWD=Password123 container-registry.oracle.com/database/free:latest

Please note, you can change any ports to avoid conflicts with your other docker images.

If you want to make it a little bit complicated you can use the following command.

docker run -d --name ora23c -p 1521:1521 -e ORACLE_PWD=Password123 -e ORACLE_CHARACTERSET=AL32UTF8 -v ${PWD}/oradata:/opt/oracle/oradata container-registry.oracle.com/database/free:latest

In the above command these are the parameters.

container name = ora23c
Port mapping = 1521:1521
env. variable = ORACLE_CHARACTERSET=AL32UTF8
volume = ${PWD}/opt/oracle/oradata:/opt/oracle/oradata
image= container-registry.oracle.com/database/free:latest

Now you can check docker log with following command

docker logs -f ora23c

 

Verify running docker container

docker ps

 

As you can see, status is still starting because installation is not complete yet.

checking log file again…

 

and finally “DATABASE IS READY TO USE!”

check container status again…

 

status up and healty now.

Test sqlplus connection with the following command

docker exec -it ora23c bash -c "sqlplus / as sysdba"

 

if you want to connect with any tool or java code your jdbc url is jdbc:oracle:thin:@<YOUR IP>:1521/FREE

You can find Oracle Container Registery link below to browse other database versions and products.

https://container-registry.oracle.com/

Ok, that’s it!

This entry was posted in Database and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *