June 29, 2020

[Note] Oracle in Docker

I've moved to Ubuntu (20.04 ) from Windows 10.  On Windows, I used VirtualBox + CentOS for running Oracle DB.  More modern way is using docker -- and here is a note on installing it.  Since there is no Oracle database Xe docker image you can download.  It requires to build and it's pretty simple.


[1] Download Oracle XE


I got 18c Express for Linux x64,

[2] Get docker image builder code from github, created by Oracle

$ git clone https://github.com/oracle/docker-images.git

[3] Build docker image

Copy the downloaded Oracle RPM file file to this directory of the code that's from github,

$ cp ~/Download/racle-database-xe-18c-1.0-1.x86_64.rpm ~/workspace/local/docker-images/OracleDatabase/SingleInstance/dockerfiles/18.4.0

$ cd ~/workspace/local/docker-images/OracleDatabase/SingleInstance/dockerfiles

$ ./buildDockerImage.sh -v 18.4.0 -x

[4] Verify

(base) [email protected]:~/workspace/local/docker-images/OracleDatabase/SingleInstance/dockerfiles$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
oracle/database     18.4.0-xe           072b9c161782        2 hours ago         5.87GB
oraclelinux         7-slim              7442ca158991        2 weeks ago         120MB

[5] Run

$ docker run --name oracledb -d -p 51521:1521 -p 55500:5500 -e ORACLE_PWD=<your new admin pw> -e ORACLE_CHARACTERSET=AL32UTF8 oracle/database:18.4.0-xe

For more detailed step by step, see this page:



No comments:

Post a Comment