
✍🏻 Mustapha Limar
3 min read
•
Mon Jul 14, 2025
Installing Oracle Database on Apple Silicon (M1/M2) Macs isn’t straightforward because Oracle doesn’t officially support macOS natively. But with Docker and the right ARM64 image, you can run Oracle Database 19c smoothly. Here's a step-by-step guide.
🛠️ Prerequisites
- ✅ MacBook with Apple M1 or M2 chip
- ✅ Docker Desktop installed and running Download Docker
- ✅ Oracle account (to download the installation zip)
📥 Step 1: Clone Oracle Docker Image Repo
Oracle provides Docker image build scripts on GitHub.
Copy code
git clone https://github.com/oracle/docker-images.git
cd docker-images/OracleDatabase/SingleInstance/dockerfiles
📁 Step 2: Download Oracle 19c ARM64 Zip
Since you're on Apple Silicon, download the ARM64 version of Oracle 19c:
- Visit: Oracle 19c ARM64 Downloads
- Download:
LINUX.ARM64_1919000_db_home.zip
Place the file in the correct folder:
Copy code
mkdir -p 19.3.0
mv ~/Downloads/LINUX.ARM64_1919000_db_home.zip 19.3.0/
🧱 Step 3: Build the Docker Image
Now run the build script:
Copy code
./buildContainerImage.sh -v 19.3.0 -e
🔄 This will take several minutes. It verifies the zip and builds the image
oracle/database:19.3.0-ee
.
🚀 Step 4: Run Oracle Container
After the build completes, run your container:
Copy code
docker run --name oracle-db -p 1521:1521 -p 5500:5500 -e ORACLE_PWD=YourPassword123 -e ORACLE_CHARACTERSET=AL32UTF8 -v oracle-data:/opt/oracle/oradata -d oracle/database:19.3.0-ee
This will:
- Expose SQL port
1521
- Enable Enterprise Manager on port
5500
- Set SYS and SYSTEM password
🧪 Step 5: Verify Oracle Is Running
Connect to the container:
Copy code
docker exec -it oracle-db bash
source /home/oracle/.bashrc
sqlplus sys/YourPassword123@ORCLCDB as sysdba
If you see a SQL prompt, it’s working!
🧠 Step 6: Connect with DataGrip (Optional)
If you want to use a GUI:
- Open DataGrip
- Add new Oracle Data Source
- Use these settings:
Copy code
Host: localhost
Port: 1521
SID: ORCLCDB
User: sys
Password: YourPassword123
Role: SYSDBA
Let DataGrip download the Oracle JDBC driver and test the connection.
🧾 Sample Queries
Here are a few SQL queries to get started:
Copy code
-- Check version
SELECT * FROM v$version;
-- List users
SELECT username FROM dba_users;
-- Create table
CREATE TABLE test_table (
id NUMBER PRIMARY KEY,
name VARCHAR2(100)
);
📦 Cleanup
To stop and remove the container:
Copy code
docker stop oracle-db
docker rm oracle-db
To delete the image:
Copy code
docker rmi oracle/database:19.3.0-ee
✅ Conclusion
Now you have Oracle 19c running on your Mac M1/M2 using Docker. This is a great setup for development and testing without needing a full Oracle install.