In my previous article, First setup of a connection from Node.js to an Oracle Database, I demonstrated how to make a connection to a remote database using Node.js and the node-oracledb module. I used a dedicated VM with Linux 7 installed and Oracle Instantclient provided the 12.1 client libraries.
Now it’s time to take it a step further.
Let’s create an application container and just start it multiple time running any .js script and be able to connect to an Oracle database.
I will start by demonstrating you how to manually build a Docker image with Node.js and the node-oracledb module. This image can then be used to launch as many application containers as you like. (Depending on your resources off course)
For this setup I have installed Docker on an Oracle Linux 7 VM in VirtualBox.
Create the Docker image manually
Create a Linux base image
Logon as root (or use sudo) on the Oracle Linux VM
First we need an operating system for the container.
Pull docker image of oraclelinux from the Docker hub. Read the complete article here.
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.