Site icon Ron Ekins' – Oracle Technology, DevOps and Kubernetes Blog

Run Oracle Database 23ai Free on ARM based Mac with Podman and Colima

I have previously shared how to run the Oracle Database 23c Free database on an X86 Mac using PodMan, you can find that blog post here.

But what about Oracle 23ai and the newer M1/M2/M3 ARM based Apple silicon Macs I hear you ask, so here you go.

Preparation

Start by installing the Homebrew package manager, if not already installed.

brew update

And confirm Oracle SQLcL is available.

Now, install Colima container runtime and Docker if not already installed on your Mac.

brew install colima docker

If we now try docker ps to check for processes, we see a docker daemon error message.

Colima Container Runtime

Start Colima container runtime using the colima start command, we can use colima -help to list all available command line options.

Also, colima defaults can be edited using colima -template or passed on the command line for example.

colima start 
    --arch x86_64 
    --vm-type=vz 
    --vz-rosetta 
    --mount-type=virtiofs 
    --memory 8

Below is a list of the Colima container runtime parameters specified or left to default.

  • a86_64: Architecture (aarch64, x86_64)
  • vz: Virtual machine type (qemu, vz)
  • vz-rosetta: Enable Rosetta for amd64 emulation
  • disk: Default 60GiB
  • virtiofs: Volume Mount Driver – Default virtiofs (for vz), sshfs (for qemu)
  • memory: Memory default 2G
  • cpu: Default 2

We can confirm the Colima Container Runtime configuration with colima staus and colima list, for example.

Before we try and start our Oracle Database 23c Free container, let’s check for Docker processes using docker ps.

We now no longer see the Docker daemon error message.

We can check for existing docker images with docker images, for example.

The docker context show command should return colima, which means Docker runs under Colima and you can therefore use docker commands as usual.

Oracle Database 23ai FREE

The Docker run command will automatically attempt to download the Oracle Database 23ai Free image from the Oracle Container Registry.

However it’s also possible to pull the image advance using:

docker pull container-registry.oracle.com/database/free

As we are using the Oracle Database 23ai FREE release there is no need to provide Oracle SSO credentials

Use docker images, docker image ls or docker image list to list available images.

We can confirm source and check other details using docker image inspect, for example.

To start the Oracle Database 23c Container use docker run, for example

docker run -d \
  --name ora23ai \
  -p 1522:1521 \
  --mount source=oradata,target=/opt/oracle/oradata \
  container-registry.oracle.com/database/free 

Example output:

We can see the Docker process using docker ps, for example.

Database Logs

We check check progress of the container startup with docker logs, which shows the Oracle database alert.log output.

Wait until the log shows DATABASE IS READY TO USE!

Database Password

The Oracle 23ai FREE database was created with random passwords for SYS, SYSTEM and PDBADMIN, we can reset these using the ./setPassword.sh script provided.

Database Access

If you have an Oracle client installed on your Mac you can use that to connect to the Oracle 23ai database.

Confirm the container port for the database listener using docker port, for example.

Using sqlcl and the new password, the mapped listener port and database name we can connect thus:

The FREE database comes with a single Pluggable Database (PDB) called FREEPDB1, we can connect to the PDB using the same method.

Alternatively, we can access the 23ai database by executing sqlplus within the container, for example:

Summary

In this blog post I have shown that it is possible to run the Oracle Database 23ai Free on the newer M1/M2/M3 MacBooks.

There are definitely some performance challenges, but if you can’t wait till Oracle ships a native Oracle Database 23ai ARM version to start your Oracle 23ai learning journey, it may be just what you need.

Exit mobile version