GithubHelp home page GithubHelp logo

docker-node-oracle's Introduction

docker-node-oracle

Docker image to be used for building a container ready with Oracle instant client binaries and all necessary environment variables needed to use the primary Node.js Oracle Database driver libraries:

strong-oracle
node-oracledb

Usage

Within your Dockerfile:

FROM collinestes/docker-node-oracle:{VERSION}

Versions

Specify the Node.js version you would like to use in the above {VERSION}. Check the different branches available on this repo to see available versions.

If you would like to use a version that is currently not a branch of this repo, submit a PR with the updated Dockerfile with the edit too:

FROM node:{VERSION}

:latest

Using "latest" (FROM collinestes/docker-node-oracle) as the version will use "FROM NODE:8" as it's base image. It is recommended that you use a specific version (X.X.X) but if you only want the latest version of Node 8.X.X then latest will work.

docker-node-oracle's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-node-oracle's Issues

oracledb prereqs not found for npm install loopback-oracle-connector

Hi I used the dockerfile you had provided for creating docker image for my nodejs app(using loopback)

i appended below lines to the DockerFile you had shared to add my nodejs code.. at the step of "run npm install" am getting below-mentioned error message

WORKDIR app
COPY package.json .
RUN npm install
COPY . /app
CMD node server/server.js
EXPOSE 3000

Error:

Pre-packaged file http://7e9918db41dd01dbf98e-ec15952f71452bc0809d79c86f5751b6.r22.cf1.rackcdn.com/loopback-oracle-Linux-x64-abi57-2.1.0.tar.gz doesn't exist. Checking if user has installed pre-requisites offline as per instructions in https://github.com/oracle/node-oracledb/blob/master/INSTALL.md

**Oracledb pre-requisites not found. User needs to install pre-requisites for oracledb offline as per https://github.com/oracle/node-oracledb/blob/master/INSTALL.md and retry installing loopback-oracle-connector.**
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node pkginstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-07-26T11_38_32_405Z-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1
[root@kanrhel1 Susp_txns]# 

version used:
node:8.11 ( in Docker file used FROM node:8.11)
Docker version 1.13.1, build dded712/1.13.1
Docker is installed on RHEL 7.5 (Maipo)
Architecture: x86-64

?

Other TimeZones

I notice that, your current image did not have the timezone for all the countrys wich resulted in a problem with our email.
It only have the tz for en-US and no matter what kind of timezone you entered ie: pt-BR, en-GB..
It didn't matter because always sends back to en-US.

new Date().toLocaleString('en-US');
should print: 01/22/2019, 01:30:25 AM

new Date().toLocaleString('pt-BR');
should print 22/01/2019 13:30:25
but it's printing the same as en-US

I'm using the 10-slim image, could you take a look at it?

Node version 6 is not branched properly

When trying to pull collinestes/docker-node-oracle:6 it does not exist. Using latest would possibly break a container build because the version is not locked in.

Docker-Compose Up not working using this as the base image

This used to work fine until last week - but, now I'm seeing issues with trying to run my docker image even from just the base image.

Anyone else seeing this issue? Here's the output I'm seeing from a docker-compose build and a docker-compose up, but using only the base image (collinestes/docker-node-oracle:8) in the DockerFile.

Building node
Step 1/1 : FROM collinestes/docker-node-oracle:8
 ---> 1778caf39ce9
Successfully built 1778caf39ce9
Successfully tagged server_node:latest
imac:server: $ docker-compose up
Recreating server_node_1 ... 
Recreating server_node_1 ... done
Attaching to server_node_1
node_1  | 
node_1  | > [email protected] start /home/node/app
node_1  | > node ./bin/www
node_1  | 
node_1  | /home/node/app/node_modules/oracledb/lib/oracledb.js:68
node_1  |       throw new Error(nodbUtil.getErrorMessage('NJS-045', nodeInfo));
node_1  |       ^
node_1  | 
node_1  | Error: NJS-045: cannot load the oracledb add-on binary for Node.js 8.9.4 (linux, x64)
node_1  | Cannot load /home/node/app/node_modules/oracledb/build/Release/oracledb.node
node_1  | /home/node/app/node_modules/oracledb/build/Release/oracledb.node: invalid ELF header
node_1  | Node-oracledb installation instructions: https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
node_1  | You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig.
node_1  | If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from 
node_1  | http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
node_1  | 
node_1  |     at Object.<anonymous> (/home/node/app/node_modules/oracledb/lib/oracledb.js:68:13)
node_1  |     at Module._compile (module.js:643:30)
node_1  |     at Object.Module._extensions..js (module.js:654:10)
node_1  |     at Module.load (module.js:556:32)
node_1  |     at tryModuleLoad (module.js:499:12)
node_1  |     at Function.Module._load (module.js:491:3)
node_1  |     at Module.require (module.js:587:17)
node_1  |     at require (internal/module.js:11:18)
node_1  |     at Object.<anonymous> (/home/node/app/node_modules/oracledb/index.js:1:80)
node_1  |     at Module._compile (module.js:643:30)
node_1  | npm ERR! code ELIFECYCLE
node_1  | npm ERR! errno 1
node_1  | npm ERR! [email protected] start: `node ./bin/www`
node_1  | npm ERR! Exit status 1
node_1  | npm ERR! 
node_1  | npm ERR! Failed at the [email protected] start script.
node_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
node_1  | 
node_1  | npm ERR! A complete log of this run can be found in:
node_1  | npm ERR!     /home/node/.npm/_logs/2018-09-01T17_48_35_062Z-debug.log
server_node_1 exited with code 1

