Localhost Fun #1: Running Oracle Database 26ai + APEX with Docker
Oracle Database, APEX, and ORDS — fully local

This article starts a small series focused on building a fully local Oracle development stack using Docker. The goal is a clean, reproducible environment with:
Oracle Database 26ai (Free)
Oracle APEX
Oracle REST Data Services (ORDS)
Everything runs locally.
Prerequisites
Docker Desktop installed and running
At least 16 GB RAM recommended (32 GB preferred)
References:
Required Pre-Steps
Before pulling Oracle images, you must:
Create a free Oracle account
Accept the Oracle Container Registry licenses
Generate an auth token
Configure Docker to use that token
I strongly recommend this article: https://www.avonture.be/blog/docker-oracle-database-server/
Running Oracle Database with Docker
Log in to Oracle Container Registry
First, accept the license in your browser for the Oracle Database Free repository.
Then authenticate via Docker:
docker login container-registry.oracle.com
Use your Oracle account credentials. The username is case-sensitive.
Pull the Oracle Database 26ai image
docker pull container-registry.oracle.com/database/free:latest
Run Oracle Database 26ai
docker run -d \
--name oracle26 \
-p 1521:1521 \
-p 5500:5500 \
-e ORACLE_PWD=StrongPassword123 \
container-registry.oracle.com/database/free:latest
Wait until the database is ready
docker logs -f oracle26
At this point, you can already see the container running in Docker Desktop.

Why not test it now:

I personally use Ctrl + S to run statements—small shortcut, big gamechanger ;)

Initial Database Setup
Connect as SYS (inside the container)
docker exec -it oracle26 sqlplus / as sysdba
Note:
SQL Developer or application work should never useSYS. This is setup only.
Switch to the PDB and create an application user
ALTER SESSION SET CONTAINER=FREEPDB1;
CREATE USER app_user IDENTIFIED BY app_password;
GRANT CONNECT, RESOURCE TO app_user;
ALTER USER app_user QUOTA UNLIMITED ON USERS;
Exit SQL*Plus:
exit
Install Oracle APEX
This command opens an interactive shell inside the running Oracle container:
docker exec -it oracle26 bash
Download and unpack Oracle APEX
cd /tmp
curl -L -o apex.zip https://download.oracle.com/otn_software/apex/apex-latest.zip
unzip apex.zip
ls apex
Connect to the database as SYS (inside the container)
sqlplus / as sysdba
You should see the SQL> prompt.

Once you are at SQL>, run only the following to confirm the PDB:
SHOW CON_NAME;
Expected result:

Good. You are in CDB$ROOT. We must switch to FREEPDB1 and install APEX there.
Switch to FREEPDB1 and start the APEX install
At the SQL> prompt, run these commands exactly:
ALTER SESSION SET CONTAINER=FREEPDB1;
SHOW CON_NAME;
You must now see FREEPDB1:

Then run:
@/tmp/apex/apexins.sql SYSAUX SYSAUX TEMP /i/
If there are errors, probably, you are running this in wrong working directory, to fix this:
Cancel the script run and exit SQL*Plus
At the Enter value for cdb_root: prompt, do:
Press Ctrl+C (once)
Then at
SQL>run:
exit
Re-enter SQL*Plus from the APEX directory and re-run install
Back at the container shell (bash-4.4$), run:
cd /tmp/apex
sqlplus / as sysdba
At SQL> run:
ALTER SESSION SET CONTAINER=FREEPDB1;
@apexins.sql SYSAUX SYSAUX TEMP /i/
Installation should take few minutes

APEX is installed correctly in FREEPDB1.
What you are missing now (and this is expected) is ORDS, which is required to expose APEX in a browser.
We will proceed one step at a time.
Set the APEX admin password
You are still connected as SYS in FREEPDB1. Run:
@apxchpwd.sql
When prompted:
Enter a strong password for the APEX admin user
Confirm it
This password is only for the APEX web UI, not database users.
After it completes, exit SQL*Plus:
exit

Installing ORDS (Separate Container)
Downloading ORDS manually inside the database container requires Java 17+, which complicates things (in my case).

Instead, I run ORDS in its own container.
Therefore, I’ll create another container for this (not inside the oracle26 container terminal)
Note:
This setup uses SYS for simplicity in a local environment only.
Run ORDS
docker run -d \
--name ords \
-p 8080:8080 \
-e DB_HOST=host.docker.internal \
-e DB_PORT=1521 \
-e DB_SERVICE=FREEPDB1 \
-e DB_USER=SYS \
-e DB_PASSWORD=YOUR_SYS_PASSWORD \
container-registry.oracle.com/database/ords:latest
Verification
Check ORDS status
docker ps --filter name=ords
docker logs -n 80 ords
At this point, you can already see the container running in Docker Desktop.

You can visit the localhost:8080/ords/apex_admin, you should see the:


After creating a workspace, you can build and run your first Oracle APEX application:

That’s It (For Now)
You now have:
Oracle Database 26ai
APEX installed in a PDB
ORDS serving APEX via Docker
A fully local Oracle development stack
The next article in this series will focus on running Ollama locally with Docker to add a free, local LLM into the stack.


