Comments (2)
from node-sqlserver-v8.
for docker i have found this image to work
FROM ubuntu:22.04
RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker
RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update \
&& apt-get install -y vim git build-essential curl perl dialog apt-utils ca-certificates apt-transport-https locales gnupg2 openssl lsb-release
RUN mkdir -p /etc/ssl/certs/
RUN curl https://packages.microsoft.com/keys/microsoft.asc | tee | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN echo msodbcsql18 msodbcsql/ACCEPT_EULA boolean true | debconf-set-selections
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update \
&& apt-get install -y python3 unixodbc unixodbc-dev nodejs
RUN ACCEPT_EULA=Y \
apt-get install -y msodbcsql18
RUN ACCEPT_EULA=Y \
apt-get install -y mssql-tools18
RUN mkdir -p $HOME/projects
RUN git clone https://github.com/openssl/openssl.git $HOME/projects/openssl
RUN ( cd $HOME/projects/openssl ; ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared; make; make install)
RUN (cd /etc/ld.so.conf.d/; echo '/usr/local/ssl/lib64/' | tee openssl-3.2.0.1s.conf)
RUN ldconfig -v
RUN npm install --g yarn
RUN useradd -ms /bin/bash apprunner
USER apprunner
RUN mkdir -p $HOME/app
RUN cd $HOME/app
i build
docker build . -t msnodesqlv8-ubuntu
launch a shell
docker run -it msnodesqlv8-ubuntu bash
cd
cd app
git clone https://github.com/TimelordUK/msnodesqlv8_yarn_sample.git
yarn install
change the index.js for a valid connection string - note will need ip address rather than host unless you set up resolution
yarn test
Done in 15.26s.
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ ping DESKTOP-VIUCH90
bash: ping: command not found
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ vim index.js
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ yarn test
yarn run v1.22.19
$ node index
using connection 'Driver={ODBC Driver 18 for SQL Server}; Server=192.000.0.000;UID=linux; PWD=linux; Database=node;Encrypt=no;' run query 'SELECT top 2 * FROM syscolumns'
{
"beginAt": "2023-05-29T18:56:30.565Z",
"submittedAt": "2023-05-29T18:56:30.566Z",
"endAt": "2023-05-29T18:56:30.640Z",
"elapsed": 75,
"first": [
{
"name": "rsid",
"id": 3,
"xtype": 127,
"typestat": 1,
"xusertype": 127,
"length": 8,
"xprec": 19,
"xscale": 0,
"colid": 1,
"xoffset": 0,
"bitpos": 0,
"reserved": 0,
"colstat": 0,
"cdefault": 0,
docker build . -t msnodesqlv8-ubuntu
[+] Building 603.2s (25/25) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.49kB 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 0.0s
=> [ 1/21] FROM docker.io/library/ubuntu:22.04 0.0s
=> CACHED [ 2/21] RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker 0.0s
=> CACHED [ 3/21] RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker 0.0s
=> [ 4/21] RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y vim git build-essential curl perl dialog apt-utils ca-certificates apt-tra 83.7s
=> [ 5/21] RUN mkdir -p /etc/ssl/certs/ 0.6s
=> [ 6/21] RUN curl https://packages.microsoft.com/keys/microsoft.asc | tee | apt-key add - 1.0s
=> [ 7/21] RUN curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list 0.8s
=> [ 8/21] RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - 3.4s
=> [ 9/21] RUN echo msodbcsql18 msodbcsql/ACCEPT_EULA boolean true | debconf-set-selections 0.7s
=> [10/21] RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y python3 unixodbc unixodbc-dev nodejs 11.5s
=> [11/21] RUN ACCEPT_EULA=Y apt-get install -y msodbcsql18 2.4s
=> [12/21] RUN ACCEPT_EULA=Y apt-get install -y mssql-tools18 2.2s
=> [13/21] RUN mkdir -p $HOME/projects 0.6s
=> [14/21] RUN git clone https://github.com/openssl/openssl.git $HOME/projects/openssl 54.1s
=> [15/21] RUN ( cd $HOME/projects/openssl ; ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared; make; make install) 432.6s
=> [16/21] RUN (cd /etc/ld.so.conf.d/; echo '/usr/local/ssl/lib64/' | tee openssl-3.2.0.1s.conf) 0.7s
=> [17/21] RUN ldconfig -v 0.6s
=> [18/21] RUN npm install --g yarn 2.9s
=> [19/21] RUN useradd -ms /bin/bash apprunner 0.8s
=> [20/21] RUN mkdir -p $HOME/app 0.6s
=> [21/21] RUN cd $HOME/app 0.5s
=> exporting to image 3.4s
=> => exporting layers 3.3s
=> => writing image sha256:1fc7851e63c80307bb37d8bea8ebdf546714fb34d479cb411e8bc91b307809f9 0.0s
=> => naming to docker.io/library/msnodesqlv8-ubuntu 0.0s
Administrator in dev\docker\ubuntu-msnodesqlv8 took 10m3s
❯ docker run -it msnodesqlv8-ubuntu bash
apprunner@184c7c6d8c08:/$ cd
apprunner@184c7c6d8c08:~$ cd app
apprunner@184c7c6d8c08:~/app$ Driver={ODBC Driver 18 for SQL Server}; Server=DESKTOP-VIUCH90;UID=linux; PWD=linux; Database=node;Encrypt=no;^C
apprunner@184c7c6d8c08:~/app$ git clone https://github.com/TimelordUK/msnodesqlv8_yarn_sample.git
Cloning into 'msnodesqlv8_yarn_sample'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 14 (delta 4), reused 14 (delta 4), pack-reused 0
Receiving objects: 100% (14/14), 7.90 KiB | 7.90 MiB/s, done.
Resolving deltas: 100% (4/4), done.
apprunner@184c7c6d8c08:~/app$ cd msnodesqlv8_yarn_sample/
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ vim index.js
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
from node-sqlserver-v8.
Related Issues (20)
- Change node-gyp path to download nodejs headers from msnodesqlv8 installation HOT 2
- Why are database field names garbled when using Chinese fields? HOT 3
- install msnodesqlv8 through npm failed HOT 2
- Keep saying Module not found of sqlserverv8 HOT 6
- Question: Using prepared query with Pool
- unable to build on CentOS7 HOT 3
- Prebuilt binaries for Node 20 / alpine HOT 3
- Cannot use without 'require'? HOT 1
- Module not found: Can't resolve '../build/Release/sqlserverv8' HOT 10
- Module did not self-register: sqlserverv8.node HOT 7
- npm install --save msnodesqlv8 fails MSBuild.exe failed with exit code: 1 HOT 5
- import { SqlClient } from "msnodesqlv8/types"; Cannot find module 'msnodesqlv8/types' or its corresponding type declarations HOT 1
- Unable to initialize msnodesql during Hot Module Reload (HMR) HOT 2
- Security vulnerability detected in latest HOT 1
- uncaughtException: Cannot read properties of null (reading 'query') HOT 3
- `ConcreteColumnType.parseSS` method tampers with plain date strings HOT 3
- Cannot find module '../build/Release/sqlserverv8.node' - Windows 10 / node.js v20.11.0/v21.6.1 HOT 1
- npm install results in LNK1127: library is corrupt HOT 1
- Uncaught Exception: static Sybase = new ServerDialect("Sybase")
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sqlserver-v8.