cancel
Showing results for 
Search instead for 
Did you mean: 

node and sqlanywhere in docker

0 Kudos
2,383

does anyone have experience how can i create node js and sql anywhere in docker for windows? I've sqlanywhere17 and is already installed in node but I can't perform in docker. i've erorr. Error: Code: -2004 Msg: Can't initialize DBCAPI". There is less information in net. Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_duemesnil
Participant
0 Kudos

You have to Provide the SQL Anywhere Client in the Docker Image to be able to use the npm module! I Suspect that you want to use a Linux Image ?

As there is no Silent Install for SQL Anywhere Client available I had to use a work around.

  • Install the SQL Client in a compatible Linux System
  • Stuff the Contents of the /opt/sqlanywhere17 Folder in a tar File that you need when you generate the Docker Image.

In your Dockerfile add theses Lines

FROM node:8

COPY sqlaclient/**sqlanywhere17.tar.gz** /opt
RUN cd /opt && \\
    tar xfz /opt/**sqlanywhere17.tar.gz** && \\
    rm /opt/**sqlanywhere17.tar.gz**

ENV SQLANY17="/opt/sqlanywhere17" \\
    LD_LIBRARY_PATH="/opt/sqlanywhere17/lib64:/opt/sqlanywhere17/lib32:${LD_LIBRARY_PATH}" \\
    NODE_PATH="/opt/sqlanywhere17/node:${NODE_PATH}" \\
    PATH="/opt/sqlanywhere17/bin64:/opt/sqlanywhere17/bin32:${PATH}"

With this preparation I could connect from a Node App in the Docker Image to my Database.

HTH

0 Kudos

thanks Thomas, how can i the SQL Client in Linux System install . i've windows System.

thomas_duemesnil
Participant
0 Kudos

You need to get a Linux Based Installer for SQL Anywhere. You could probably get a free Developer Version for Linux. Or ask you Software Supplier for the Linux installation files.

VolkerBarth
Contributor
0 Kudos

As to "How to install a SQL Anywhere client on Linux", you might also have a look at that question.

0 Kudos

Thanks for your tips, my program is ok now