knex/scripts/oracle-tests-Dockerfile
Mikael Lepistö cb3a85e738
Normalized and validated driverNames of test db clients and fixed oracle test setup (#2692)
* Normalized and validated driverNames of test db clients and fixed oracle test setup

* Fixed failed queries from old query building tests which hadn't been ran in ages

* Allow selecting node version which is used to run oracledb docker tests

* Improved sql tester error messages

* Fixed rest of the oracledb tests

* Removed invalid flag from docker-compose

* Print mssql logs if initialization fails

* Fixed syntax error + final tests

* Added restart of failure for mssql DB initialization to try again if server was not ready

* Printout always mssql logs after container is started

* Fixed wait time printing after trying to connect

* Use npm run oracledb:test for testing oracle in travis
2018-07-08 14:10:51 +03:00

59 lines
1.4 KiB
Plaintext

FROM wnameless/oracle-xe-11g
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Set debconf to run non-interactively
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && apt-get install -y -q --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
curl \
git \
libssl-dev \
python \
rsync \
software-properties-common \
wget \
gpg-agent \
apt-utils \
&& rm -rf /var/lib/apt/lists/*
# Install node 6,8,10 from nvm
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# make sure that there is enough disk...
RUN . $HOME/.nvm/nvm.sh && nvm install 6
RUN . $HOME/.nvm/nvm.sh && nvm install 8
RUN . $HOME/.nvm/nvm.sh && nvm install 10
RUN echo 'module.exports = {\
oracledb: {\
user : "system",\
password : "oracle",\
connectString : "localhost/XE",\
stmtCacheSize : 0\
}\
}' > /oracle-config.js
ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
ENV ORACLE_SID XE
ENV OCI_LIB_DIR /u01/app/oracle/product/11.2.0/xe/lib
ENV LD_LIBRARY_PATH /u01/app/oracle/product/11.2.0/xe/lib
ENV KNEX_TEST /oracle-config.js
ENV DB "oracledb"
ENV KNEX_TIMEOUT 60000
ADD . knex
CMD /usr/sbin/startup.sh && \
. $HOME/.nvm/nvm.sh && \
nvm use ${NODE_VER:-10} && \
cd knex && \
npm install && \
npm install oracledb && \
npm run build && \
npm run plaintest