Montag, 17. Mai 2021

Running APEX 21.1 in Docker

Last week I posted a screenshot of the new Oracle APEX 21.1 running in my docker environment on Ubuntu Linux and I was asked to give a futher view of installing the new version. Here it comes right now 😀

To make things easier I searched the internet for a template of a docker project and I found the git repository from fuzzlebrain fuzziebrain/docker-apex-stack: Utility scripts for creating an Oracle Application Express stack as a Docker container. (github.com).

In general the process clones the official Oracle docker images and installs the needed software that is configured in a configuration file.

Step 1 is cloning the git repository to my local file system:


Prerequisites of software packages:
    Install the following things in your host:

  •   Git
  •   Curl
  •   Docker (of course)

Step 2 is getting the required the installer files and placing them in the subfolder <files>

  • Oracle Database 18c XE or any of the required installation files from OTN (supports versions up to 19.3 as of April 25, 2019)
  • Oracle Application Express (supports versions up 21.1 as of May 12, 2021)
  • Oracle REST Data Services (supports versions up to 20.4.3 as of May 12, 2021) or ords-21.1.1.116.2032.zip
  • Java Development Kit SE 8 (IMPORTANT: Please download the tarball, e.g. jdk-8u291-linux-x64.tar.gz.)

You can even try to build your docker images with different versions of ORDS or APEX. 
After executing the first step for several times I changed the first script 01-build.sh a little bit and removed the line where the official docker images are pulled. Why ? Because they are placed in the folder dockerfiles after the first run and pulled every time the process is started.


The second "issue" I modified is in the used 18c XE database Dockerfile as the install file is downloaded every time docker creation runs, But it should use the rpm file from the files folder.

old: INSTALL_FILE_1="https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm" \

new: INSTALL_FILE_1="oracle-database-xe-18c-1.0-1.x86_64.rpm" \


Step 3 is to configure my settings for the creation process in the file mysettings.env.
Make a copy of settings.env.sample, e.g. mysettings.env, and modify as desired. 

mysettings.env  should contain the following variables:


 You can change many parameters in there e.g. the oracle SID, the versions, the ports and the passwords for Oracle, APEX and ORDS. When you are done the DB creation process can be started.

Step 4 is to run the first script to grab the latest Docker images from Oracle and build the Oracle Database image. The script takes one parameter, the environment filename (mysettings.env).


Step 5 is to run the final script to create and run the container, where the container name is of your choice e.g. das.


When the script is ready or when I start my previous container again I can login to the APEX internal workspace http://localhost:50080/ 

the initital password for the ADMIN user can be retrieved from mysettings.env





After login ypu are able to create other workspaces in APEX or applications if you like.

That is pretty easy to use and play with APEX in Docker.

Cheers
Holger

Keine Kommentare:

Kommentar veröffentlichen