how to download and install configure oracle 19c container on docker step by step in…
- User
how to download and install configure oracle 19c container on docker step by step in centos 9.x
- Assistant
how to download and install configure oracle 19c container on docker step by step in centos 9.x
As of my training cut-off in September 2021, Oracle 19c (19.3) is a common version of Oracle's RDBMS. Setting up Oracle Database in a Docker environment involves pulling an Oracle Database image from the Oracle Container Registry or building your own based on Oracle's Dockerfiles and scripts. This guide provides you with both building from the Dockerfiles and pulling from Oracle's Repository options and assumes you have basic knowledge of Docker and Oracle Database.
First, make sure that Docker is installed:
sudo dnf install -y dnf-utils
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl enable docker
To pull the Oracle Database image, you need to log in to the Oracle Container Registry.
Using the Docker CLI, log in:
docker login container-registry.oracle.com
Enter your Oracle credentials when prompted.
docker pull container-registry.oracle.com/database/enterprise:19.3.0.0
Prepare a directory on your host that will be used for the Oracle database files:
sudo mkdir -p /home/oracle/oradata
sudo chmod -R 777 /home/oracle/oradata
Run the Docker container:
docker run -d -p 1521:1521 -p 5500:5500 --name oracle19c \
-e ORACLE_SID=ORCLCDB \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=oracle \
-e INIT_SGA_SIZE=2048 \
-e INIT_PGA_SIZE=2048 \
-v /home/oracle/oradata:/opt/oracle/oradata \
container-registry.oracle.com/database/enterprise:19.3.0.0
Use SQLPlus or any SQL client to connect to the database:
docker exec -it oracle19c sqlplus sys/oracle@ORCLCDB as sysdba
You're connected now and can start using the Oracle Database running in Docker!
Make sure your database is running and accessible:
docker logs oracle19c
This basic setup can be further customized based on different needs such as networking options, data storage and backup configurations, etc.
To stop the container:
docker stop oracle19c
To start the container again:
docker start oracle19c
This setup should help you to get Oracle Database 19c up and running on CentOS 9.x within Docker, suitable for development and test purposes.
Not yet included in a published release.