1. Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Note: You need have your password to login on the Mac and take several minutes
2. Initialize your container on Mac (M1/M2)
We don't have an ARM native image yet. It's an x86-64 image. Colima VM will emulate the x86-64 Arch to run the container.
/opt/homebrew/bin/brew install docker
/opt/homebrew/bin/brew install docker-compose
/opt/homebrew/bin/brew install colima
/opt/homebrew/bin/brew reinstall qemu
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/opt/homebrew/bin/brew shellenv)"
/opt/homebrew/opt/colima/bin/colima start --cpu 4 --memory 8 --arch x86_64
3. Create directories
mkdir -p ~/Documents/u01/data
chmod -R 775 ~/Documents/u01/data
chmod -R 775 ~/Documents
4. Create and run your container from the image
(This task can take several minutes, monitor the log until finish)
docker run -d \
-p 1521:1522 \
-p 1522:1522 \
-p 8443:8443 \
-p 27017:27017 \
-e WORKLOAD_TYPE=ATP \
-e WALLET_PASSWORD=Or4cl3152024## \
-e ADMIN_PASSWORD=Or4cl3152024## \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--volume adb_container_volume: ~/Documents/u01/data \
--name adb-free \
container-registry.oracle.com/database/adb-free:latest-23ai
5. Check container creation
docker ps -a
7. Create Alias
alias adb-cli="docker exec adb-free adb-cli"
8. Install sqlcl
/opt/homebrew/bin/brew install sqlcl
export PATH=/opt/homebrew/Caskroom/sqlcl/24.1.0.087.0929/sqlcl/bin:"$PATH"
sql -v
mkdir -p ~/Documents/wallet_adb_free_container
cd ~/Documents/wallet_adb_free_container
docker cp b806a784aa6d:/u01/app/oracle/wallets/tls_wallet ./
export TNS_ADMIN=~/Documents/wallet_adb_free_container/tls_wallet
cd ~/Documents/wallet_adb_free_container/tls_wallet
ls -ltr
cat tnsnames.ora
echo $TNS_ADMIN
10. Connect to ADB
sql ADMIN@myatp_high
No comments:
Post a Comment