Skip to main content

Command Palette

Search for a command to run...

Single Step Oracle 26ai DB + APEX Docker Container

Updated
3 min read
Single Step Oracle 26ai DB + APEX Docker Container
M

With around 20 years on the job, Matt is one of the most experienced software developers at Pretius. He likes meeting new people, traveling to conferences, and working on different projects.

He’s also a big sports fan (regularly watches Leeds United, Formula 1, and boxing), and not just as a spectator – he often starts his days on a mountain bike, to tune his mind.

What is this about?

I had previously put together a blog, which is guide to install APEX & ORDS on a 26aiFree 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 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...

🦔
Don't worry that the code has multiple "23c" references. We're going to give it a better name later
  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 http://localhost:8023/ords/apex

  3. Give the container a better name e.g 26aifree

    docker rename 23cfree 26aifree
    

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!