Friday, 13 March 2026

Run Oracle Database Non-CDB in Docker – Step-by-Step Setup + Fix Common Errors

 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

FeatureNon-CDBCDB
ArchitectureSingle standalone databaseContainer with multiple PDBs
Resource sharingNoYes
ScalabilityLimitedHigh
Primary useLegacy applicationsModern deployments


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.


Why Oracle Removed Non-CDB in 21c ??? big question right please refer : Link

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

4. After this click on profile and select auth and generate secret key:
Secret key

5. Copy the secret key and store it safely.
6. Run docker command to login to registry
docker login container-registry.oracle.com
provide user name and the secret

7. Pull the Docker image using  pull command
docker pull container-registry.oracle.com/database/enterprise:19.3.0.0

Step-by-Step: Run the Non-CDB Container

Author Details

Hi, I'm Prashant — a full-time software engineer with a passion for automation, DevOps, and sharing what I learn. I started Py-Bucket to document my journey through tools like Docker, Kubernetes, Azure DevOps, and PowerShell scripting — and to help others navigate the same path. When I’m not coding or writing, I’m experimenting with side projects, exploring productivity hacks, or learning how to build passive income streams online. This blog is my sandbox — and you're welcome to explore it with me. Get in touch or follow me for future updates!