- https://hub.docker.com/_/oracle-database-enterprise-edition
- accept agreement
- pull image
docker login
docker pull store/oracle/database-enterprise:12.2.0.1
- run container and verify
docker run -d -p 1521:1521 --name myoracle store/oracle/database-enterprise:12.2.0.1
docker logs -f myoracle # wait for the msg: Done ! The database is ready for use .
- Connect to SQLPLUS Connect to connect and setup user (SQLPLUS) - wait for the process to start
docker exec -it myoracle bash
sqlplus "sys/Oradoc_db1@ORCLCDB as sysdba"
Enter user-name: sys as sysdba
Enter password: Oradoc_db1
- Setup Users, HR Schema
# Use pluggable DB
alter session set container = ORCLPDB1;
# kick start HR schema scripts
@?/demo/schema/human_resources/hr_main.sql;
specify password for HR as parameter 1:
Enter value for 1: 123
specify default tablespeace for HR as parameter 2:
Enter value for 2: users
specify temporary tablespace for HR as parameter 3:
Enter value for 3: temp
specify log path as parameter 4:
Enter value for 4: log
# ALTER USER HR ACCOUNT UNLOCK IDENTIFIED BY password;
ALTER USER HR ACCOUNT UNLOCK IDENTIFIED BY hr;
- SQL developer connection
# sys user
Username: sys
Password: Oradoc_db1
# hr user
Username: hr
Password: hr
Hostname: localhost
Port: 1521
Service name: ORCLPDB1.localdomain
- sqlplus terminal
docker exec -it myoracle bash
sqlplus hr/hr@ORCLPDB1
- Ref
- https://www.youtube.com/watch?v=ciYsDbBx80s
- https://docs.oracle.com/en/database/oracle/oracle-database/12.2/comsc/installing-sample-schemas.html#GUID-CB945E4C-D08A-4B26-A12D-3D6D688467EA
- https://hub.docker.com/u/santhoshbabumr/content/sub-236f753b-e86d-4713-955b-230cd593db04
- https://stackoverflow.com/questions/36563723/ora-20000-schema-hr-does-not-exist-or-insufficient-privileges