Oracle: Using Docker Compose for Oracle 23ai (free)
Oracle 23ai is the latest Oracle database with Long Term Support (LTS). Oracle 21c was an Innovation Release, what means that it's primarily made for testing. And 19c was the LTS release before 23ai.
23ai means year 2023 + artificial intelligence. Unfortunately, we're waiting for 23ai since ages. It was released in 2024, but only for the Oracle Cloud and for Engineered Systems (Exadata and ODA). Bit until now, there's still no 23ai available for installation on premise.
Fortunately, Oracle released a 23ai FREE Edition, which could be seen as a successor of Oracle XE. It's a software bundle that can be installed by RPM package (for Enterprise Linux 8 and 9 on x86_64
as well as Enterprise Linux 8 on ARM64
) and zip files for installation on Windows x86_64
. And there are images vor VirtualBox and Docker/Podman (x86_64
as well as ARM64
).
Oracle 23ai FREE has limitations:
- 12 GB user data
- 2 GB RAM
- 2 CPU Threads
But you can use all the features that come with Oracle Enterprise Edition, and you can create unlimited Pluggable Databases.
Here's my docker-compose.yml
for Oracle 23ai FREE on Docker:
services:
oracle-free:
image: container-registry.oracle.com/database/free:latest-lite
hostname: oracle-free
ports:
- 1521:1521
environment:
- ORACLE_PWD=XxXxXx25##
I pull the image and start the container using
# docker compose pull
# docker compose up -d
Executing
# docker compose logs -f
shows the logs when the database is created and started:
oracle-free-1 | Expanding oracle data
oracle-free-1 | /home/oracle
oracle-free-1 | Starting Oracle Net Listener.
oracle-free-1 | Oracle Net Listener started.
oracle-free-1 | Starting Oracle Database instance FREE.
oracle-free-1 | Oracle Database instance FREE started.
oracle-free-1 | Pluggable Database FREEPDB1 opened.
oracle-free-1 |
oracle-free-1 |
oracle-free-1 | SQL*Plus: Release 23.0.0.0.0 - Production on Wed Jan 15 12:29:26 2025
oracle-free-1 | Version 23.6.0.24.10
oracle-free-1 |
oracle-free-1 | Copyright (c) 1982, 2024, Oracle. All rights reserved.
oracle-free-1 |
oracle-free-1 |
oracle-free-1 | Connected to:
oracle-free-1 | Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
oracle-free-1 | Version 23.6.0.24.10
oracle-free-1 |
oracle-free-1 | SQL>
oracle-free-1 | User altered.
oracle-free-1 |
oracle-free-1 | SQL>
oracle-free-1 | User altered.
oracle-free-1 |
oracle-free-1 | SQL>
oracle-free-1 | Session altered.
oracle-free-1 |
oracle-free-1 | SQL>
oracle-free-1 | User altered.
oracle-free-1 |
oracle-free-1 | SQL> Disconnected from Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
oracle-free-1 | Version 23.6.0.24.10
oracle-free-1 | #########################
oracle-free-1 | DATABASE IS READY TO USE!
oracle-free-1 | #########################
oracle-free-1 | The following output is now a tail of the alert.log:
oracle-free-1 | Pluggable database FREEPDB1 with pdb id - 3 is now marked as NEW.
oracle-free-1 | ****************************************************************
oracle-free-1 | 2025-01-15T12:29:21.745897+00:00
oracle-free-1 | FREEPDB1(3):Opening pdb with Resource Manager plan: DEFAULT_PLAN
oracle-free-1 | Completed: Pluggable database FREEPDB1 opened read write
oracle-free-1 | Completed: alter pluggable database all open
oracle-free-1 | alter pluggable database FREEPDB1 save state
oracle-free-1 | Completed: alter pluggable database FREEPDB1 save state
Now, the database can be used:
bash-4.4$ sqlplus / as sysdba
SQL*Plus: Release 23.0.0.0.0 - Production on Wed Jan 15 12:44:02 2025
Version 23.6.0.24.10
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.6.0.24.10
As all the environment variables are set by container creation, no additional settings are needed (like i. e. . oraenv
).
By default, one pluggable database (FREEPDB1) is created:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 FREEPDB1 READ WRITE NO
You can now go on with tests for Oracle 23ai without having access to Oracle OCI or Engineered Systems.