Node.js, Oracle Client (Instant Client 12.2), including SQLPlus and SQLLoader tools
309
Docker images used to create containers ready with Node.js, Oracle Client (Instant Client 12.2), including SQLPlus and SQLLoader tools. This docker image includes Nodemon and PM2 for both development and production use.
Just run the following command to run the container:
docker run -d -t -p <host port>:<your app port> -v <your app host dir>:/usr/src/myapp --name <your container name> thesuhu/docker-node-oracle:{TAG}
Specify the image tag you will use in the above {TAG}. Available tags and their Node details are listed below.
| Image Tag | Node | Oracle Client | Tools | Nodemon | PM2 |
|---|---|---|---|---|---|
| latest | v22.x | 12.2.0.1.0 | SQLPlus, SQLLoader | v3.1.10 | v6.0.8 |
| 22 | v22.x | 12.2.0.1.0 | SQLPlus, SQLLoader | v3.1.10 | v6.0.8 |
docker run -d -t -p 3000:3000 -v /home/thesuhu/myapp:/usr/src/myapp --name myapp-dev thesuhu/docker-node-oracle:22
Once the container is running, open a terminal inside the container and run npm i. Then use nodemon to start your application:
docker exec -it myapp-dev bash
npm i
nodemon index.js
The application will automatically restart every time there is a change in the host directory.
docker run -d -t -p 3000:3000 -v /home/thesuhu/myapp:/usr/src/myapp --name myapp-prod thesuhu/docker-node-oracle:22
Start your application with PM2:
docker exec -it myapp-prod bash
npm i
pm2 start index.js --name myapp
Once inside the container, you can use Oracle tools directly:
# SQL*Plus
sqlplus username/password@//hostname:1521/service_name
# SQL*Loader
sqlldr username/password@//hostname:1521/service_name control=data.ctl
The following environment variables are set in the container:
LD_LIBRARY_PATH=/opt/oracle/instantclientOCI_HOME=/opt/oracle/instantclientOCI_LIB_DIR=/opt/oracle/instantclientOCI_INCLUDE_DIR=/opt/oracle/instantclient/sdk/includeOCI_VERSION=12PATH=/opt/oracle/instantclient:${PATH}Content type
Image
Digest
sha256:bc411fd21…
Size
554.1 MB
Last updated
11 months ago
docker pull thesuhu/docker-node-oracle