Oracle Container Registryにイメージや導入手順の説明があります。
% brew install podman
Warning: podman 5.0.2 is already installed and up-to-date.
To reinstall 5.0.2, run:
brew reinstall podman
%
podman machine init
% podman machine init
Looking up Podman Machine image at quay.io/podman/machine-os:5.0 to create VM
Getting image source signatures
Copying blob 39d447e3fb35 done |
Copying config 44136fa355 done |
Writing manifest to image destination
39d447e3fb35b0626309d5e3591926284a4f1c370c2af5767b01350e3bf49d66
Extracting compressed file: podman-machine-default-amd64.raw: done
Machine init complete
To start your machine run:
podman machine start
%
How can I start podman VM on x86_64 Mac with minimum memory/cpu requirements ?
podman machine set --cpus 4 --memory 8192
% podman machine set --cpus 4 --memory 8192
%
仮想マシンを起動します。
podman machine start
% podman machine start
Starting machine "podman-machine-default"
This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:
podman machine set --rootful
API forwarding listening on: /var/run/docker.sock
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully
%
仮想マシンの起動を確認します。
% podman machine ls
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default* applehv 7 minutes ago Currently running 4 8GiB 100GiB
%
export MYPASS=[パスワード]
% export MYPASS=[パスワード]
%
podman run -d \
-p 1521:1522 \
-p 1522:1522 \
-p 8443:8443 \
-p 27017:27017 \
-e WORKLOAD_TYPE=ATP \
-e WALLET_PASSWORD=$MYPASS \
-e ADMIN_PASSWORD=$MYPASS \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--name adb-free \
container-registry.oracle.com/database/adb-free:latest-23ai
% podman run -d \
-p 1521:1522 \
-p 1522:1522 \
-p 8443:8443 \
-p 27017:27017 \
-e WORKLOAD_TYPE=ATP \
-e WALLET_PASSWORD=$MYPASS \
-e ADMIN_PASSWORD=$MYPASS \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--name adb-free \
container-registry.oracle.com/database/adb-free:latest-23ai
Trying to pull container-registry.oracle.com/database/adb-free:latest-23ai...
Getting image source signatures
Copying blob sha256:40356c1517a23cf44e68a507194ff60153e4c578890d7122c7cc2295e4cd3144
Copying blob sha256:00ef0c1abdfeca2113126d07899a20378854f5c8c3a36163159c81bba6044529
Copying blob sha256:4fb9e1cce3a6abe0666107b18d5ac22dab4d9efb3bb4395a88839cb8d0bc5828
Copying config sha256:05353df50ddd0cfe86769904e643e30e71fc62d6a4780d75f1c37a727b0454b5
Writing manifest to image destination
96d0adb4a0445bbfc8b564ae67136c632279be94b2eb2562e21ab93f6ce2a39a
%
% unset MYPASS
%
% podman container ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
96d0adb4a044 container-registry.oracle.com/database/adb-free:latest-23ai 9 minutes ago Up 9 minutes (healthy) 0.0.0.0:1521->1522/tcp, 0.0.0.0:1522->1522/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:27017->27017/tcp adb-free
%
手元のブラウザよりATPのAPEXにアクセスします。
% podman exec -it adb-free /bin/bash
[oracle@740dfefffaaa /]$
export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
export ORACLE_SID=POD1
export NLS_LANG=American_America.AL32UTF8
export PATH=$ORACLE_HOME/bin:$PATH
export TNS_ADMIN=/u01/app/oracle/wallets/tls_wallet
[oracle@96d0adb4a044 /]$ export ORACLE_HOME=/u01/app/oracle/product/23.0.0.0/dbhome_1
[oracle@96d0adb4a044 /]$ export ORACLE_SID=POD1
[oracle@96d0adb4a044 /]$ export NLS_LANG=American_America.AL32UTF8
[oracle@96d0adb4a044 /]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@96d0adb4a044 /]$ export TNS_ADMIN=/u01/app/oracle/wallets/tls_wallet
[oracle@96d0adb4a044 /]$ sqlplus admin@myatp_low
SQL*Plus: Release 23.0.0.0.0 - Production on Mon May 13 00:19:08 2024
Version 23.4.0.24.05
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Enter password: ***********
Last Successful login time: Mon May 13 2024 00:17:19 +00:00
Connected to:
Oracle Database 23ai Enterprise Edition Release 23.0.0.0.0 - Production
Version 23.4.0.24.05
SQL> exit
Disconnected from Oracle Database 23ai Enterprise Edition Release 23.0.0.0.0 - Production
Version 23.4.0.24.05
[oracle@96d0adb4a044 /]$
exitで切断します。
[oracle@96d0adb4a044 /]$ exit
exit
%
コンテナadb-freeを停止します。
% podman container stop adb-free
adb-free
%
仮想マシンを停止します。
% podman machine stop
Machine "podman-machine-default" stopped successfully
%
Oracle Autonomous Database Free Container ImageをmacOS上で動かした作業履歴は以上になります。