Error while pulling

Hi,

I'm using your Dockerfile to pull the oracleDB files in.
I was wondering if you had any idea what this error meant?

/usr/src/app/node_modules/oracledb/build/Release/oracledb.node: invalid ELF header

It seems to have a problem with the files.

I am using node-oracledb

Include SQLPLUS

Sometime we need to run commands via shelll even if our focus is nodejs app. Would be great if this docker image could have sqlplus included.

Rebuild for Yarn

The official node image has added Yarn. Can you rebuild this image for add it? Thanks

BTW: The Dockerfile has this comment: # INSTALL UBUNTU. The official node image is Debian OS.

Invalid ELF header

When using the branch '8' version, I get an error when starting the container:

backend_1 | /app/node_modules/oracledb/lib/oracledb.js:68
backend_1 | throw new Error(nodbUtil.getErrorMessage('NJS-045', nodeInfo));
backend_1 | ^
backend_1 |
backend_1 | Error: NJS-045: cannot load the oracledb add-on binary for Node.js 8.11.1 (linux, x64)
backend_1 | Cannot load /app/node_modules/oracledb/build/Release/oracledb.node
backend_1 | /app/node_modules/oracledb/build/Release/oracledb.node: invalid ELF header
backend_1 | Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html
backend_1 | You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig.
backend_1 | If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
backend_1 | http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
backend_1 |
backend_1 | at Object. (/app/node_modules/oracledb/lib/oracledb.js:68:13)
backend_1 | at Module._compile (module.js:652:30)
backend_1 | at Module._extensions..js (module.js:663:10)
backend_1 | at Object.require.extensions.(anonymous function) [as .js] (/app/node_modules/babel-register/lib/node.js:152:7)
backend_1 | at Module.load (module.js:565:32)
backend_1 | at tryModuleLoad (module.js:505:12)
backend_1 | at Function.Module._load (module.js:497:3)
backend_1 | at Module.require (module.js:596:17)
backend_1 | at require (internal/module.js:11:18)
backend_1 | at Object. (/app/node_modules/oracledb/index.js:1:18)

TNS issues exist only inside the container

Environment: OSX

Running outside container

  • Manually installed instantclient + sdk
  • Python 2.7.x
  • GCC
  • npm installed oracledb

Everything works like a wonder.

Running inside the container

  • `docker run -d --name rester -v ~/repos/rester/:/rester -w /rester -p 3000:3000 collinestes/docker-node-oracle:4.4.0``

Essentially saying run a container in the background, mounting a local directory to the /rester dir inside the container and exposing the port 3000 to local environment. Nothing major, just plain and simple.

When I run the application inside the container, npm install and everything finish just fine and dandy but the issues comes when it tries to getConnection from oracledb and I get the following message from the container:

Error: ORA-12154: TNS:could not resolve the connect identifier specified

Any tips on how to progress with this? As I know it works perfectly well on my local setup and just bonkers with the container. All tips are more than welcome.

EDIT 1:

// getConnection options

{
    user: "unicorn_secret_user",
    password : "even_more_unicorn_password",
    connectString: "my_secret_ip_that_is_full_of_magic_and_wonders:1600/UNICORN"
}

The method driver /usr/lib/apt/methods/https could not be found.

I'm trying out this project and got this error while docker build, error at step 2

Step 2/10 : RUN apt-get update && apt-get install -y libaio1 && apt-get install -y build-essential && apt-get inst
all -y unzip && apt-get install -y curl
---> Running in 6c10db86ea99
E: The method driver /usr/lib/apt/methods/https could not be found.
The command '/bin/sh -c apt-get update && apt-get install -y libaio1 && apt-get install -y build-essential && apt-
get install -y unzip && apt-get install -y curl' returned a non-zero code: 100

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.