Single Step Oracle 23c DB + APEX Docker Container

Single Step Oracle 23c DB + APEX Docker Container

What is this about?

I had previously put together a blog, which is guide to install APEX & ORDS on a 23cFree Database container .

That blog includes several steps which are prone to manual error. It is also time-consuming copying and pasting the required code.

This blog is performing all the same steps in just one single step. Just copy and paste the code below and come back after after lunch, and you'll have a ready to rock APEX environment.

Prerequisites

Podman, Docker or Docker-ce for Windows, Unix or Mac (Mac users read this first).

If you are running this on an OCI compute instance, you'll need to open ports 8521, 8500, 8023, 9043 & 9922. Otherwise ignore this step.

Before you start

The 23c Docker image can be slow to start up on some OS's and get the PDBs operational. This means a delay in successfully installing APEX. Hence this step (from the original guide)

I have never encountered no such issue on an Oracle Cloud Compute box. In this single step, the script doesn't make itself a coffee. This would be a future improvement to the script.

The Single Step

Here it is...

  1. Paste the below wad of code in to your Terminal/Command Prompt. The command should work in Windows, Unix & Mac (Mac users read this first).

    For clarity, I'm running this on Unix on an Oracle Cloud Compute with a free 50gb Block Volume.

     docker create -it --name 23cfree -p 8521:1521 -p 8500:5500 -p 8023:8080 -p 9043:8443 -p 9922:22 -e ORACLE_PWD=E container-registry.oracle.com/database/free:latest
     curl -o unattended_apex_install_23c.sh https://raw.githubusercontent.com/Pretius/pretius-23cfree-unattended-apex-installer/main/src/unattended_apex_install_23c.sh
     curl -o 00_start_apex_ords_installer.sh https://raw.githubusercontent.com/Pretius/pretius-23cfree-unattended-apex-installer/main/src/00_start_apex_ords_installer.sh
     docker cp unattended_apex_install_23c.sh 23cfree:/home/oracle
     docker cp 00_start_apex_ords_installer.sh 23cfree:/opt/oracle/scripts/startup
     docker start 23cfree
    

    If on Unix, also run this to keep your container running after closing your connection:

     loginctl enable-linger $UID
    

The Wait

  1. Wait about 20mins (Add an additional 15mins if you haven't previously fetched the docker image. It'll download it automatically if you haven't previously downloaded it).

    You can monitor the installation process like this (perhaps wait 1min before running this command).

     docker exec -it 23cfree /bin/bash
     tail -f /home/oracle/unattended_apex_install_23c.log
    

    My run took 16m 40s (I had previously fetched the docker image), and finally it will show a ### APEX INSTALLED ### message

     Elapsed time: 0h 16m 40s
     ### APEX INSTALLED ###
    

    Use Ctrl+C to exit out of the log monitoring

  2. Check it out at localhost:8023/ords/apex

If you ever restart the docker, APEX will back up and running in about 60 seconds. i.e It will not rerun the unattended install.

Credentials

APEX Internal Workspace

  • User: ADMIN

  • Password: OrclAPEX1999!

Everything else, e.g. ORDS_PUBLIC_USER, APEX_PUBLIC_USER, SYS, etc

  • Password: E

What Next?

  1. Build some APEX Applications

  2. Add a Custom Domain

  3. Update it when there is a new release of APEX, APEX Patch or ORDS

Open Source

The configuration script is open source, feel free to fork it.
Repository: https://github.com/Pretius/pretius-23cfree-unattended-apex-installer

Enjoy

What's the picture? It's a view of the runway and of a Wizzair plane at Leeds Bradford Airport, gateway to Yorkshire!