APEX Not Working Offline in Oracle Autonomous Database Free on Docker
I think the Oracle documentation is definitely wrong about this part:
The Autonomous Database Free Container Image provides an alternative to run Autonomous Database in a container in your own environment, without requiring access to Oracle Cloud Infrastructure Console or to the internet.
seeing that the image requires access to https://static.oracle.com/cdn/apex/24.1.4/
I installed Oracle Autonomous Database Free Container Image following the instructions in this link:
🔗 https://github.com/oracle/adb-free
I set it up on Docker, and my APEX application works fine when I am connected to the internet. I can access it at:
👉 https://localhost:8443/ords
However, when I disconnect from the internet, I get the following error:
There is a problem with your environment because the Oracle APEX files have not been loaded. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide. In addition, please verify that your image prefix path is correct. Your current path is https://static.oracle.com/cdn/apex/24.1.4/ (it should contain both starting and ending forward slashes, such as the default /i/). Use the SQL script reset_image_prefix.sql if you need to change it.
🔹 How can I make APEX work offline in this setup? 🔹 What steps should I take to fix this issue?
@alshamynet
We discussed this internally with the APEX team and it seems there is no direct way to distribute patched APEX files without internet access. Most of the time during the year APEX will need patched files in order to function.
Even if the local file system path can be used (which may not be possible because of a different origin), many customers will not be able to download the files because it requires support contract.
The files under the CDN directories e.g. https://static.oracle.com/cdn/apex/24.1.4/ are always up-to-date
I'm not quite understand that answer. How e.g. APEX path 24.1.4 have come to database in that container image? Far as I can understand container image maintainer has patched APEX and publish new version of container image. So why you can't include APEX static files and update those when APEX patch is applied to database?
@jariolaine
We do patch the APEX user schema with every new container image. However, the image files for APEX are configured to load from the CDN - https://static.oracle.com/cdn/apex/
During image build, the following SQL is run in the PDB as admin user.
begin
apex_instance_admin.set_parameter(
p_parameter => 'IMAGE_PREFIX',
p_value => 'https://static.oracle.com/cdn/apex/$APEX_PREFIX_VERSION/');
commit;
end;