Oracle recently published a new container image for running Oracle REST Data Service (ORDS). The new image externalises the ords binary pretty much in the same way you’d use ORDS locally except you don’t need to install its dependencies.
This sounds as cool as it is abstract, so let’s see how this works in action.
NB: the previous ORDS image has been renamed to ords-developer, and can be found on container-registry.oracle.com as well.
Getting the new image
If you like to save time you can start downloading the ORDS image from Oracle’s container registry while you read on.
docker pull container-registry.oracle.com/database/ords:25.2.3
Make sure to check the documentation, the version tag is almost certainly out of date (it was current at the time of writing).
Once the command has completed, you’re good to go. The only missing component is a database. This post uses Oracle Database 23ai Free, ORDS will be installed into the first Pluggable Database (PDB) named freepdb1. The database container is named oraclefree. It uses a network named blogpost-net; the network is required to allow ORDS to communicate with the database. The article assumes the database container and the database are up and running.
Installing & Configuring ORDS
Let’s install ORDS in the database using the non-interactive, silent installation. Compared to the previous releases, ORDS 25.x doesn’t require you to store the credentials, you provide them as environment variable. Neither do you need to know about the various options to apply-it’s all done under the covers. Which to me is a great enhancement and certainly a much improved experience. Installing ORDS (and APEX, if you wish) basically becomes a one-shot activity.
Please refer to the container image documentation for more details of the installation process if you are unsure about anything you read. Better be safe than sorry.
By the way, t he ORDS config is kept in a docker volume in my example, you can of course use an existing config directory (mapped into the container) as well, but that’s out of scope of this article.
docker volume create blogpost-ords-config-vol
The following docker command assumes the network has already been created, and the database container uses it. Let’s start the container, which triggers the ORDS installation. It would also trigger an APEX installation, but since I didn’t map the APEX installation files to /opt/oracle/apex inside the container, it won’t be installed this time:
docker run --rm --name some-ords \
-p 8888:8080 -p 27017:27017 -p 8443:8443 \
-v blogpost-ords-config-vol:/etc/ords/config \
--network blogpost-net \
-e DBHOST="some-oracle" \
-e DBPORT=1521 \
-e DBSERVICENAME=freepdb1 \
-e ORACLE_PWD=changeOnInstall \
container-registry.oracle.com/database/ords:25.2.3
If you need additional debug information, you can provide an extra environment variable to do so
docker run --rm --name some-ords \
-p 8888:8080 -p 27017:27017 -p 8443:8443 \
-v blogpost-ords-config-vol:/etc/ords/config \
--network blogpost-net \
-e DBHOST="some-oracle" \
-e DBPORT=1521 \
-e DBSERVICENAME=freepdb1 \
-e ORACLE_PWD=changeOnInstall \
-e DEBUG=TRUE \
container-registry.oracle.com/database/ords:25.2.3
The output is spooled to your screen, it should look similar to this:
$ docker run --rm --name some-ords \
-p 8888:8080 -p 27017:27017 -p 8443:8443 \
-v blogpost-ords-config-vol:/etc/ords/config \
--network blogpost-net \
-e DBHOST="some-oracle" \
-e DBPORT=1521 \
-e DBSERVICENAME=freepdb1 \
-e ORACLE_PWD=changeOnInstall \
container-registry.oracle.com/database/ords:25.2.3
Testing database connection...
INFO : Attempt 1: Connecting to sys/*****@some-oracle:1521/freepdb1 as sysdba...
INFO : Database connection successful.
INFO : The Oracle REST Data Services are not installed on your database.
INFO : Installing The Oracle REST Data Services 25.2.3.
INFO : The Oracle REST Data Services 25.2.3 has been installed correctly on your database.
INFO : Starting the Oracle REST Data Services instance.
2025-09-03T14:27:22Z INFO ORDS has not detected the option '--config' and this will be set up to the default directory.
ORDS: Release 25.2 Production on Wed Sep 03 14:27:23 2025
Copyright (c) 2010, 2025, Oracle.
Configuration:
/etc/ords/config
2025-09-03T14:27:23.751Z INFO HTTP and HTTP/2 cleartext listening on host: 0.0.0.0 port: 8080
2025-09-03T14:27:23.769Z INFO Disabling document root because the specified folder does not exist: /etc/ords/config/global/doc_root
2025-09-03T14:27:23.771Z INFO Default forwarding from / to contextRoot configured.
2025-09-03T14:27:23.854Z SEVERE ORAMLVERSION null
2025-09-03T14:27:23.859Z INFO Oracle API for MongoDB listening on port: 27017
2025-09-03T14:27:23.867Z INFO The Oracle API for MongoDB connection string is:
mongodb://[{user}:{password}@]localhost:27017/{user}?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true
2025-09-03T14:27:26.093Z INFO Configuration properties for: |default|lo|
db.connectionType=basic
db.hostname=some-oracle
db.port=1521
db.servicename=freepdb1
db.username=ORDS_PUBLIC_USER
feature.sdw=true
restEnabledSql.active=true
security.requestValidationFunction=ords_util.authorize_plsql_gateway
database.api.enabled=true
debug.printDebugToScreen=true
mongo.enabled=true
standalone.access.log=/tmp/ords_access_logs/
file.encoding=ANSI_X3.4-1968
file.separator=/
java.awt.headless=true
java.class.path=/opt/oracle/ords/ords.war
java.class.version=61.0
java.home=/opt/graalvm-ee-java17
java.io.tmpdir=/tmp
java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=17.0.15+9-LTS-jvmci-21.3-b110
java.specification.maintenance.version=1
java.specification.name=Java Platform API Specification
java.specification.vendor=Oracle Corporation
java.specification.version=17
java.vendor=Oracle Corporation
java.vendor.url=https://java.oracle.com/
java.vendor.url.bug=https://bugreport.java.com/bugreport/
java.vendor.version=GraalVM EE 21.3.14
java.version=17.0.15
java.version.date=2025-04-15
java.vm.compressedOopsMode=Zero based
java.vm.info=mixed mode, sharing
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Oracle Corporation
java.vm.specification.version=17
java.vm.vendor=Oracle Corporation
java.vm.version=17.0.15+9-LTS-jvmci-21.3-b110
jdk.debug=release
jdk.internal.vm.ci.enabled=true
line.separator=
native.encoding=ANSI_X3.4-1968
oracle.dbtools.cmdline.ShellCommand=ords
oracle.dbtools.cmdline.home=/opt/oracle/ords
oracle.dbtools.launcher.executable.jar.path=/opt/oracle/ords/ords.war
os.arch=aarch64
os.name=Linux
os.version=6.1.30-0-virt
path.separator=:
sun.arch.data.model=64
sun.boot.library.path=/opt/graalvm-ee-java17/lib
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.java.command=/opt/oracle/ords/ords.war --config /etc/ords/config serve
sun.java.launcher=SUN_STANDARD
sun.jnu.encoding=ANSI_X3.4-1968
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
user.country=US
user.dir=/etc/ords/config
user.home=/home/oracle
user.language=en
user.name=oracle
user.timezone=UTC
resource.templates.enabled=false
db.password=******
conf.use.wallet=true
2025-09-03T14:27:26.095Z WARNING *** jdbc.MaxLimit in configuration |default|lo| is using a value of 10, this setting may not be sized adequately for a production environment ***
2025-09-03T14:27:26.427Z INFO Created Pool: |default|lo|-2025-09-03T14-27-25.675643413Z at: 2025-09-03T14:27:25.675643413Z
2025-09-03T14:27:26.431Z INFO
Mapped local pools from /etc/ords/config/databases:
/ords/ => default => VALID
2025-09-03T14:27:26.516Z INFO Oracle REST Data Services initialized
Oracle REST Data Services version : 25.2.3.r2241517
Oracle REST Data Services server info: jetty/12.0.18
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM GraalVM EE 21.3.14 (build 17.0.15+9-LTS-jvmci-21.3-b110 mixed mode, sharing)
2025-09-03T14:27:26.566Z INFO CursorMonitor 1
2025-09-03T14:27:26.575Z INFO RequestMonitor 1
2025-09-03T14:27:26.575Z INFO TransactionMonitor 1
2025-09-03T14:27:26.576Z INFO AccessLogMonitor 1 0
2025-09-03T14:27:26.578Z INFO WatchdogMonitor 1
All done! The ORDS configuration has been successfully created and stored in the docker volume. You may want to consider the creation of TLS certificates for your ORDS installation, this is out of scope of this article. If you do, set the FORCE_SECURE environment variable to TRUE.
No need to enable the Mongo DB API
In contrast to previous releases it is no longer necessary to enable the MongoDB API, it is on by default. All you need to do is grab the Mongo DB API configuration string from the container’s logs:
2025-09-03T14:27:23.859Z INFO Oracle API for MongoDB listening on port: 27017
2025-09-03T14:27:23.867Z INFO The Oracle API for MongoDB connection string is:
mongodb://[{user}:{password}@]localhost:27017/{user}?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true
Summary
This post should have demonstrated how easy it is to use the ORDS container and access the MongoDB API.