Coder Social home page Coder Social logo

docker-node-oracledb's Introduction

docker-nodb

Parent image for node apps that need BYU's Oracle DBs.

Uses the Oracle npm module also found on github. This parent image is based on node4.4-slim. It does not add CMD or ENTRYPOINT and is intended to be used by downstream images. It can be pulled from quay.io.

What it does do is compile, install, and configure the Oracle Instant Client with an encrypted connection to the onprem Oracle Connection Manager.

Features

  • baked-in Oracle instant client and sdk
  • globally installed node-oracledb nodejs module1
  • automated test to verify encryption connection before releasing
  • Approx 450 MB image size

Usage

  • Use as a parent image. Tags are 'node-version-node-oracledb-version-commit-hash' or 'latest'. Will switch to releases as tags when #18 is closed.

  • Properly handle the dependency on the globally installed module. 1

  • Use node-byuapi-framework or at least follow its pattern for database config.

Test

make test uses docker compose to build a stack and run test script. The test includes a child image and a node app that requires the node-oracledb module, connects to the onprem connection manager, and preforms a simple query to verify the connection is encrypted.

Contributing

Please use issues for support and feature requests. Also use merge/pull requests for all code contribs.

Will first be closing #18 (migrate from make to npm) before working on #15 (circleci)

Footnotes

1. global node-oracledb

The module is installed globally in the parent image. Given that node-oracledb is not a cli tool, this seems to not follow best practices compared to the downstream app installing locally. In this case the global module complies the database client -both taking a long time and having large dependencies that are not necessarily needed downstream.

A few options to deal with the dependency that is globally installed in the parent image:

  • change NODE_PATH
  • use npm link in the downstream docker image
  • use npm link in the downstream app's package.json

The last option is recommend to ensure the link is established in the local directory relative to the app's own package.json. All that needs to be done is add the link command to the apps prestart script:

"scripts": {
  "prestart" : "npm link oracledb"
}

docker-node-oracledb's People

Contributors

tomdavidson avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.