Step by step Creating, configuring Database(Oracle21c) on Docker Container
Docker is an open source platform that enables developers to build, deploy, run, update and manage containers—standardized, executable components that combine application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.
To install docker on windows check this blogThis video explain the complete step by step Docker installation.Check it now!
Pre-requisite Setup
- First of all make sure you have installed the docker sucessfully on your environment.
- The Oracle Database Server Docker Image is required. Get the oracle database docker image from docker offical github Click here for github repository.
- Extract the downloaded oracle docker image
- Download the Oracle Database 21c installer(media) files from Oracle official site
- Copy oralce 21c installer(media) "LINUX.X64_213000_db_home.zip" file into docker image "C:\MyDocker\OracleDatabase\SingleInstance\dockerfiles\21.3.0" folder.
- Change the directory as below:
cd C:\MyDocker\OracleDatabase\SingleInstance\dockerfiles\21.3.0
- Run the following docker build command
- Create folder C:\MyDocker\MYDB
- Create "docker-compose.yml" file in "C:\MyDocker\MYDB" folder with the following content:
- Runt the following command in MS-DOS Prompt
- Check the database creation progress
docker build -t oracle/database:21.3.0-ee --build-arg DB_EDITION=ee ./
version: '2'
services:
db:
image: oracle/database:21.3.0-ee # image_name:tag
container_name: mydb
hostname: mydb
domainname: mydocker.com
environment:
ORACLE_SID: MYCDB # Container database name
ORACLE_PDB: MYPDB # Pluggable database name
ORACLE_PWD: your password
ORACLE_CHARACTERSET: AL32UTF8
ORA_SDTZ: Japan
ports:
- "1521:1521"
- "5500:5500"
tty: true
extra_hosts:
- "hostname:192.xxx.xxx.xxx" # change to your own PC's hostname & IP Address
privileged: true
cd C:\MyDocker\MYDB
docker-compose up –d
> docker logs mydb
*) It takes time to complete. Run the same command (docker logs mydb) again, then check and wait until message “100% complete” & “mydb | DATABASE IS READY TO USE!” are displayed.
... mydb | 77% complete
mydb | Executing Post Configuration Actions
mydb | 100% complete
mydb | Database creation complete. For details check the logfiles at:
mydb | /opt/oracle/cfgtoollogs/dbca/MYCDB.
...
...
mydb | SQL> SQL> Disconnected from Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
mydb | Version 21.3.0.0.0
mydb | The Oracle base remains unchanged with value /opt/oracle
mydb | #########################
mydb | DATABASE IS READY TO USE!
mydb | #########################
...
Detailed steps are covered in this video.Check it now!
Creating, configuring and running the Oracle Database(Oracle21c - 21.3) on Docker Container -- Pluggable Database




Comments
Post a Comment