Deploy Oracle in Docker | Enterprise
Документация на русском языке
поддерживается сообществом
Deploy Oracle in Docker

Deploy Oracle in Docker

Description (For Oracle EE v12.2):

  1. You should have working Docker and Oracle accounts.

  2. instantclient-sqlplus.

  3. Go to this page and follow instructions. You need to follow steps 1.a-1.d steps. For short here they are:

  • 1.a Log in to Docker Store with your Docker credentials.

  • 1.b Search for „oracle database“ and select the Oracle Database Enterprise Edition image.

  • 1.c Click through and accept terms if needed.

  • 1.d View Setup Instructions.

  • 1.d.1 Download image with

docker pull store/oracle/database-enterprise:12.2.0.1
  • 1.d.2 Run container with -P option, it will allocate port to access database outside docker container.

docker run -d -it --name OraDBEE -P store/oracle/database-enterprise:12.2.0.1

Note: type docker ps to get allocated port, you need PORTS section (or docker port CONTAINER_NAME), also check that status is healthy (if not, repeat 1.d.2 - in my case probability to create working container was 50/50 :P). Assume port is 32771 for farther instructions.

  1. Go inside container, create a user, grant all necessary permissions:

docker exec -it OraDBEE bash -c "source /home/oracle/.bashrc; sqlplus sys/Oradoc_db1@ORCLCDB as sysdba"
...

SQL> alter session set "_ORACLE_SCRIPT"=true;
SQL> CREATE USER user1 IDENTIFIED BY qwerty123;
SQL> GRANT CONNECT, RESOURCE, DBA TO user1;
  1. Check connection and access rights outside container for a new user:

> sqlplus user1/qwerty123@localhost:32771/ORCLCDB.localdomain

Try to create a table, insert some rows, select them, then drop table.

6. Follow Getting started part. Use this user credentials in connect method:

tarantool> c, err = ora.connect({username='user1', password='qwerty123', db='localhost:32771/ORCLCDB.localdomain'})

Troubleshooting

If Docker can’t get Oracle image with

docker pull store/oracle/database-enterprise:12.2.0.1

try to login with „docker login“. If still nothing is happening, go to docker store and check license (Terms of Service).

Нашли ответ на свой вопрос?
Обратная связь