Run Oracle Database Non-CDB in Docker – Step-by-Step Setup + Fix Common Errors
Introduction
Many enterprise applications still depend on the traditional Non-CDB database architecture used in Oracle Database before the multitenant model was introduced. While modern Oracle versions focus on container databases, many legacy systems still require a Non-CDB database environment for compatibility, testing, or learning purposes.
Setting up an Oracle database manually can be complex and time-consuming. This is where Docker becomes extremely useful. Docker allows developers and database administrators to quickly create isolated environments where databases can run inside containers without installing Oracle directly on the host machine.
By running Oracle Non-CDB databases in Docker, you can easily create repeatable test environments, experiment with database configurations, and work with legacy applications safely.
This guide is designed for DBAs, developers, DevOps engineers, and students who want to understand how to run an Oracle Non-CDB database inside a Docker container.
By the end of this tutorial, you will learn how to:
-
Create an Oracle Non-CDB database in Docker
-
Run and manage the containerized database
-
Verify that the database is working correctly
Understanding Non-CDB vs CDB in Oracle Database
In Oracle Database, there are two main database architectures:
Non-CDB (Non-Container Database)
CDB (Container Database)
Understanding the difference between CDB vs Non-CDB is important when working with legacy applications or when deploying databases in containerized environments such as Docker.
What is a Non-CDB Database?
A Non-CDB (Non-Container Database) is the traditional Oracle database architecture used before Oracle introduced the multitenant model.
In this architecture:
-
A single database instance manages everything
-
Users, schemas, tables, and data exist in one standalone database
-
There are no pluggable databases (PDBs)
Because of its simplicity, many legacy enterprise applications were built specifically for Non-CDB environments. As a result, many organizations still maintain Non-CDB databases for compatibility and testing purposes.
What is a CDB Database?
A CDB (Container Database) is part of Oracle’s multitenant architecture.
A single CDB can host multiple databases known as Pluggable Databases (PDBs).
Each PDB behaves like an independent database, but they share the same Oracle instance and system resources.
This architecture offers several advantages:
-
Better resource utilization
-
Easier database management
-
Ability to run multiple databases in one instance
Quick Comparison: CDB vs Non-CDB
Why Non-CDB Databases Are Still Used?
Even though Oracle promotes the multitenant architecture, Non-CDB databases are still widely used in many environments.
Here are some common reasons:
1. Legacy Applications
Many enterprise systems were originally built to run on Non-CDB architecture, making migration difficult or costly.
2. Learning and Training
Students and beginners often start with Non-CDB databases to understand the core structure of Oracle databases.
3. Development and Testing
Developers sometimes require a simple standalone Oracle database to test applications or reproduce issues.
Step-by-Step: Pull the Oracle Docker Image
1. Open oracle container registry - link
2. If no account created previously, create account for registry.
3. select image and click on continue, i am selecting enterprise and accept terms
6. Run docker command to login to registry
docker login container-registry.oracle.com
docker pull container-registry.oracle.com/database/enterprise:19.3.0.0