OraMatt: YABAOracle

Yet Another Blog About Oracle

, , , , , , , , ,

Running macOS Containers on Apple Silicon

Overview

Apple recently announced a macOS specific container implementation and I wanted to explore it further. The exciting part is that Apple’s container system can run any Open Container Initiative (OCI) image directly on Apple Silicon Macs.

Announced at WWDC 2025, this feature assigns each container its own lightweight virtual machine, providing stronger isolation and enhanced security. Currently, it’s in developer preview and recommended for macOS 15 or later, so expect a few rough edges. Let’s dive in!


Getting Started

The easiest way to try this out is with Homebrew.
During installation, you’ll be prompted for your sudo password.

brew install --cask container

Once installed, start the container subsystem:

container system start

You’ll be asked whether to use the Kata Containers kernel. If you’re comfortable with that, confirm and continue.

Now you can list containers (it should be empty the first time):

container list

Running an OCI Container for Oracle 23ai Free

Since Apple’s container system supports OCI-compliant images, we should be able to run Oracle Database 23ai Free with the following:

container run container-registry.oracle.com/database/free:latest

Oracle Database requires a tad more memory than the default allocation. Let’s run it again with additional settings:

container run --name oracle23ai --memory 8G -p 1522:1521 --detach container-registry.oracle.com/database/free:latest

Here’s what each option does: – 

--name oracle23ai: assigns a container name
--memory 8G: allocates 8 GB RAM
-p 1522:1521: maps local port 1522 to Oracle’s port 1521
--detach: runs in the background


Managing the Container

Check status:

container list --all

View logs in real time:

container logs -f oracle23ai &

Open a shell inside the container:

container exec --tty --interactive oracle23ai /bin/bash

Set the Oracle Database password:

container exec oracle23ai /home/oracle/setPassword.sh oracle23ai

Create a user inside the database:

container exec oracle23ai bash -c "/opt/oracle/product/23ai/dbhomeFree/bin/sqlplus sys/oracle23ai@localhost/FREEPDB1 as sysdba <<EOF
grant dba, db_developer_role to matt identified by matt;
exit;
EOF"

Stopping and Cleaning Up

When finished, stop and remove the container:

container stop oracle23ai
container rm oracle23ai

To shut down the container subsystem itself:

container system stop

Summary

For a developer preview, my experience was surprisingly smooth. Running an OCI-compliant container, configuring memory, setting custom names, mapping ports, and monitoring logs all worked without issue. I’m excited to see how Apple evolves this feature in future releases.


Appendix

Leave a comment

Navigation

About

I’m Matt and I do Oracle things.