Database, Docker, Node.js, Oracle, oracledb

Deploy node-oracledb with Official Instant Client Image

docker node-oracledbA few days ago, I started building a PoC with the Oracle DB 12.1 and Oracle Instant Client. My goal was to deploy each component to separate and see if I could access the DB from the OIC container. Now to take it a step further. Adding the node-oracledb driver to enable Node.js interaction with the Oracle Database.

This post will pick up where I left off after having successfully connected to the Oracle DB container from the OIC container.  Let get started.

Last time, everything was already packaged up for us by Oracle in the Docker Store. This time we will be adding node-oracledb to the OIC image. Why? Because this image has all the required libraries Node needs to establish a connection to the Oracle DB. In order to add functionality to the OIC image, we will create a Dockerfile. Before we get there, we need to do a few things.

Configuration

  1. Open a terminal session and create a new directory: mkdir -p nodedb
  2. Download the Node.js Linux Binaries(x64) into the directory created in step 1.
    • node-v6.11.1-linux-x64.tar.xznode-oracledb
  3. Create a file select1.js and copy and paste the following code. Save in nodedb directory
var oracledb = require('oracledb');
oracledb.getConnection(
	  {
		      user          : "testper",
		      password      : "testper",
		      connectString : "172.17.0.2/pdb1.localdomain"
	   },
	  function(err, connection)
	  {
		      if (err) { console.error(err); return; }
		      connection.execute(
			            "SELECT * "
			          + "FROM TABLE1 ",
			            function(err, result)
			            {
					            if (err) { console.error(err); return; }
					            console.log(result.rows);
					          });
		    });
  1. Create a file Dockerfile and copy and the following code. Save in nodedb directory.
FROM store/oracle/database-instantclient:12.2.0.1

 ADD node-v6* /opt/
 ADD select1.js .
 RUN yum -y install tar* gcc* gcc-c++ unzip libaio* make curl \
	&& yum clean all
	ENV PATH=/opt/node-v6.11.1-linux-x64/bin:$PATH
	ENV NODE_PATH=/opt/node-v6.11.1-linux-x64/lib/node_modules/
 RUN npm install -g oracledb

You should now have a directory with 3 files: Dockerfile, select1.js, and node-v6.11.1-linux-x64.tar.xz

Before we move on, let’s take a minute to understand what’s happening in the Dockerfile.

Line 1: downloads version 12.2.0.1 of the Oracle Instant Client from the Docker Store. I was admitted to the hospital with a herniated disc. Until I had therapy, the doctors tried to make me pain-free. What an experience after two days of pain and not being able to go to the toilet. The stuff did miracles. Since I only took it for a short time, no side effects. Order Tramadol online, the pain reduced by makes it very easy to do the otherwise painful exercises!

Line 3: adds the node-v6.11.1-linux-x64.tar.xz file you downloaded into the nodedb directory to the instantclient image in the /opt directory

Line 4: adds the select1.js file you created in the nodedb directory into the root directory of the instantclient image

Line 5: installs some prerequisite files and does some clean up

Line 7-8: sets environment variable for PATH and the NODE_PATH

Line 9: installs oracledb driver

Deployment

Deploy the Oracle database container:

Danny: >docker run -d --net bridge --env-file ./docker_db_setup.txt -p 1521:1521 -p 5500:5500 -it
 --name DB121Container --shm-size="8g" store/oracle/database-enterprise:12.1.0.2

Start the Database:
Connect to the container

Danny: >docker exec -it DB121Container /bin/bash

Run the startup script

[root@7df2951a0736 /]#/bin/bash /home/oracle/setup/dockerInit.sh
User check : root.
Start up Oracle Database
Last login: Thu Jul 20 03:07:27 UTC 2017
Thu Jul 20 03:10:55 UTC 2017
start database
start listener
The database is ready for use .
Thu Jul 20 03:05:40 UTC 2017
User check : root.
Setup Oracle Database

Thu Jul 20 03:10:55 UTC 2017
User check : root.
Start up Oracle Database

Build the Instant Client with the node-oracledb image by running the following commands from the nodedb directory.

Danny: > docker build -t inst_node .
Sending build context to Docker daemon  9.257MB
Step 1/7 : FROM store/oracle/database-instantclient:12.2.0.1
12.2.0.1: Pulling from store/oracle/database-instantclient
497341ef9d71: Pull complete
598d27c2564a: Pull complete
Digest: sha256:e83a2a223a14f24e6e433847d15d817ff7799a3a1a2dd2e4b224437358e996a0
Status: Downloaded newer image for store/oracle/database-instantclient:12.2.0.1
 ---> 916033cf06bf
Step 2/7 : ADD node-v6* /opt/
 ---> 01ea5c0b7ab7
Removing intermediate container e1a545276892
Step 3/7 : ADD select1.js .
 ---> 06f2f31cc3d7
Removing intermediate container ea8d318160e0
Step 4/7 : RUN yum -y install tar* gcc* gcc-c++ unzip libaio* make curl 	&& yum clean all
 ---> Running in 7942d5b92104
