DEV Community

Cover image for Oracle APEX Stack on Docker
Reybis Ceballos
Reybis Ceballos

Posted on • Updated on • Originally published at reybis.com

Oracle APEX Stack on Docker

Oracle APEX Stack

  1. Oracle APEX
  2. Prerequisites
  3. The Setup
  4. Oracle APEX Stack Up!
  5. Oracle APEX Stack Down!
  6. Optional: Custom Setup
  7. Credits

Oracle APEX

Oracle APEX is the most popular low-code development platform that enables you to build enterprise apps 20x faster with 100x less code. APEX lets developers quickly develop and deploy enterprise-grade apps that are highly secure out of the box.

It is easy to start to develop APEX apps; however, install and configure an APEX environment from scratch can be overwhelming for beginners.

This post will give you the simplicity you are looking to deploy an entire Oracle APEX dev/test environment in your laptop or the cloud using Docker.

Another day I will make a post about Oracle APEX In-depth but now let focus on deployment.

Before anything else, let's see all the options we have to deploy Oracle APEX.

Deployments PROs CONs How to get started
apex free workspace Easy to use to start testing APEX and to make a concept of proof in APEX. - Not for commercial apps
- No direct access to the database
- Not all the features of a full APEX Development Environment
Request a service here
Oracle APEX VM Image Easy to have a full APEX Development in your laptop if you like VMs. - VMs can be overwhelming
- VM is pre-configured and not tuned for all APEX capabilities
Download the VM here
Oracle APEX On-Premises The best option to consider if you want a full APEX Development Environment with all the features in your laptop or Cloud. It's not that easy to set up than other options keep reading
Oracle Autonomous Database The best option for Cloud hosting for APEX. There are restrictions and Limitations for APEX with Autonomous Database, see the entire list here Start your Oracle Cloud journey right away here

Prerequisites

Before starting, you need the following:

  • Docker Engine

    You can install Docker Desktop on your laptop here

    If you are using Linux, you can install Docker Engine here

  • This guide requires docker-compose. If you don’t have it yet, take a look at the installation instructions and get it.

    If you’re installing docker-compose on CoreOS, it needs to go into /opt/bin instead of /usr/local/bin.

  • At least 20G of disk space and 4G of memory is recommended.

  • An internet connection.

The Setup

First of all, let download or clone the GitHub repository that accompanies this guide.

git clone https://github.com/reybis/oracle-apex-docker-stack.git

Due to licensing restrictions, I can’t host the software files in Github or elsewhere. As such, you’ll need to download them manually. Download the following files and store them in the respective software folder.

When you download the repo and all the software files, the directory structure needs to be like the following.

.
.gitignore
LICENSE.md
README.md
docker-compose.yml
preview.gif
ol7_ords
  ├── Dockerfile
  ├── README.md
  ├── scripts
  │   ├── healthcheck.sh
  │   ├── install_os_packages.sh
  │   ├── ords_software_installation.sh
  │   ├── server.xml
  │   └── start.sh
  └── software
      ├── apache-tomcat-9.0.37.tar.gz
      ├── apex_20.1.zip
      ├── OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10.tar.gz
      ├── ords-20.2.0.178.1804.zip
      ├── put_software_here.txt
      └── sqlcl-20.2.0.174.1557.zip
ol7_19
  ├── Dockerfile
  ├── README.md
  ├── scripts
  │   ├── healthcheck.sh
  │   └── start.sh
  └── software
      ├── apex_20.1.zip
      ├── LINUX.X64_193000_db_home.zip
      └── put_software_here.txt

Oracle APEX Stack Up!

With all the files in place, you can create the stack using the following command.

docker-compose up

If you want to be in detached mode use -d after the up command

The docker-compose command creates the following services:

  • [DB] - Oracle Enterprise Database with Oracle APEX installed
  • [ORDS] - ORDS/Tomcat
  • [PORTAINER] - Portainer to manage the stack

Some things to keep in mind:

  • The database is created the first time the service DB is started, and also APEX is installed, which means it can take some time to be fully operational.

    The DB service expose port 1521.

  • The ORDS service depends on the DB service.

The ORDS service expose port 8080 and 8443.

  • The PORTAINER service doesn't create the admin user, you will need to create it manually when access to localhost:9000

    The PORTAINER service expose port 9000.

  • A folder called volumes will be created to persist the database files and ORDS/Tomcat files.

After the docker-compose command succeeded, you can view the stack by accessing portainer at localhost:9000 or by issuing the following command:

docker-compose ps

That's it, now you have an entire Oracle APEX Environment in your machine, and you can access it at localhost:8080.

Oracle APEX Stack Down!

If you are done with your work and want to stop the stack, you can do it with the following command:

docker-compose down

Optional: Custom Setup

If you like to change some environment settings like volumes, passwords, service names for the database, or many others, you can easily change it in the docker-compose file.

Open the docker-compose.yml file and change the environment and volume sections on both services:

ORDS

...
environment:
  - DB_HOSTNAME=db
  - DB_PORT=1521
  - DB_SERVICE=pdb1
  - APEX_PUBLIC_USER_PASSWORD=ApexPassword1
  - APEX_TABLESPACE=APEX
  - TEMP_TABLESPACE=TEMP
  - APEX_LISTENER_PASSWORD=ApexPassword1
  - APEX_REST_PASSWORD=ApexPassword1
  - PUBLIC_PASSWORD=ApexPassword1
  - SYS_PASSWORD=SysPassword1
  - KEYSTORE_PASSWORD=KeystorePassword1
volumes:
  - ./volumes/ol7_19_ords_tomcat:/u01/config/instance1
...

DB

...
environment:
  - SYS_PASSWORD=SysPassword1
  - PDB_PASSWORD=PdbPassword1
  - APEX_EMAIL=me@example.com
  - APEX_PASSWORD=ApexPassword1
volumes:
  - ./volumes/ol7_19_ords_db:/u02
...

Credits

Bunch of ideas from Oracle-base docker files by Tim Hall.

Top comments (2)

Collapse
 
ali_ah profile image
Ali Ahmad

Hello @reybis Ceballos, I'm new to APEX and containerized applications and I'm trying to run Oracle APEX stack on docker and i've done alle steps exactly but i got errors when launching the stack.

I have different (newest) version of all of the software and I've updated the docker files ENV as written in put_software_here.txt

The problem is that apex_db and apex_ords containers does failure to start and when I try to start them manually I get Errors:

Container Error
apex_ords Error: (HTTP code 500) server error - unable to find user tomcat: no matching entries in passwd file

This is how containers look like on portainer in browser:

containers table

Could you give me tips checking some configurations and get the error fixed?

Collapse
 
ali_ah profile image
Ali Ahmad

Here is a list of the versions of the softwares which I've installed:

  • apache-tomcat-9.0.56.zip
  • apex_21.2.zip
  • OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz
  • ords-21.4.0.348.1956.zip
  • sqlcl-21.2.1.195.1252.zip
  • LINUX.X64_193000_db_home.zip