본문 바로가기
기타

[Oracle] docker를 이용해서 Oracle 11g 띄우기

by A6K 2022. 2. 25.

도커(Docker)를 이용해서 오라클 RDBMS를 설치해보자.

오라클 도커 이미지 받기

우선 도커에 공개되어 있는 오라클 11g 이미지들을 검색해보자. "docker search oracle-xe-11g"를 실행해보면 오라클 도커 이미지들을 확인할 수 있다.

 

$ docker search oracle-xe-11g
NAME                                DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
oracleinanutshell/oracle-xe-11g                                                     206
wnameless/oracle-xe-11g-r2          Oracle Express Edition 11g Release 2 on Ubun…   79
orangehrm/oracle-xe-11g              docker container with Oracle Express Editio…   16                   [OK]
jaspeen/oracle-xe-11g               Fork from sath89/docker-oracle-xe-11g - smal…   6                    [OK]
christophesurmont/oracle-xe-11g     Clone of the wnameless/oracle-xe-11g.           6
ukhomeofficedigital/oracle-xe-11g   Oracle Database Express Edition 11g Container   4                    [OK]
thebookpeople/oracle-xe-11g                                                         3
wscherphof/oracle-xe-11g-r2         Oracle® Database Express Edition 11g Release…   3
acktsw/oracle-xe-11g                fork from https://hub.docker.com/r/sath89/or…   2                    [OK]
mcgregorandrew/oracle-xe-11g        Oracle image with password expiry time set t…   2
alxfduch/oracle-xe-11g-tridion      Oracle Express 11g R2 on Ubuntu 16.04 LTS Tr…   2
webdizz/oracle-xe-11g-sa            This is a simple image based on sath89/oracl…   1                    [OK]
dotcms/oracle-xe-11g                                                                0
zeroturnaround/oracle-xe-11g                                                        0
activeeon/oracle-xe-11g                                                             0
nritholtz/oracle-xe-11g             nritholtz/oracle-xe-11g                         0
andyrbell/oracle-xe-11g-centos      Oracle Express Edition 11g Release 2 on Cent…   0
gaesi/oracle-xe-11g                 Based on: oracleinanutshell/oracle-xe-11g       0
switchsoftware/oracle-xe-11g                                                        0
aerisconsulting/oracle-xe-11g       Oracle Express 11g R2 on Ubuntu 16.04 LTS (b…   0
paliari/oracle-xe-11g                                                               0
jark/oracle-xe-11g-r2-cdc                                                           0
avuletica/oracle-xe-11g-r2          Dockerfile of Oracle Database Express Editio…   0
larmic/oracle-xe-11g                Using wnameless/oracle-xe-11g with created u…   0
toneloc01/oracle-xe-11g             Out-of-the-box oralce xe image from ubuntu 1…   0

저 중에 하나를 docker pull 명령을 이용해서 받으면 된다.

$ docker pull jaspeen/oracle-xe-11g
Using default tag: latest
latest: Pulling from jaspeen/oracle-xe-11g
Image docker.io/jaspeen/oracle-xe-11g:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
863735b9fd15: Downloading [=====================>                             ]  27.89MB/65.67MB
4fbaa2f403df: Download complete
44be94a95984: Download complete
a3ed95caeb02: Download complete
05b9ddeb40d9: Download complete
b44894d2d2af: Download complete
1492d1fc5b9f: Download complete
c0f3c6ec8986: Waiting
fbfc89a21b1b: Waiting
740047056d21: Waiti

오라클 도커 컨테이너 실행

이제 받은 오라클 도커 이미지를 이용해서 오라클 인스턴스를 띄워보자.

 $ docker run --name oracle -d -p 1521:1521 jaspeen/oracle-xe-11g

이제 sqlplus 를 실행해서 오라클 인스턴스에 붙어보자

$ docker exec -it oracle sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Fri Feb 25 12:44:34 2022

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter user-name: system
Enter password:

Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL>

user-name은 "system"을 입력하면 되고 password는 oracle이다.

이제 sqlplus 화면이 떴다. 이제 오라클 DB를 이용하면 된다.

댓글