Discover how to easily set up Oracle Database on your Mac using Docker containers. This step-by-step guide walks you through the installation process, from Docker setup to database configuration, and shows you how to connect using VS Code.
Oracle Database installation on macOS can be challenging since there’s no native installer. However, Docker makes this process straightforward by running the database in a container. This guide will walk you through installing Oracle Database using Docker and connecting to it through Visual Studio Code.
Your Mac needs to meet these basic requirements:
Getting Docker set up is your first step:
docker --version
Oracle keeps their Docker images in a private registry. Here’s how to get access:
docker login container-registry.oracle.com
Now let’s get Oracle Database running:
Download the Oracle Database Express Edition (XE) image:
docker pull container-registry.oracle.com/database/free:latest
Start the database container:
docker run -d --name oracle-db -p 1521:1521 container-registry.oracle.com/database/free:latest
Watch the database initialization (this takes a few minutes):
docker logs -f oracle-db
When you see “DATABASE IS READY TO USE!”, set up the system passwords:
docker exec oracle-db ./setPassword.sh your-password-here
Let’s set up VS Code to work with your new database:
Open VS Code and install the “Oracle Developer Tools for VS Code” extension
Set up your database connection:
Click “Test Connection” to make sure everything works
If something’s not working, check these common issues:
docker logs oracle-db
docker ps
You can always reset the password:
docker exec oracle-db ./setPassword.sh new-password
docker start oracle-db
docker stop oracle-db
docker ps
With Oracle Database running on your Mac, you can:
Remember that this setup is perfect for development and testing, but for production use, you’ll want to look into Oracle’s enterprise offerings and proper data persistence strategies.
Happy database development! 🎉