Skip to content

Instantly share code, notes, and snippets.

@maxmilian
Last active November 10, 2020 03:29
Show Gist options
  • Save maxmilian/d402ba3343f064af414d975f5c09ded3 to your computer and use it in GitHub Desktop.
Save maxmilian/d402ba3343f064af414d975f5c09ded3 to your computer and use it in GitHub Desktop.
Oracle Database

網路上的訊息不多
主要也是因為Oracle 2008年買了 VirtualBox 後
當然是希望主要的虛擬化機器VM都放在 VirtualBox
所以相較於 docker,我認為VirtualBox 在 Oracle 系列反而是比較好用

VirutalBox

這邊還是先說一下如何使用 Virtualbox 來建立 OracleDB 的虛擬環境
其實頗簡單,安裝好 VirtualBox 後, 抓一下Pre-Build 的VM 就可以了 下載網址

根據自己需求(我是使用 Database App Development VM)
下載需要的VM檔,使用VirtualBox匯入即可

Docker

其實要測試 Oracle DB,使用VirtualBox已經可以完成。
不過因為我需要測試2台的migration,
開一個 VirtualBox 對我的 MAP 已經非常吃力,
開了兩台就真的是完全跑不動,只能再試試看 Docker。

首先,Oracle還是有提供docker在dockerhub上, Oracle Database Enterprise Edition 對於若只是要使用 12c 的版本需求已經可以滿足,
不過若我要測試 19c 的版本,
就要自己 build 了。

Docker build

首先 git clone https://github.com/oracle/docker-images 下來, 在這個 repo 下的 OracleDatabase/SingleInstance 目錄下,
有說明如何 build , 說明算是清楚,先下載 binary 檔到版本下的目錄, (例如: 下載 19.3 Linux x86-64 的zip檔到 OracleDatabase/SingleInstance/dockerfiles/19.3.0 目錄),
接著直接執行 ./buildDockerImage.sh -v 19.3.0 -e -i 就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment