oracle-tests-Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. FROM wnameless/oracle-xe-11g
  2. # Replace shell with bash so we can source files
  3. RUN rm /bin/sh && ln -s /bin/bash /bin/sh
  4. # Set debconf to run non-interactively
  5. RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
  6. RUN apt-get update && apt-get install -y -q --no-install-recommends \
  7. apt-transport-https \
  8. build-essential \
  9. ca-certificates \
  10. curl \
  11. git \
  12. libssl-dev \
  13. python \
  14. rsync \
  15. software-properties-common \
  16. wget \
  17. && rm -rf /var/lib/apt/lists/*
  18. RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
  19. RUN apt-get install -y nodejs
  20. RUN echo 'module.exports = {\
  21. oracledb: {\
  22. user : "system",\
  23. password : "oracle",\
  24. connectString : "localhost/XE",\
  25. stmtCacheSize : 0\
  26. }\
  27. }' > /oracle-config.js
  28. ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
  29. ENV ORACLE_SID XE
  30. ENV OCI_LIB_DIR /u01/app/oracle/product/11.2.0/xe/lib
  31. ENV LD_LIBRARY_PATH /u01/app/oracle/product/11.2.0/xe/lib
  32. ENV KNEX_TEST /oracle-config.js
  33. ENV DB "sqlite3 oracledb"
  34. ENV KNEX_TIMEOUT 60000
  35. ADD . knex
  36. CMD /usr/sbin/startup.sh && \
  37. cd knex && \
  38. npm install && \
  39. npm install oracledb && \
  40. npm run plaintest