| name | ords-docker-compose | |||||
|---|---|---|---|---|---|---|
| description | Docker Compose setup for running ORDS with Oracle AI Database Free locally. | |||||
| tags |
|
|||||
| blog_post | https://andersswanson.dev/2025/12/12/oracle-rest-data-services-ords-with-docker-compose/ |
Simple Docker Compose setup to run Oracle REST Data Services (ORDS) connected to an Oracle AI Database Free container!
ORDS enables a variety of HTTP APIs for the database, including the wire-compatible MongoDB API, APEX, SQL Worksheet, and more.
- ords: ORDS container for exposing REST APIs. The ORDS HTTP dashboard is available on
http://localhost:8888 - ordsdb: Oracle AI Database container. The database container externally accessible at
testuser/testpwd@localhost:1555/freepdb1
The setup includes pre-configured volumes for ORDS configuration and database initialization scripts.
- Docker-compatible container runtime and Docker Compose installed on your system.
docker-compose.yml: Main composition file defining services.oracle/: Database initialization scripts (e.g.,ords_init.sql).ords_config/: Placeholder ORDS configuration directory. You do not need to modify this directory, ORDS will populate its configuration data here on startup.
-
Clone the repo and navigate to this directory:
cd ords-docker-compose -
Start the services:
docker-compose up -d -
Stop the services:
docker-compose down
- ORDS HTTP Endpoint:
http://localhost:8888/. Usetestuser/testpwdas the login information for services like SQL Developer. - MongoDB API: Port 27017 (e.g., connect using MongoDB clients to
localhost:27017). - Oracle AI Database: Connect via SQL*Plus or tools like SQLcl to
localhost:1555/freepdb1with usernametestuserand passwordtestpwd.
- Features Enabled:
- REST-Enabled SQL and Database APIs
- SQL Developer web view
- Wire compatible MongoDB API
- Security: Uses HTTP for local demo mode. If you're using ORDS in production, ensure you use proper certificates.
- Add database initialization scripts to
oracle/(e.g., modifyords_init.sqlor add your own scripts). - Environment variables can be adjusted in
docker-compose.yml(e.g., change passwords or ports).
- The database uses the
gvenzl/oracle-free:23.26.1-slim-faststartimage. - ORDS uses
container-registry.oracle.com/database/ords:latest. - Volumes persist configuration; remove them with
docker-compose down -vif needed. - For more details on ORDS, visit the official documentation.
If you encounter issues, check container logs:
docker logs ords
docker logs ordsdb