Oracle Database in Docker Container

visit the below url
https://container-registry.oracle.com/ords/ocr/ba/database/free

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

Run the container using the image
docker run –name oracleexpressdev -p 1521:1521 -p 5500:5500 -e ORACLE_PWD=oracle@1234 -v D:\LocalDB\OracleExpress\Datafiles:/opt/oracle/oradata container-registry.oracle.com/database/free:latest
The following is the explanation of the parameters
docker run: This is the Docker command to create and start a new container.
–name oracleexpressdev: This sets the name of the container to oracleexpressdev.
p 1521:1521 -p 5500:5500: These parameters map ports on your host machine to ports in the container.
p 5500:5500 maps port 5500 on the host to port 5500 in the container. This port is used for Oracle Enterprise Manager.
e ORACLE_PWD=oracle1234: This sets an environment variable inside the container. ORACLE_PWD is the the Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)
v D:\LocalDB\OracleExpress\Datafiles:/opt/oracle/oradata: This mounts a volume from your host machine to the container.
/opt/oracle/oradata is the path inside the container.
This allows the Oracle database to persist data on your host machine.
container-registry.oracle.com/database/free:latest: This specifies the Docker image to use for the container.
In this case, it’s the latest version of the free Oracle database image from Oracle’s container registry.

after the command is run , i got an error , Password cannot be null .

This implies there is an issue with the password that we provided to run the container .In my case , i provided oracle@1234 . so the issue here was @ symbol seems it is not accepting the special character .

so i changed password
docker run –name oracleexpressdev -p 1521:1521 -p 5500:5500 -e ORACLE_PWD=oracle1234 -v D:\LocalDB\OracleExpress\Datafiles:/opt/oracle/oradata container-registry.oracle.com/database/free:latest

Now every thing was fine . If all fgoes well , it will do some back ground work
and finally gives


Leave a Reply