• Create an account and make note of user pass (
    • This is where we are going to get the Oracle DB images
  • docker login
    • User/pass from from step#1
    • WARNING! Your password will be stored unencrypted in /root/.docker/config.json
  • docker pull
    • This might take 5-10 minutes
  • docker images
    • Make sure you see the database image
  • Run the commands below
    • Make an oracle folder under /home/YOUR_USER_NAME/
      • Make an oradata folder
      • Make a scripts folder
        • Make a startup folder
        • Make a setup folder
    • chmod 777 all folders created under /home/kali/
    • Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit (0-9). Oracle will reject your password if it does not meet the minimum criteria

NOTE: before running the command below, make sure to remove the oradata folder and recreate with chmod 777. If not you will have issues starting the image. To remove use rm -rf oradata

docker run -d --name mydb \
-p 1521:1521 -p 5500:5500 \
-v /home/kali/oracle/oradata:/opt/oracle/oradata \
-v /home/kali/oracle/scripts/startup:/opt/oracle/scripts/startup \
-v /home/kali/oracle/scripts/setup:/opt/oracle/scripts/setup \
  • docker logs mydb —follow
    • You can see if the database is being created without any issues
  • Connecting to database
    • docker exec -it mydb sqlplus / as sysdba
    • docker exec -it mydb sql / as sysdba    >> for sqlcl
  • Stopping/removing the database and any docker objects
    • docker stop $(docker ps -a -q)
    • docker rm $(docker ps -a -q)

To connect via port 1521, update sqlnet.ora file

  • docker exec -t ol7_19_con bash -ic ‘echo DISABLE_OOB=ON > $ORACLE_HOME/network/admin/sqlnet.ora’