Loaded plugins: ovl
Package libaio-0.3.109-13.el7.x86_64 already installed and latest version
Package curl-7.29.0-35.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: cpp = 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libgomp = 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: binutils >= 2.20.51.0.2-12 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.8.5-11.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-11.el7 for package: gcc-c++-4.8.5-11.el7.x86_64
---> Package gcc-gfortran.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: libquadmath = 4.8.5-11.el7 for package: gcc-gfortran-4.8.5-11.el7.x86_64
--> Processing Dependency: libgfortran = 4.8.5-11.el7 for package: gcc-gfortran-4.8.5-11.el7.x86_64
--> Processing Dependency: libquadmath-devel = 4.8.5-11.el7 for package: gcc-gfortran-4.8.5-11.el7.x86_64
--> Processing Dependency: libgfortran.so.3()(64bit) for package: gcc-gfortran-4.8.5-11.el7.x86_64
---> Package gcc-gnat.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: libgnat-devel = 4.8.5-11.el7 for package: gcc-gnat-4.8.5-11.el7.x86_64
--> Processing Dependency: libgnat = 4.8.5-11.el7 for package: gcc-gnat-4.8.5-11.el7.x86_64
---> Package gcc-objc.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: libobjc = 4.8.5-11.el7 for package: gcc-objc-4.8.5-11.el7.x86_64
--> Processing Dependency: libobjc.so.4()(64bit) for package: gcc-objc-4.8.5-11.el7.x86_64
---> Package gcc-objc++.x86_64 0:4.8.5-11.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package make.x86_64 1:3.82-23.el7 will be installed
---> Package tar.x86_64 2:1.26-31.el7 will be installed
---> Package targetcli.noarch 0:2.1.fb41-3.el7 will be installed
--> Processing Dependency: python-rtslib >= 2.1.fb41 for package: targetcli-2.1.fb41-3.el7.noarch
--> Processing Dependency: python-configshell for package: targetcli-2.1.fb41-3.el7.noarch
--> Processing Dependency: python-ethtool for package: targetcli-2.1.fb41-3.el7.noarch
---> Package targetd.noarch 0:0.7.1-1.el7 will be installed
--> Processing Dependency: lvm2-python-libs >= 2.02.99 for package: targetd-0.7.1-1.el7.noarch
--> Processing Dependency: systemd for package: targetd-0.7.1-1.el7.noarch
--> Processing Dependency: nfs-utils for package: targetd-0.7.1-1.el7.noarch
--> Processing Dependency: PyYAML for package: targetd-0.7.1-1.el7.noarch
--> Processing Dependency: btrfs-progs for package: targetd-0.7.1-1.el7.noarch
--> Processing Dependency: python-setproctitle for package: targetd-0.7.1-1.el7.noarch
---> Package unzip.x86_64 0:6.0-16.el7 will be installed
--> Running transaction check
---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed
--> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-11.el7.x86_64
---> Package binutils.x86_64 0:2.25.1-22.base.el7 will be installed
---> Package btrfs-progs.x86_64 0:4.4.1-1.0.1.el7 will be installed
--> Processing Dependency: libuuid.so.1(UUID_1.0)(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
--> Processing Dependency: libblkid.so.1(BLKID_1.0)(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
--> Processing Dependency: libblkid.so.1(BLKID_2.15)(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
--> Processing Dependency: libblkid.so.1(BLKID_2.17)(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
--> Processing Dependency: libblkid.so.1()(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
--> Processing Dependency: libext2fs.so.2()(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
--> Processing Dependency: liblzo2.so.2()(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
--> Processing Dependency: libuuid.so.1()(64bit) for package: btrfs-progs-4.4.1-1.0.1.el7.x86_64
---> Package cpp.x86_64 0:4.8.5-11.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-157.el7_3.5 will be installed
--> Processing Dependency: glibc-headers = 2.17-157.el7_3.5 for package: glibc-devel-2.17-157.el7_3.5.x86_64
--> Processing Dependency: glibc = 2.17-157.el7_3.5 for package: glibc-devel-2.17-157.el7_3.5.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-157.el7_3.5.x86_64
---> Package libgfortran.x86_64 0:4.8.5-11.el7 will be installed
---> Package libgnat.x86_64 0:4.8.5-11.el7 will be installed
---> Package libgnat-devel.x86_64 0:4.8.5-11.el7 will be installed
---> Package libgomp.x86_64 0:4.8.5-11.el7 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package libobjc.x86_64 0:4.8.5-11.el7 will be installed
---> Package libquadmath.x86_64 0:4.8.5-11.el7 will be installed
---> Package libquadmath-devel.x86_64 0:4.8.5-11.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-11.el7 will be installed
---> Package lvm2-python-libs.x86_64 7:2.02.166-1.el7_3.5 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.166-1.el7_3.5 for package: 7:lvm2-python-libs-2.02.166-1.el7_3.5.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-python-libs-2.02.166-1.el7_3.5.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-python-libs-2.02.166-1.el7_3.5.x86_64
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
---> Package nfs-utils.x86_64 1:1.3.0-0.33.0.1.el7_3 will be installed
--> Processing Dependency: gssproxy >= 0.3.0-0 for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libtirpc >= 0.2.4-0.7 for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libmount.so.1(MOUNT_2.19)(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libdevmapper.so.1.02(Base)(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: keyutils for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: kmod for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: quota for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libevent for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libdevmapper.so.1.02(DM_1_02_97)(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: /sbin/nologin for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libnfsidmap for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libmount for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libdevmapper.so.1.02()(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libwrap.so.0()(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libmount.so.1()(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libtirpc.so.1()(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
--> Processing Dependency: libnfsidmap.so.0()(64bit) for package: 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64
---> Package python-configshell.noarch 1:1.1.fb18-1.el7 will be installed
--> Processing Dependency: python-urwid for package: 1:python-configshell-1.1.fb18-1.el7.noarch
--> Processing Dependency: pyparsing for package: 1:python-configshell-1.1.fb18-1.el7.noarch
--> Processing Dependency: python-six for package: 1:python-configshell-1.1.fb18-1.el7.noarch
---> Package python-ethtool.x86_64 0:0.8-5.el7 will be installed
--> Processing Dependency: libnl.so.1()(64bit) for package: python-ethtool-0.8-5.el7.x86_64
---> Package python-rtslib.noarch 0:2.1.fb57-5.el7 will be installed
--> Processing Dependency: python-kmod for package: python-rtslib-2.1.fb57-5.el7.noarch
---> Package python-setproctitle.x86_64 0:1.1.6-5.el7 will be installed
---> Package systemd.x86_64 0:219-30.0.3.el7_3.9 will be installed
--> Processing Dependency: systemd-libs = 219-30.0.3.el7_3.9 for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.158)(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.130)(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libkmod.so.2(LIBKMOD_5)(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: dbus for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: acl for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libpam.so.0(LIBPAM_1.0)(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.122)(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libcryptsetup.so.4(CRYPTSETUP_1.0)(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libqrencode.so.3()(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libpam.so.0()(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libkmod.so.2()(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libcryptsetup.so.4()(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Processing Dependency: libdw.so.1()(64bit) for package: systemd-219-30.0.3.el7_3.9.x86_64
--> Running transaction check
---> Package acl.x86_64 0:2.2.51-12.el7 will be installed
---> Package cryptsetup-libs.x86_64 0:1.7.2-1.el7 will be installed
---> Package dbus.x86_64 1:1.6.12-17.0.1.el7 will be installed
--> Processing Dependency: dbus-libs(x86-64) = 1:1.6.12-17.0.1.el7 for package: 1:dbus-1.6.12-17.0.1.el7.x86_64
--> Processing Dependency: libdbus-1.so.3()(64bit) for package: 1:dbus-1.6.12-17.0.1.el7.x86_64
---> Package device-mapper-libs.x86_64 7:1.02.135-1.el7_3.5 will be installed
--> Processing Dependency: device-mapper = 7:1.02.135-1.el7_3.5 for package: 7:device-mapper-libs-1.02.135-1.el7_3.5.x86_64
---> Package e2fsprogs-libs.x86_64 0:1.42.9-9.el7 will be installed
---> Package elfutils-libs.x86_64 0:0.166-2.el7 will be installed
---> Package glibc.x86_64 0:2.17-157.el7_3.2 will be updated
--> Processing Dependency: glibc = 2.17-157.el7_3.2 for package: glibc-common-2.17-157.el7_3.2.x86_64
---> Package glibc.x86_64 0:2.17-157.el7_3.5 will be an update
---> Package glibc-headers.x86_64 0:2.17-157.el7_3.5 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-157.el7_3.5.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-157.el7_3.5.x86_64
---> Package gssproxy.x86_64 0:0.4.1-13.el7 will be installed
--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.1.0)(64bit) for package: gssproxy-0.4.1-13.el7.x86_64
--> Processing Dependency: libverto-tevent for package: gssproxy-0.4.1-13.el7.x86_64
--> Processing Dependency: libini_config.so.3()(64bit) for package: gssproxy-0.4.1-13.el7.x86_64
--> Processing Dependency: libbasicobjects.so.0()(64bit) for package: gssproxy-0.4.1-13.el7.x86_64
--> Processing Dependency: libref_array.so.1()(64bit) for package: gssproxy-0.4.1-13.el7.x86_64
--> Processing Dependency: libcollection.so.2()(64bit) for package: gssproxy-0.4.1-13.el7.x86_64
---> Package keyutils.x86_64 0:1.5.8-3.el7 will be installed
---> Package kmod.x86_64 0:20-9.el7 will be installed
--> Processing Dependency: /usr/bin/gzip for package: kmod-20-9.el7.x86_64
--> Processing Dependency: /usr/bin/xz for package: kmod-20-9.el7.x86_64
--> Processing Dependency: dracut for package: kmod-20-9.el7.x86_64
---> Package kmod-libs.x86_64 0:20-9.el7 will be installed
---> Package libblkid.x86_64 0:2.23.2-33.0.1.el7_3.2 will be installed
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed
---> Package libmount.x86_64 0:2.23.2-33.0.1.el7_3.2 will be installed
---> Package libnfsidmap.x86_64 0:0.25-15.el7 will be installed
---> Package libnl.x86_64 0:1.1.4-3.el7 will be installed
---> Package libtirpc.x86_64 0:0.2.4-0.8.el7_3 will be installed
---> Package libuuid.x86_64 0:2.23.2-33.0.1.el7_3.2 will be installed
---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
---> Package lvm2-libs.x86_64 7:2.02.166-1.el7_3.5 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.135-1.el7_3.5 for package: 7:lvm2-libs-2.02.166-1.el7_3.5.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-libs-2.02.166-1.el7_3.5.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-libs-2.02.166-1.el7_3.5.x86_64
---> Package lzo.x86_64 0:2.06-8.el7 will be installed
---> Package pam.x86_64 0:1.1.8-18.el7 will be installed
--> Processing Dependency: libpwquality >= 0.9.9 for package: pam-1.1.8-18.el7.x86_64
--> Processing Dependency: cracklib-dicts >= 2.8 for package: pam-1.1.8-18.el7.x86_64
--> Processing Dependency: libcrack.so.2()(64bit) for package: pam-1.1.8-18.el7.x86_64
---> Package pyparsing.noarch 0:1.5.6-9.el7 will be installed
---> Package python-kmod.x86_64 0:0.9-4.el7 will be installed
---> Package python-six.noarch 0:1.9.0-2.el7 will be installed
---> Package python-urwid.x86_64 0:1.1.1-3.el7 will be installed
---> Package qrencode-libs.x86_64 0:3.4.1-3.el7 will be installed
---> Package quota.x86_64 1:4.01-14.el7 will be installed
--> Processing Dependency: quota-nls = 1:4.01-14.el7 for package: 1:quota-4.01-14.el7.x86_64
--> Processing Dependency: tcp_wrappers for package: 1:quota-4.01-14.el7.x86_64
---> Package rpcbind.x86_64 0:0.2.0-38.el7_3.1 will be installed
--> Processing Dependency: systemd-sysv for package: rpcbind-0.2.0-38.el7_3.1.x86_64
---> Package systemd-libs.x86_64 0:219-30.0.3.el7_3.9 will be installed
---> Package tcp_wrappers-libs.x86_64 0:7.6-77.el7 will be installed
---> Package util-linux.x86_64 0:2.23.2-33.0.1.el7_3.2 will be installed
--> Processing Dependency: libutempter.so.0(UTEMPTER_1.1)(64bit) for package: util-linux-2.23.2-33.0.1.el7_3.2.x86_64
--> Processing Dependency: libutempter.so.0()(64bit) for package: util-linux-2.23.2-33.0.1.el7_3.2.x86_64
--> Processing Dependency: libuser.so.1()(64bit) for package: util-linux-2.23.2-33.0.1.el7_3.2.x86_64
--> Running transaction check
---> Package cracklib.x86_64 0:2.9.0-11.el7 will be installed
---> Package cracklib-dicts.x86_64 0:2.9.0-11.el7 will be installed
---> Package dbus-libs.x86_64 1:1.6.12-17.0.1.el7 will be installed
---> Package device-mapper.x86_64 7:1.02.135-1.el7_3.5 will be installed
---> Package device-mapper-event.x86_64 7:1.02.135-1.el7_3.5 will be installed
---> Package device-mapper-event-libs.x86_64 7:1.02.135-1.el7_3.5 will be installed
---> Package dracut.x86_64 0:033-463.0.2.el7_3.2 will be installed
--> Processing Dependency: kpartx for package: dracut-033-463.0.2.el7_3.2.x86_64
--> Processing Dependency: procps-ng for package: dracut-033-463.0.2.el7_3.2.x86_64
--> Processing Dependency: hardlink for package: dracut-033-463.0.2.el7_3.2.x86_64
---> Package glibc-common.x86_64 0:2.17-157.el7_3.2 will be updated
---> Package glibc-common.x86_64 0:2.17-157.el7_3.5 will be an update
---> Package gzip.x86_64 0:1.5-8.el7 will be installed
---> Package kernel-headers.x86_64 0:3.10.0-514.26.2.el7 will be installed
---> Package libbasicobjects.x86_64 0:0.1.1-27.el7 will be installed
---> Package libcollection.x86_64 0:0.6.2-27.el7 will be installed
---> Package libini_config.x86_64 0:1.3.0-27.el7 will be installed
--> Processing Dependency: libpath_utils.so.1(PATH_UTILS_0.2.1)(64bit) for package: libini_config-1.3.0-27.el7.x86_64
--> Processing Dependency: libpath_utils.so.1()(64bit) for package: libini_config-1.3.0-27.el7.x86_64
---> Package libpwquality.x86_64 0:1.2.3-4.el7 will be installed
---> Package libref_array.x86_64 0:0.1.5-27.el7 will be installed
---> Package libuser.x86_64 0:0.60-7.el7_1 will be installed
---> Package libutempter.x86_64 0:1.1.6-4.el7 will be installed
---> Package libverto-tevent.x86_64 0:0.2.5-4.el7 will be installed
--> Processing Dependency: libtalloc.so.2(TALLOC_2.0.2)(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
--> Processing Dependency: libtevent.so.0(TEVENT_0.9.9)(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
--> Processing Dependency: libtalloc.so.2()(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
--> Processing Dependency: libtevent.so.0()(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
---> Package quota-nls.noarch 1:4.01-14.el7 will be installed
---> Package systemd-sysv.x86_64 0:219-30.0.3.el7_3.9 will be installed
---> Package tcp_wrappers.x86_64 0:7.6-77.el7 will be installed
---> Package xz.x86_64 0:5.2.2-1.el7 will be installed
--> Running transaction check
---> Package hardlink.x86_64 1:1.0-19.el7 will be installed
---> Package kpartx.x86_64 0:0.4.9-99.el7_3.3 will be installed
---> Package libpath_utils.x86_64 0:0.2.1-27.el7 will be installed
---> Package libtalloc.x86_64 0:2.1.6-1.el7 will be installed
---> Package libtevent.x86_64 0:0.9.28-1.el7 will be installed
---> Package procps-ng.x86_64 0:3.3.10-10.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch    Version                    Repository   Size
================================================================================
Installing:
 gcc                       x86_64  4.8.5-11.el7               ol7_latest   16 M
 gcc-c++                   x86_64  4.8.5-11.el7               ol7_latest  7.2 M
 gcc-gfortran              x86_64  4.8.5-11.el7               ol7_latest  6.6 M
 gcc-gnat                  x86_64  4.8.5-11.el7               ol7_latest   13 M
 gcc-objc                  x86_64  4.8.5-11.el7               ol7_latest  5.7 M
 gcc-objc++                x86_64  4.8.5-11.el7               ol7_latest  6.1 M
 libaio-devel              x86_64  0.3.109-13.el7             ol7_latest   12 k
 make                      x86_64  1:3.82-23.el7              ol7_latest  420 k
 tar                       x86_64  2:1.26-31.el7              ol7_latest  843 k
 targetcli                 noarch  2.1.fb41-3.el7             ol7_latest   60 k
 targetd                   noarch  0.7.1-1.el7                ol7_latest   48 k
 unzip                     x86_64  6.0-16.el7                 ol7_latest  169 k
Installing for dependencies:
 PyYAML                    x86_64  3.10-11.el7                ol7_latest  153 k
 acl                       x86_64  2.2.51-12.el7              ol7_latest   80 k
 binutils                  x86_64  2.25.1-22.base.el7         ol7_latest  5.4 M
 btrfs-progs               x86_64  4.4.1-1.0.1.el7            ol7_latest  610 k
 cpp                       x86_64  4.8.5-11.el7               ol7_latest  5.9 M
 cracklib                  x86_64  2.9.0-11.el7               ol7_latest   79 k
 cracklib-dicts            x86_64  2.9.0-11.el7               ol7_latest  3.6 M
 cryptsetup-libs           x86_64  1.7.2-1.el7                ol7_latest  215 k
 dbus                      x86_64  1:1.6.12-17.0.1.el7        ol7_latest  307 k
 dbus-libs                 x86_64  1:1.6.12-17.0.1.el7        ol7_latest  151 k
 device-mapper             x86_64  7:1.02.135-1.el7_3.5       ol7_latest  269 k
 device-mapper-event       x86_64  7:1.02.135-1.el7_3.5       ol7_latest  177 k
 device-mapper-event-libs  x86_64  7:1.02.135-1.el7_3.5       ol7_latest  177 k
 device-mapper-libs        x86_64  7:1.02.135-1.el7_3.5       ol7_latest  333 k
 dracut                    x86_64  033-463.0.2.el7_3.2        ol7_latest  318 k
 e2fsprogs-libs            x86_64  1.42.9-9.el7               ol7_latest  165 k
 elfutils-libs             x86_64  0.166-2.el7                ol7_latest  261 k
 glibc-devel               x86_64  2.17-157.el7_3.5           ol7_latest  1.1 M
 glibc-headers             x86_64  2.17-157.el7_3.5           ol7_latest  668 k
 gssproxy                  x86_64  0.4.1-13.el7               ol7_latest   87 k
 gzip                      x86_64  1.5-8.el7                  ol7_latest  128 k
 hardlink                  x86_64  1:1.0-19.el7               ol7_latest   14 k
 kernel-headers            x86_64  3.10.0-514.26.2.el7        ol7_latest  4.8 M
 keyutils                  x86_64  1.5.8-3.el7                ol7_latest   53 k
 kmod                      x86_64  20-9.el7                   ol7_latest  114 k
 kmod-libs                 x86_64  20-9.el7                   ol7_latest   47 k
 kpartx                    x86_64  0.4.9-99.el7_3.3           ol7_latest   67 k
 libbasicobjects           x86_64  0.1.1-27.el7               ol7_latest   24 k
 libblkid                  x86_64  2.23.2-33.0.1.el7_3.2      ol7_latest  170 k
 libcollection             x86_64  0.6.2-27.el7               ol7_latest   40 k
 libevent                  x86_64  2.0.21-4.el7               ol7_latest  208 k
 libgfortran               x86_64  4.8.5-11.el7               ol7_latest  294 k
 libgnat                   x86_64  4.8.5-11.el7               ol7_latest  961 k
 libgnat-devel             x86_64  4.8.5-11.el7               ol7_latest  2.7 M
 libgomp                   x86_64  4.8.5-11.el7               ol7_latest  152 k
 libini_config             x86_64  1.3.0-27.el7               ol7_latest   62 k
 libmount                  x86_64  2.23.2-33.0.1.el7_3.2      ol7_latest  172 k
 libmpc                    x86_64  1.0.1-3.el7                ol7_latest   49 k
 libnfsidmap               x86_64  0.25-15.el7                ol7_latest   46 k
 libnl                     x86_64  1.1.4-3.el7                ol7_latest  122 k
 libobjc                   x86_64  4.8.5-11.el7               ol7_latest   74 k
 libpath_utils             x86_64  0.2.1-27.el7               ol7_latest   27 k
 libpwquality              x86_64  1.2.3-4.el7                ol7_latest   84 k
 libquadmath               x86_64  4.8.5-11.el7               ol7_latest  184 k
 libquadmath-devel         x86_64  4.8.5-11.el7               ol7_latest   47 k
 libref_array              x86_64  0.1.5-27.el7               ol7_latest   26 k
 libstdc++-devel           x86_64  4.8.5-11.el7               ol7_latest  1.5 M
 libtalloc                 x86_64  2.1.6-1.el7                ol7_latest   33 k
 libtevent                 x86_64  0.9.28-1.el7               ol7_latest   33 k
 libtirpc                  x86_64  0.2.4-0.8.el7_3            ol7_latest   88 k
 libuser                   x86_64  0.60-7.el7_1               ol7_latest  397 k
 libutempter               x86_64  1.1.6-4.el7                ol7_latest   24 k
 libuuid                   x86_64  2.23.2-33.0.1.el7_3.2      ol7_latest   76 k
 libverto-tevent           x86_64  0.2.5-4.el7                ol7_latest  8.4 k
 libyaml                   x86_64  0.1.4-11.el7_0             ol7_latest   54 k
 lvm2-libs                 x86_64  7:2.02.166-1.el7_3.5       ol7_latest  986 k
 lvm2-python-libs          x86_64  7:2.02.166-1.el7_3.5       ol7_latest  173 k
 lzo                       x86_64  2.06-8.el7                 ol7_latest   58 k
 mpfr                      x86_64  3.1.1-4.el7                ol7_latest  198 k
 nfs-utils                 x86_64  1:1.3.0-0.33.0.1.el7_3     ol7_latest  377 k
 pam                       x86_64  1.1.8-18.el7               ol7_latest  715 k
 procps-ng                 x86_64  3.3.10-10.el7              ol7_latest  288 k
 pyparsing                 noarch  1.5.6-9.el7                ol7_latest   93 k
 python-configshell        noarch  1:1.1.fb18-1.el7           ol7_latest   66 k
 python-ethtool            x86_64  0.8-5.el7                  ol7_latest   32 k
 python-kmod               x86_64  0.9-4.el7                  ol7_latest   56 k
 python-rtslib             noarch  2.1.fb57-5.el7             ol7_latest   88 k
 python-setproctitle       x86_64  1.1.6-5.el7                ol7_latest   14 k
 python-six                noarch  1.9.0-2.el7                ol7_latest   28 k
 python-urwid              x86_64  1.1.1-3.el7                ol7_latest  653 k
 qrencode-libs             x86_64  3.4.1-3.el7                ol7_latest   49 k
 quota                     x86_64  1:4.01-14.el7              ol7_latest  178 k
 quota-nls                 noarch  1:4.01-14.el7              ol7_latest   89 k
 rpcbind                   x86_64  0.2.0-38.el7_3.1           ol7_latest   58 k
 systemd                   x86_64  219-30.0.3.el7_3.9         ol7_latest  5.2 M
 systemd-libs              x86_64  219-30.0.3.el7_3.9         ol7_latest  369 k
 systemd-sysv              x86_64  219-30.0.3.el7_3.9         ol7_latest   64 k
 tcp_wrappers              x86_64  7.6-77.el7                 ol7_latest   78 k
 tcp_wrappers-libs         x86_64  7.6-77.el7                 ol7_latest   65 k
 util-linux                x86_64  2.23.2-33.0.1.el7_3.2      ol7_latest  1.9 M
 xz                        x86_64  5.2.2-1.el7                ol7_latest  228 k
Updating for dependencies:
 glibc                     x86_64  2.17-157.el7_3.5           ol7_latest  3.6 M
 glibc-common              x86_64  2.17-157.el7_3.5           ol7_latest   11 M

Transaction Summary
================================================================================
Install  12 Packages (+81 Dependent packages)
Upgrade              (  2 Dependent packages)

Total download size: 116 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
--------------------------------------------------------------------------------
Total                                               12 MB/s | 116 MB  00:10
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : glibc-common-2.17-157.el7_3.5.x86_64                        1/97
  Updating   : glibc-2.17-157.el7_3.5.x86_64                               2/97
  Installing : mpfr-3.1.1-4.el7.x86_64                                     3/97
  Installing : libmpc-1.0.1-3.el7.x86_64                                   4/97
  Installing : libuuid-2.23.2-33.0.1.el7_3.2.x86_64                        5/97
  Installing : libblkid-2.23.2-33.0.1.el7_3.2.x86_64                       6/97
  Installing : tcp_wrappers-libs-7.6-77.el7.x86_64                         7/97
  Installing : libmount-2.23.2-33.0.1.el7_3.2.x86_64                       8/97
  Installing : libquadmath-4.8.5-11.el7.x86_64                             9/97
  Installing : gzip-1.5-8.el7.x86_64                                      10/97
  Installing : cracklib-2.9.0-11.el7.x86_64                               11/97
  Installing : cracklib-dicts-2.9.0-11.el7.x86_64                         12/97
  Installing : binutils-2.25.1-22.base.el7.x86_64                         13/97
  Installing : kmod-libs-20-9.el7.x86_64                                  14/97
  Installing : libref_array-0.1.5-27.el7.x86_64                           15/97
  Installing : elfutils-libs-0.166-2.el7.x86_64                           16/97
  Installing : libtalloc-2.1.6-1.el7.x86_64                               17/97
  Installing : e2fsprogs-libs-1.42.9-9.el7.x86_64                         18/97
  Installing : libcollection-0.6.2-27.el7.x86_64                          19/97
  Installing : libbasicobjects-0.1.1-27.el7.x86_64                        20/97
  Installing : xz-5.2.2-1.el7.x86_64                                      21/97
  Installing : libtirpc-0.2.4-0.8.el7_3.x86_64                            22/97
  Installing : python-six-1.9.0-2.el7.noarch                              23/97
  Installing : libtevent-0.9.28-1.el7.x86_64                              24/97
  Installing : libverto-tevent-0.2.5-4.el7.x86_64                         25/97
  Installing : python-kmod-0.9-4.el7.x86_64                               26/97
  Installing : libpwquality-1.2.3-4.el7.x86_64                            27/97
  Installing : pam-1.1.8-18.el7.x86_64                                    28/97
  Installing : systemd-libs-219-30.0.3.el7_3.9.x86_64                     29/97
  Installing : procps-ng-3.3.10-10.el7.x86_64                             30/97
  Installing : libuser-0.60-7.el7_1.x86_64                                31/97
  Installing : libgfortran-4.8.5-11.el7.x86_64                            32/97
  Installing : tcp_wrappers-7.6-77.el7.x86_64                             33/97
  Installing : cpp-4.8.5-11.el7.x86_64                                    34/97
  Installing : libnfsidmap-0.25-15.el7.x86_64                             35/97
  Installing : libgnat-4.8.5-11.el7.x86_64                                36/97
  Installing : libnl-1.1.4-3.el7.x86_64                                   37/97
  Installing : python-ethtool-0.8-5.el7.x86_64                            38/97
  Installing : libutempter-1.1.6-4.el7.x86_64                             39/97
  Installing : util-linux-2.23.2-33.0.1.el7_3.2.x86_64                    40/97
  Installing : 2:tar-1.26-31.el7.x86_64                                   41/97
  Installing : libobjc-4.8.5-11.el7.x86_64                                42/97
  Installing : keyutils-1.5.8-3.el7.x86_64                                43/97
  Installing : 1:hardlink-1.0-19.el7.x86_64                               44/97
  Installing : libpath_utils-0.2.1-27.el7.x86_64                          45/97
  Installing : libini_config-1.3.0-27.el7.x86_64                          46/97
  Installing : lzo-2.06-8.el7.x86_64                                      47/97
  Installing : btrfs-progs-4.4.1-1.0.1.el7.x86_64                         48/97
  Installing : python-setproctitle-1.1.6-5.el7.x86_64                     49/97
  Installing : qrencode-libs-3.4.1-3.el7.x86_64                           50/97
  Installing : acl-2.2.51-12.el7.x86_64                                   51/97
  Installing : python-urwid-1.1.1-3.el7.x86_64                            52/97
  Installing : 1:dbus-libs-1.6.12-17.0.1.el7.x86_64                       53/97
  Installing : kpartx-0.4.9-99.el7_3.3.x86_64                             54/97
  Installing : 7:device-mapper-1.02.135-1.el7_3.5.x86_64                  55/97
  Installing : 7:device-mapper-libs-1.02.135-1.el7_3.5.x86_64             56/97
  Installing : cryptsetup-libs-1.7.2-1.el7.x86_64                         57/97
  Installing : dracut-033-463.0.2.el7_3.2.x86_64                          58/97
  Installing : kmod-20-9.el7.x86_64                                       59/97
  Installing : systemd-219-30.0.3.el7_3.9.x86_64                          60/97
  Installing : 1:dbus-1.6.12-17.0.1.el7.x86_64                            61/97
  Installing : python-rtslib-2.1.fb57-5.el7.noarch                        62/97
  Installing : 7:device-mapper-event-libs-1.02.135-1.el7_3.5.x86_64       63/97
  Installing : 7:device-mapper-event-1.02.135-1.el7_3.5.x86_64            64/97
Failed to get D-Bus connection: Operation not permitted
warning: %post(device-mapper-event-7:1.02.135-1.el7_3.5.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package 7:device-mapper-event-1.02.135-1.el7_3.5.x86_64
  Installing : 7:lvm2-libs-2.02.166-1.el7_3.5.x86_64                      65/97
  Installing : 7:lvm2-python-libs-2.02.166-1.el7_3.5.x86_64               66/97
  Installing : systemd-sysv-219-30.0.3.el7_3.9.x86_64                     67/97
  Installing : rpcbind-0.2.0-38.el7_3.1.x86_64                            68/97
  Installing : gssproxy-0.4.1-13.el7.x86_64                               69/97
  Installing : libevent-2.0.21-4.el7.x86_64                               70/97
  Installing : libyaml-0.1.4-11.el7_0.x86_64                              71/97
  Installing : PyYAML-3.10-11.el7.x86_64                                  72/97
  Installing : libgomp-4.8.5-11.el7.x86_64                                73/97
  Installing : pyparsing-1.5.6-9.el7.noarch                               74/97
  Installing : 1:python-configshell-1.1.fb18-1.el7.noarch                 75/97
  Installing : libgnat-devel-4.8.5-11.el7.x86_64                          76/97
  Installing : 1:quota-nls-4.01-14.el7.noarch                             77/97
  Installing : 1:quota-4.01-14.el7.x86_64                                 78/97
  Installing : 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64                    79/97
  Installing : kernel-headers-3.10.0-514.26.2.el7.x86_64                  80/97
  Installing : glibc-headers-2.17-157.el7_3.5.x86_64                      81/97
  Installing : glibc-devel-2.17-157.el7_3.5.x86_64                        82/97
  Installing : gcc-4.8.5-11.el7.x86_64                                    83/97
  Installing : libquadmath-devel-4.8.5-11.el7.x86_64                      84/97
  Installing : gcc-objc-4.8.5-11.el7.x86_64                               85/97
  Installing : libstdc++-devel-4.8.5-11.el7.x86_64                        86/97
  Installing : gcc-c++-4.8.5-11.el7.x86_64                                87/97
  Installing : gcc-objc++-4.8.5-11.el7.x86_64                             88/97
  Installing : gcc-gfortran-4.8.5-11.el7.x86_64                           89/97
  Installing : gcc-gnat-4.8.5-11.el7.x86_64                               90/97
  Installing : targetd-0.7.1-1.el7.noarch                                 91/97
  Installing : targetcli-2.1.fb41-3.el7.noarch                            92/97
  Installing : 1:make-3.82-23.el7.x86_64                                  93/97
  Installing : unzip-6.0-16.el7.x86_64                                    94/97
  Installing : libaio-devel-0.3.109-13.el7.x86_64                         95/97
  Cleanup    : glibc-common-2.17-157.el7_3.2.x86_64                       96/97
  Cleanup    : glibc-2.17-157.el7_3.2.x86_64                              97/97
  Verifying  : libnfsidmap-0.25-15.el7.x86_64                              1/97
  Verifying  : 7:device-mapper-event-1.02.135-1.el7_3.5.x86_64             2/97
  Verifying  : glibc-2.17-157.el7_3.5.x86_64                               3/97
  Verifying  : python-rtslib-2.1.fb57-5.el7.noarch                         4/97
  Verifying  : kmod-20-9.el7.x86_64                                        5/97
  Verifying  : binutils-2.25.1-22.base.el7.x86_64                          6/97
  Verifying  : libgfortran-4.8.5-11.el7.x86_64                             7/97
  Verifying  : libquadmath-devel-4.8.5-11.el7.x86_64                       8/97
  Verifying  : kmod-libs-20-9.el7.x86_64                                   9/97
  Verifying  : libref_array-0.1.5-27.el7.x86_64                           10/97
  Verifying  : elfutils-libs-0.166-2.el7.x86_64                           11/97
  Verifying  : 1:make-3.82-23.el7.x86_64                                  12/97
  Verifying  : 7:device-mapper-1.02.135-1.el7_3.5.x86_64                  13/97
  Verifying  : python-six-1.9.0-2.el7.noarch                              14/97
  Verifying  : libuser-0.60-7.el7_1.x86_64                                15/97
  Verifying  : libgnat-4.8.5-11.el7.x86_64                                16/97
  Verifying  : cracklib-dicts-2.9.0-11.el7.x86_64                         17/97
  Verifying  : libnl-1.1.4-3.el7.x86_64                                   18/97
  Verifying  : 7:device-mapper-libs-1.02.135-1.el7_3.5.x86_64             19/97
  Verifying  : targetd-0.7.1-1.el7.noarch                                 20/97
  Verifying  : PyYAML-3.10-11.el7.x86_64                                  21/97
  Verifying  : gcc-4.8.5-11.el7.x86_64                                    22/97
  Verifying  : libutempter-1.1.6-4.el7.x86_64                             23/97
  Verifying  : libtalloc-2.1.6-1.el7.x86_64                               24/97
  Verifying  : libverto-tevent-0.2.5-4.el7.x86_64                         25/97
  Verifying  : libini_config-1.3.0-27.el7.x86_64                          26/97
  Verifying  : 1:nfs-utils-1.3.0-0.33.0.1.el7_3.x86_64                    27/97
  Verifying  : unzip-6.0-16.el7.x86_64                                    28/97
  Verifying  : libmount-2.23.2-33.0.1.el7_3.2.x86_64                      29/97
  Verifying  : gcc-objc++-4.8.5-11.el7.x86_64                             30/97
  Verifying  : systemd-sysv-219-30.0.3.el7_3.9.x86_64                     31/97
  Verifying  : 2:tar-1.26-31.el7.x86_64                                   32/97
  Verifying  : cryptsetup-libs-1.7.2-1.el7.x86_64                         33/97
  Verifying  : libpwquality-1.2.3-4.el7.x86_64                            34/97
  Verifying  : gssproxy-0.4.1-13.el7.x86_64                               35/97
  Verifying  : glibc-common-2.17-157.el7_3.5.x86_64                       36/97
  Verifying  : libobjc-4.8.5-11.el7.x86_64                                37/97
  Verifying  : libmpc-1.0.1-3.el7.x86_64                                  38/97
  Verifying  : python-kmod-0.9-4.el7.x86_64                               39/97
  Verifying  : e2fsprogs-libs-1.42.9-9.el7.x86_64                         40/97
  Verifying  : glibc-devel-2.17-157.el7_3.5.x86_64                        41/97
  Verifying  : keyutils-1.5.8-3.el7.x86_64                                42/97
  Verifying  : 1:hardlink-1.0-19.el7.x86_64                               43/97
  Verifying  : cracklib-2.9.0-11.el7.x86_64                               44/97
  Verifying  : libpath_utils-0.2.1-27.el7.x86_64                          45/97
  Verifying  : targetcli-2.1.fb41-3.el7.noarch                            46/97
  Verifying  : libblkid-2.23.2-33.0.1.el7_3.2.x86_64                      47/97
  Verifying  : libcollection-0.6.2-27.el7.x86_64                          48/97
  Verifying  : glibc-headers-2.17-157.el7_3.5.x86_64                      49/97
  Verifying  : libstdc++-devel-4.8.5-11.el7.x86_64                        50/97
  Verifying  : 1:quota-4.01-14.el7.x86_64                                 51/97
  Verifying  : libquadmath-4.8.5-11.el7.x86_64                            52/97
  Verifying  : tcp_wrappers-libs-7.6-77.el7.x86_64                        53/97
  Verifying  : cpp-4.8.5-11.el7.x86_64                                    54/97
  Verifying  : lzo-2.06-8.el7.x86_64                                      55/97
  Verifying  : kernel-headers-3.10.0-514.26.2.el7.x86_64                  56/97
  Verifying  : python-setproctitle-1.1.6-5.el7.x86_64                     57/97
  Verifying  : libbasicobjects-0.1.1-27.el7.x86_64                        58/97
  Verifying  : qrencode-libs-3.4.1-3.el7.x86_64                           59/97
  Verifying  : 1:dbus-1.6.12-17.0.1.el7.x86_64                            60/97
  Verifying  : pam-1.1.8-18.el7.x86_64                                    61/97
  Verifying  : acl-2.2.51-12.el7.x86_64                                   62/97
  Verifying  : rpcbind-0.2.0-38.el7_3.1.x86_64                            63/97
  Verifying  : python-urwid-1.1.1-3.el7.x86_64                            64/97
  Verifying  : 1:dbus-libs-1.6.12-17.0.1.el7.x86_64                       65/97
  Verifying  : libevent-2.0.21-4.el7.x86_64                               66/97
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                         67/97
  Verifying  : libuuid-2.23.2-33.0.1.el7_3.2.x86_64                       68/97
  Verifying  : libyaml-0.1.4-11.el7_0.x86_64                              69/97
  Verifying  : gcc-gfortran-4.8.5-11.el7.x86_64                           70/97
  Verifying  : mpfr-3.1.1-4.el7.x86_64                                    71/97
  Verifying  : gzip-1.5-8.el7.x86_64                                      72/97
  Verifying  : tcp_wrappers-7.6-77.el7.x86_64                             73/97
  Verifying  : 1:quota-nls-4.01-14.el7.noarch                             74/97
  Verifying  : gcc-c++-4.8.5-11.el7.x86_64                                75/97
  Verifying  : 7:lvm2-libs-2.02.166-1.el7_3.5.x86_64                      76/97
  Verifying  : libgnat-devel-4.8.5-11.el7.x86_64                          77/97
  Verifying  : 7:lvm2-python-libs-2.02.166-1.el7_3.5.x86_64               78/97
  Verifying  : 1:python-configshell-1.1.fb18-1.el7.noarch                 79/97
  Verifying  : pyparsing-1.5.6-9.el7.noarch                               80/97
  Verifying  : util-linux-2.23.2-33.0.1.el7_3.2.x86_64                    81/97
  Verifying  : gcc-gnat-4.8.5-11.el7.x86_64                               82/97
  Verifying  : systemd-219-30.0.3.el7_3.9.x86_64                          83/97
  Verifying  : systemd-libs-219-30.0.3.el7_3.9.x86_64                     84/97
  Verifying  : btrfs-progs-4.4.1-1.0.1.el7.x86_64                         85/97
  Verifying  : kpartx-0.4.9-99.el7_3.3.x86_64                             86/97
  Verifying  : xz-5.2.2-1.el7.x86_64                                      87/97
  Verifying  : python-ethtool-0.8-5.el7.x86_64                            88/97
  Verifying  : libtevent-0.9.28-1.el7.x86_64                              89/97
  Verifying  : procps-ng-3.3.10-10.el7.x86_64                             90/97
  Verifying  : dracut-033-463.0.2.el7_3.2.x86_64                          91/97
  Verifying  : libtirpc-0.2.4-0.8.el7_3.x86_64                            92/97
  Verifying  : libgomp-4.8.5-11.el7.x86_64                                93/97
  Verifying  : 7:device-mapper-event-libs-1.02.135-1.el7_3.5.x86_64       94/97
  Verifying  : gcc-objc-4.8.5-11.el7.x86_64                               95/97
  Verifying  : glibc-2.17-157.el7_3.2.x86_64                              96/97
  Verifying  : glibc-common-2.17-157.el7_3.2.x86_64                       97/97

Installed:
  gcc.x86_64 0:4.8.5-11.el7                gcc-c++.x86_64 0:4.8.5-11.el7
  gcc-gfortran.x86_64 0:4.8.5-11.el7       gcc-gnat.x86_64 0:4.8.5-11.el7
  gcc-objc.x86_64 0:4.8.5-11.el7           gcc-objc++.x86_64 0:4.8.5-11.el7
  libaio-devel.x86_64 0:0.3.109-13.el7     make.x86_64 1:3.82-23.el7
  tar.x86_64 2:1.26-31.el7                 targetcli.noarch 0:2.1.fb41-3.el7
  targetd.noarch 0:0.7.1-1.el7             unzip.x86_64 0:6.0-16.el7

Dependency Installed:
  PyYAML.x86_64 0:3.10-11.el7
  acl.x86_64 0:2.2.51-12.el7
  binutils.x86_64 0:2.25.1-22.base.el7
  btrfs-progs.x86_64 0:4.4.1-1.0.1.el7
  cpp.x86_64 0:4.8.5-11.el7
  cracklib.x86_64 0:2.9.0-11.el7
  cracklib-dicts.x86_64 0:2.9.0-11.el7
  cryptsetup-libs.x86_64 0:1.7.2-1.el7
  dbus.x86_64 1:1.6.12-17.0.1.el7
  dbus-libs.x86_64 1:1.6.12-17.0.1.el7
  device-mapper.x86_64 7:1.02.135-1.el7_3.5
  device-mapper-event.x86_64 7:1.02.135-1.el7_3.5
  device-mapper-event-libs.x86_64 7:1.02.135-1.el7_3.5
  device-mapper-libs.x86_64 7:1.02.135-1.el7_3.5
  dracut.x86_64 0:033-463.0.2.el7_3.2
  e2fsprogs-libs.x86_64 0:1.42.9-9.el7
  elfutils-libs.x86_64 0:0.166-2.el7
  glibc-devel.x86_64 0:2.17-157.el7_3.5
  glibc-headers.x86_64 0:2.17-157.el7_3.5
  gssproxy.x86_64 0:0.4.1-13.el7
  gzip.x86_64 0:1.5-8.el7
  hardlink.x86_64 1:1.0-19.el7
  kernel-headers.x86_64 0:3.10.0-514.26.2.el7
  keyutils.x86_64 0:1.5.8-3.el7
  kmod.x86_64 0:20-9.el7
  kmod-libs.x86_64 0:20-9.el7
  kpartx.x86_64 0:0.4.9-99.el7_3.3
  libbasicobjects.x86_64 0:0.1.1-27.el7
  libblkid.x86_64 0:2.23.2-33.0.1.el7_3.2
  libcollection.x86_64 0:0.6.2-27.el7
  libevent.x86_64 0:2.0.21-4.el7
  libgfortran.x86_64 0:4.8.5-11.el7
  libgnat.x86_64 0:4.8.5-11.el7
  libgnat-devel.x86_64 0:4.8.5-11.el7
  libgomp.x86_64 0:4.8.5-11.el7
  libini_config.x86_64 0:1.3.0-27.el7
  libmount.x86_64 0:2.23.2-33.0.1.el7_3.2
  libmpc.x86_64 0:1.0.1-3.el7
  libnfsidmap.x86_64 0:0.25-15.el7
  libnl.x86_64 0:1.1.4-3.el7
  libobjc.x86_64 0:4.8.5-11.el7
  libpath_utils.x86_64 0:0.2.1-27.el7
  libpwquality.x86_64 0:1.2.3-4.el7
  libquadmath.x86_64 0:4.8.5-11.el7
  libquadmath-devel.x86_64 0:4.8.5-11.el7
  libref_array.x86_64 0:0.1.5-27.el7
  libstdc++-devel.x86_64 0:4.8.5-11.el7
  libtalloc.x86_64 0:2.1.6-1.el7
  libtevent.x86_64 0:0.9.28-1.el7
  libtirpc.x86_64 0:0.2.4-0.8.el7_3
  libuser.x86_64 0:0.60-7.el7_1
  libutempter.x86_64 0:1.1.6-4.el7
  libuuid.x86_64 0:2.23.2-33.0.1.el7_3.2
  libverto-tevent.x86_64 0:0.2.5-4.el7
  libyaml.x86_64 0:0.1.4-11.el7_0
  lvm2-libs.x86_64 7:2.02.166-1.el7_3.5
  lvm2-python-libs.x86_64 7:2.02.166-1.el7_3.5
  lzo.x86_64 0:2.06-8.el7
  mpfr.x86_64 0:3.1.1-4.el7
  nfs-utils.x86_64 1:1.3.0-0.33.0.1.el7_3
  pam.x86_64 0:1.1.8-18.el7
  procps-ng.x86_64 0:3.3.10-10.el7
  pyparsing.noarch 0:1.5.6-9.el7
  python-configshell.noarch 1:1.1.fb18-1.el7
  python-ethtool.x86_64 0:0.8-5.el7
  python-kmod.x86_64 0:0.9-4.el7
  python-rtslib.noarch 0:2.1.fb57-5.el7
  python-setproctitle.x86_64 0:1.1.6-5.el7
  python-six.noarch 0:1.9.0-2.el7
  python-urwid.x86_64 0:1.1.1-3.el7
  qrencode-libs.x86_64 0:3.4.1-3.el7
  quota.x86_64 1:4.01-14.el7
  quota-nls.noarch 1:4.01-14.el7
  rpcbind.x86_64 0:0.2.0-38.el7_3.1
  systemd.x86_64 0:219-30.0.3.el7_3.9
  systemd-libs.x86_64 0:219-30.0.3.el7_3.9
  systemd-sysv.x86_64 0:219-30.0.3.el7_3.9
  tcp_wrappers.x86_64 0:7.6-77.el7
  tcp_wrappers-libs.x86_64 0:7.6-77.el7
  util-linux.x86_64 0:2.23.2-33.0.1.el7_3.2
  xz.x86_64 0:5.2.2-1.el7

Dependency Updated:
  glibc.x86_64 0:2.17-157.el7_3.5     glibc-common.x86_64 0:2.17-157.el7_3.5

Complete!
Loaded plugins: ovl
Cleaning repos: ol7_UEKR4 ol7_latest
Cleaning up everything
 ---> 2d77776684c7
Removing intermediate container 7942d5b92104
Step 5/7 : ENV PATH /opt/node-v6.11.1-linux-x64/bin:$PATH
 ---> Running in d2babc686d4b
 ---> 904690d48a81
Removing intermediate container d2babc686d4b
Step 6/7 : ENV NODE_PATH /opt/node-v6.11.1-linux-x64/lib/node_modules/
 ---> Running in 0a2518ce11c6
 ---> dc062b78eb4f
Removing intermediate container 0a2518ce11c6
Step 7/7 : RUN npm install -g oracledb
 ---> Running in 48a4b3480b27

> oracledb@1.13.1 install /opt/node-v6.11.1-linux-x64/lib/node_modules/oracledb
> node-gyp rebuild

gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/6.11.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/node-v6.11.1-linux-x64/lib/node_modules/oracledb/.node-gyp"
make: Entering directory `/opt/node-v6.11.1-linux-x64/lib/node_modules/oracledb/build'
  CXX(target) Release/obj.target/oracledb/src/njs/src/njsOracle.o
  CXX(target) Release/obj.target/oracledb/src/njs/src/njsPool.o
  CXX(target) Release/obj.target/oracledb/src/njs/src/njsConnection.o
  CXX(target) Release/obj.target/oracledb/src/njs/src/njsResultSet.o
  CXX(target) Release/obj.target/oracledb/src/njs/src/njsMessages.o
  CXX(target) Release/obj.target/oracledb/src/njs/src/njsIntLob.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiEnv.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiEnvImpl.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiException.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiExceptionImpl.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiConnImpl.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiDateTimeArrayImpl.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiPoolImpl.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiStmtImpl.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiUtils.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiLob.o
  CXX(target) Release/obj.target/oracledb/src/dpi/src/dpiCommon.o
  SOLINK_MODULE(target) Release/obj.target/oracledb.node
  COPY Release/oracledb.node
make: Leaving directory `/opt/node-v6.11.1-linux-x64/lib/node_modules/oracledb/build'
/opt/node-v6.11.1-linux-x64/lib
`-- oracledb@1.13.1
  `-- nan@2.5.1

 ---> 1690f03ffbc7
Removing intermediate container 48a4b3480b27
Successfully built 1690f03ffbc7
Successfully tagged inst_node:latest

Run the new inst_node container and connect to the Oracle DB

Danny: > docker run -it inst_node sqlplus system/oracle@//172.17.0.2:1521/pdb1.localdomain

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 20 03:51:33 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Thu Jul 20 2017 03:25:20 +00:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>
CREATE USER testper IDENTIFIED BY "testper"  
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP";

GRANT "DBA" TO testper ;
GRANT "CONNECT" TO testper ;
GRANT "RESOURCE" TO testper ;

--------
CREATE TABLE "TESTPER"."TABLE1" (
    "COLUMN1"   VARCHAR2(20 BYTE),
    "COLUMN2"   VARCHAR2(20 BYTE),
    "COLUMN3"   VARCHAR2(20 BYTE)
)

--------
INSERT INTO "TESTPER"."TABLE1" (COLUMN1, COLUMN2, COLUMN3) VALUES ('1', '2', '3')
INSERT INTO "TESTPER"."TABLE1" (COLUMN1, COLUMN2, COLUMN3) VALUES ('4', '5', '6')
INSERT INTO "TESTPER"."TABLE1" (COLUMN1, COLUMN2, COLUMN3) VALUES ('7', '8', '9')

Connect to Oracle DB and run the select1.js script

Danny: > docker run -it inst_node node select1.js

[ [ '1', '2', '3' ], [ '4', '5', '6' ], [ '7', '8', '9' ] ]

There you have it. With the node-oracledb driver installed, we are able to query the Oracle 12.1 database through the select1.js script.

Now that you’ve taken the long way round, go visit my github repo for the files you need

EnjoydbaOnTap node-oracledb

Related Posts Plugin for WordPress, Blogger...

3 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.