Install Oracle Database Free with Docker
Choose Your Install Method
| Method | Best for | Notes |
|---|---|---|
| Docker (used in this course) | Windows, Mac, Linux | Fastest, easy to delete and recreate |
| Linux RPM | Oracle Linux servers | Closer to a real production install |
| Windows installer | Windows without Docker | Simple wizard |
Official sources: Oracle provides RPM files for Oracle Linux 8 and 9. Oracle AI Database Free is available for Linux x86, ARM Linux and Windows. A container image is also available for macOS, Linux and other platforms.
Step 1: Install Docker
Install Docker Desktop (Windows or Mac) or Docker Engine (Linux) from docker.com and start it. Check it works:
bash
docker --versio
Step 2: Start the Database
bash
docker run -d --name oracle-free \
-p 1521:1521 \
-e ORACLE_PWD=YourStrongPwd1 \
-v oracle-data:/opt/oracle/oradata \
container-registry.oracle.com/database/free:latest
| Part | Meaning |
|---|---|
-d | Run in the background |
--name oracle-free | A friendly name for the container |
-p 1521:1521 | Open the listener port to your computer |
-e ORACLE_PWD=... | Sets the password for SYS, SYSTEM and PDBADMIN |
-v oracle-data:... | Keeps your data even if you remove the container |
Step 3: Wait Until It Is Ready
The first start creates the database and takes a few minutes. Watch the log:
bash
docker logs -f oracle-free
Wait for the message DATABASE IS READY TO USE! then press Ctrl + C to stop watching (the database keeps running).
Step 4: Connect
bash
# As SYSDBA inside the container (the DBA way)
docker exec -it oracle-free sqlplus / as sysdba
# Or from your own computer with SQL*Plus or SQLcl installed
sqlplus system/YourStrongPwd1@localhost:1521/FREEPDB1
| Name | What it is |
|---|---|
FREE | The container database (CDB) |
FREEPDB1 | The ready-made pluggable database (PDB) for your practice |
SYS, SYSTEM | Administrator accounts |
Daily Commands
bash
docker stop oracle-free # shut the database down cleanly
docker start oracle-free # start it again
docker ps # is it running?
Tip: Always use
docker stop instead of closing Docker Desktop abruptly. It gives Oracle time to shut down cleanly.
Common Problems
| Problem | Fix |
|---|---|
| Port 1521 already in use | Use -p 1522:1521 and connect on port 1522 |
| Not enough memory | Give Docker Desktop at least 4 GB RAM in its settings |
| Cannot connect right after start | The database is still starting. Check the log for READY |
Conclusion
Docker gives you a real Oracle database in minutes. Connect as SYSDBA inside the container for administration and to FREEPDB1 for practice.
Quick Summary: docker run, wait for READY, then sqlplus / as sysdba. Use a volume so data survives.

