This guide provides step-by-step instructions to pull the Oracle 21c image, update your Docker Compose configuration, and install the Human Resources (HR) schema in your Oracle database container.
Ensure you have the following installed on your system:
- Docker: Installation Guide
- Docker Compose: Installation Guide
Pull the Oracle 21c image from Docker Hub by running the following command:
docker pull rehunt671/oracle-21
Modify your docker-compose.yml
file to use the rehunt671/oracle-21
image. For example:
version: "3"
services:
oracle:
image: rehunt671/oracle-21
container_name: oracle21
ports:
- "1521:1521"
volumes:
- ./data:/opt/oracle/oradata
Run the following command to start the container in detached mode:
docker-compose up -d
Verify that the container is running:
docker ps
To install the HR schema, access the Oracle container's sqlplus
interface:
docker exec -it oracle21 bash
Once inside the container, execute the following command:
sqlplus sys/secret@localhost:1521/XEPDB1 as sysdba @/run/mock/human_resources/hr_install.sql
This will run the hr_install.sql
script to install the HR schema.