Oracle Container Registryに登録されているDatabaseのfree(Oracle Database 23c Free)のイメージとords(Oracle REST Data Services (ORDS) with Application Express)から、Oracle APEXの環境を作成します。
Intel MacのmacOS Sonama 14.3.1のpodmanを使います。
macOSでのpodmanの準備については、以前の記事「Autonomous Database Free Container ImageをmacOS上で実行する」を参照してください。以降の手順は、podmanの仮想マシンが起動済みであることが前提です。
あらかじめコンテナのイメージをダウンロードしておきます。
podman pull container-registry.oracle.com/database/free:latest% podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
container-registry.oracle.com/database/ords latest a848f4190472 2 weeks ago 2.01 GB
container-registry.oracle.com/database/free latest 7510f8869b04 2 weeks ago 8.73 GB
%
Oracle Database FreeのコンテナとOracle REST Data Servicesのコンテナを実行するpodを作成します。名前はapexとします。
podman pod create -p 8181:8181 -p 1521:1521 --name apex
% podman pod create -p 8181:8181 -p 1521:1521 --name apex
82e49fa7bb76332aca6f55c909eaea53c689b0b7b038c6c18c485c8a6166179f
%
podの作成を確認します。
podman pod ls
% podman pod ls
POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS
82e49fa7bb76 apex Created 28 seconds ago 91b3ef1ee9a4 1
%
% podman run -d --pod apex --name apexdb -e ORACLE_PWD=******** container-registry.oracle.com/database/free:latest
f8f2c56d7f0441cb381e136827faa5acdc84b8b7a8058f8014a1536967a08ac2
%
podman ps
% podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
91b3ef1ee9a4 localhost/podman-pause:5.0.3-1715299200 2 minutes ago Up About a minute 0.0.0.0:1521->1521/tcp, 0.0.0.0:8181->8181/tcp 82e49fa7bb76-infra
f8f2c56d7f04 container-registry.oracle.com/database/free:latest /bin/bash -c $ORA... About a minute ago Up About a minute (healthy) 0.0.0.0:1521->1521/tcp, 0.0.0.0:8181->8181/tcp apexdb
%
chmod 777 ords_secrets
% mkdir ords_secrets
% chmod 777 ords_secrets
% echo 'CONN_STRING=sys/パスワード@localhost:1521/freepdb1' > ords_secrets/conn_string.txt
%
% podman run --pod apex --name ords -v `pwd`/ords_secrets/:/opt/oracle/variables container-registry.oracle.com/database/ords:latest
INFO : This container will start a service running ORDS 24.1.0 and APEX 23.2.0.
INFO : CONN_STRING has been found in the container variables file.
INFO : Database connection established.
INFO : Apex is not installed on your database.
INFO : Installing APEX on your DB please be patient.
INFO : You can check the logs by running the command below in a new terminal window:
docker exec -it apex tail -f /tmp/install_container.log
WARN : APEX can be installed remotely on PDBs, If you want to install it on a CDB,
install it directly on the Database and not remotely.
% podman exec -it ords tail -f /tmp/install_container.log
--application/pages/page_00067
--application/pages/page_00069
--application/pages/page_00070
--application/pages/page_00071
--application/pages/page_00073
--application/pages/page_00075
--application/pages/page_00076
--application/pages/page_00077
INFO : APEX has been installed.
INFO : Configuring APEX.
INFO : APEX_PUBLIC_USER has been configured as oracle.
INFO : APEX ADMIN password has configured as 'Welcome_1'.
INFO : Use below login credentials to first time login to APEX service:
Workspace: internal
User: ADMIN
Password: Welcome_1
java.class.version=55.0
2024-05-13T02:17:01.210Z WARNING *** jdbc.InitialLimit in configuration |default|lo| is using a value of 10, this setting may not be sized adequately for a production environment ***
2024-05-13T02:17:07.775Z INFO
Mapped local pools from /etc/ords/config/databases:
/ords/ => default => VALID
2024-05-13T02:17:07.885Z INFO Oracle REST Data Services initialized
Oracle REST Data Services version : 24.1.0.r1080942
Oracle REST Data Services server info: jetty/10.0.20
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 11.0.15+8-LTS-149
% podman exec -it ords sh
sh-4.4$
export PATH=/opt/oracle/sqlcl/bin:$PATH
sql sys/パスワード@localhost/freepdb1 as sysdba
sh-4.4$ cd /opt/oracle/apex/23.2.0
sh-4.4$ export PATH=/opt/oracle/sqlcl/bin:$PATH
sh-4.4$ sql sys/************@localhost/freepdb1 as sysdba
SQLcl: Release 24.1 Production on Mon May 13 02:22:49 2024
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.4.0.24.05
SQL>
SQL> @load_trans JAPANESE
PL/SQL procedure successfully completed.
Installing Oracle APEX translation - JAPANESE
. ORACLE
.
. Application Express Hosted Development Service Installation.
..............................................................
PL/SQL procedure successfully completed.
--application/set_environment
API Last Extended:20231031
Your Current Version:20231031
This import is compatible with version: 20231031
COMPATIBLE (You should be able to run this import without issues.)
ID offset during import: 0
New ID offset for application: 0
...done
Adjust instance settings
PL/SQL procedure successfully completed.
SQL>