Oracle Container Registryにイメージや導入手順の説明があります。
% brew install podman
Warning: podman 4.8.2 is already installed and up-to-date.
To reinstall 4.8.2, run:
brew reinstall podman
%
podman machine init
% podman machine init
Extracting compressed file: podman-machine-default_fedora-coreos-39.20231204.2…
Image resized.
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"
Waiting for VM ...
Mounting volume... /Users:/Users
Mounting volume... /private:/private
Mounting volume... /var/folders:/var/folders
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: /Users/*************/.local/share/containers/podman/machine/qemu/podman.sock
The system helper service is not installed; the default Docker API socket
address can't be used by podman. If you would like to install it, run the following commands:
sudo /usr/local/Cellar/podman/4.8.2/bin/podman-mac-helper install
podman machine stop; podman machine start
You can still connect Docker API clients by setting DOCKER_HOST using the
following command in your terminal session:
export DOCKER_HOST='unix:///Users/**********/.local/share/containers/podman/machine/qemu/podman.sock'
Machine "podman-machine-default" started successfully
%
仮想マシンの起動を確認します。
% podman machine ls
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default* qemu 6 minutes ago Currently running 4 8GiB 100GiB
%
podman run -d \
-p 1521:1522 \
-p 1522:1522 \
-p 8443:8443 \
-p 27017:27017 \
-e MY_ADB_WALLET_PASSWORD=[Walletのパスワード] \
-e MY_ADW_ADMIN_PASSWORD=[MY_ADWのADMINのパスワード] \
-e MY_ATP_ADMIN_PASSWORD=「MY_ATPのADMINのパスワード] \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--name adb-free \
container-registry.oracle.com/database/adb-free:latest
% podman run -d \
> -p 1521:1522 \
> -p 1522:1522 \
> -p 8443:8443 \
> -p 27017:27017 \
> -e MY_ADB_WALLET_PASSWORD=********** \
> -e MY_ADW_ADMIN_PASSWORD=********** \
> -e MY_ATP_ADMIN_PASSWORD=********** \
> --cap-add SYS_ADMIN \
> --device /dev/fuse \
> --name adb-free \
> container-registry.oracle.com/database/adb-free:latest
Trying to pull container-registry.oracle.com/database/adb-free:latest...
Getting image source signatures
Copying blob sha256:c8561740d94bafef696bb9c6b78237b401496ffcf613f46a6f1726ff51654209
Copying blob sha256:e57ed71b58c6856f5f81cfc95958db8098bef51f05c972b865c22a6932c4c197
Copying blob sha256:7de4f82b8b29335fce701cefd64d017f80663afd90b9b4db3c5efb842a4b62c5
Copying config sha256:19e829581a93a2070fe4ab0917ae0778419f69505a10ba5bd1dbd33811f26722
Writing manifest to image destination
740dfefffaaab35d35c1a62626f7c08b6dcf41cc5691aacef4f2863f28d995bf
%
コンテナの実行を確認します。
% podman container ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
740dfefffaaa container-registry.oracle.com/database/adb-free:latest 8 minutes ago Up 8 minutes (healthy) 0.0.0.0:1521-1522->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@740dfefffaaa /]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@740dfefffaaa /]$ export ORACLE_SID=POD1
[oracle@740dfefffaaa /]$ export NLS_LANG=American_America.AL32UTF8
[oracle@740dfefffaaa /]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@740dfefffaaa /]$ export TNS_ADMIN=/u01/app/oracle/wallets/tls_wallet
[oracle@740dfefffaaa /]$
ユーザーADMINで接続します。
[oracle@740dfefffaaa /]$ sqlplus admin@my_atp_low
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Dec 22 06:22:45 2023
Version 19.21.0.1.0
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Enter password: *********
Last Successful login time: Fri Dec 22 2023 06:21:28 +00:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.21.0.1.0
SQL> exit;
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.21.0.1.0
[oracle@740dfefffaaa /]$
exitで切断します。
[oracle@740dfefffaaa /]$ exit
exit
%
コンテナadb-freeを停止します。
% podman container stop adb-free
adb-free
%
仮想マシンを停止します。
% podman machine stop
Waiting for VM to exit...
Machine "podman-machine-default" stopped successfully
%
Oracle Autonomous Database Free Container ImageをmacOS上で動かした作業履歴は以上になります。