on 2019 Jul 02 6:16 AM
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
Request clarification before answering.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As to "How to install a SQL Anywhere client on Linux", you might also have a look at that question.
User | Count |
---|---|
60 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.