oracle-apex-docker

Oracle APEX Docker

License: MIT

An all-in-one Docker image for Oracle APEX development. This container bundles Oracle Database XE 21c, Oracle REST Data Services (ORDS), and Oracle APEX into a single, easy-to-deploy image based on Oracle Linux.

📋 Table of Contents

✨ Features

🔧 Prerequisites

For Slim Builds Only

Download the following files and place them in the build/ directory:

  1. Oracle Database XE 21c: oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
  2. Oracle ORDS 25.3.1: ords-25.3.1.289.1312.zip
  3. Oracle APEX 24.2: apex_24.2.zip

🚀 Quick Start

  1. Clone the repository:
    git clone https://github.com/yourusername/oracle-apex-docker.git
    cd oracle-apex-docker
    
  2. Start the container:
    docker compose up -d
    
  3. Wait for initialization (first start takes 5-10 minutes):
    docker compose logs -f oracle-apex
    
  4. Access APEX at http://localhost:8080/ords

Using Docker Run

docker run -d \
  --name oracle-apex \
  -p 1521:1521 \
  -p 8080:8080 \
  -e ORACLE_PWD="Oracle123456" \
  -e APEX_ADMIN_EMAIL="admin@example.com" \
  -e ORDS_PWD="Oracle123456" \
  -v apex_data:/opt/oracle/oradata \
  codjix/oracle-apex:latest

📦 Image Types

Latest (Full Build)

The latest image downloads all Oracle software automatically during the Docker build process:

Slim Build

The slim image requires you to manually download Oracle software and place it in the build/ directory:

🔨 Building the Image

The project includes a convenient build script:

Build Latest Image

./build.sh latest

Build Slim Image

  1. Download required files to build/ directory (see Prerequisites)
  2. Build the image:
    ./build.sh slim
    

Build Script Options

./build.sh --help     # Show help
./build.sh --version  # Show version

Manual Build (Alternative)

# Latest
docker buildx build -t codjix/oracle-apex:latest -f ./Dockerfile .

# Slim
docker buildx build -t codjix/oracle-apex:slim -f ./slim.Dockerfile .

⚙️ Configuration

Configure the container using environment variables in compose.yaml or via -e flags with docker run.

Environment Variables

Variable Description Default Required
ORACLE_PWD SYS/SYSTEM database password Oracle123456 Yes
APEX_ADMIN_EMAIL APEX admin email address admin@example.com Yes
ORDS_PWD ORDS and APEX user passwords Oracle123456 Yes
ORACLE_SID Oracle System Identifier XE No
ORACLE_PDB Pluggable Database name XEPDB1 No

Ports

Port Service Description
1521 Oracle Database SQL*Net listener for database connections
8080 ORDS/APEX Web interface for APEX and REST APIs

Volumes

Path Description
/opt/oracle/oradata Database files (persistent storage)
/build Oracle software files (slim image only)

📖 Usage

Starting the Container

docker compose up -d

Stopping the Container

docker compose down

Viewing Logs

docker compose logs -f oracle-apex

Restarting the Container

docker compose restart oracle-apex

Accessing the Database via SQL*Plus

From inside the container:

docker compose exec oracle-apex sqlplus sys/Oracle123456@localhost:1521/XE as sysdba

From your host (requires Oracle Client):

sqlplus sys/Oracle123456@localhost:1521/XE as sysdba

Connecting to PDB

sqlplus sys/Oracle123456@localhost:1521/XEPDB1 as sysdba

🌐 Accessing APEX

Once the container is running, access Oracle APEX through your web browser:

First Login

  1. Navigate to http://localhost:8080/ords
  2. Click on “Administration Services” or go to /apex_admin
  3. Login with:
    • Workspace: INTERNAL
    • Username: ADMIN
    • Password: Value of ORACLE_PWD (default: Oracle123456)

🔐 Default Credentials

APEX Workspace INTERNAL

Oracle Database

APEX Schema Users

⚠️ Security Warning: Change default passwords in production environments!

💾 Data Persistence

Database files are stored in a Docker volume mounted at /opt/oracle/oradata. This ensures:

Reset Database

To start fresh (⚠️ deletes all data):

docker compose down -v
docker compose up -d

🔍 Troubleshooting

Container Exits Immediately

Check the logs:

docker compose logs oracle-apex

Common causes:

Slow First Start

The first container start takes 10-20 minutes as it:

  1. Installs Oracle Database XE
  2. Configures the database
  3. Installs Oracle APEX
  4. Configures ORDS
  5. Creates admin user

Subsequent starts are much faster (~30 seconds).

Slim Image: Missing Build Files

If using the slim image, ensure:

ls -lh build/
# Should show:
# apex.zip
# database.rpm
# ords.zip

And in compose.yaml, uncomment:

volumes:
  - ./build:/build

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author

Ibrahim Megahed

🙏 Acknowledgments

⚠️ Disclaimer

This Docker image is for development and testing purposes. Oracle Database XE comes with its own license terms. Please review Oracle’s licensing before use.

For production use, consider Oracle’s official container images or ensure compliance with Oracle’s licensing requirements.