Skip to content

strobelt/oracle-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oracle 12c Docker Official Image with Custom Scripts

This project is a simple customization for the Oracle 12c official Docker image available here.

Basically setupDB.sh is a script taken from inside the oracle container and customized to call another bash script (runInitialScripts.sh) that runs every sql file present on the mounted volume folder.

It is important to note that the scripts will be applied sequentially in alphabetical order, so name them accordingly if execution order matters. E.g. 01-DatabaseConfig.sql, 02-InitialSchemas.sql, 03-Seed.sql, etc. Also it is important to note that every file that does not have the .sql extension will be ignored

Usage

  1. Add your custom sql scripts to the volume folder (it will be mounted when we execute the docker container)
  2. Login to the docker portal
  3. Acquire Oracle image from the store
  4. Install Docker for your OS Windows | Ubuntu | MacOS
  5. Run docker login to authenticate with your Docker account
  6. Run the cake task SetupAndWaitContainer:
    ./build.sh -t SetupAndWaitContainer
    or
    .\build.ps1 -t SetupAndWaitContainer
    

Connection

  • Hostname: localhost
  • Port: 1521
  • Service Name: ORCLCDB.localdomain
  • User: sys
  • Password: Oradoc_db1

Documentation