forked from openlink/virtuoso-opensource
-
Notifications
You must be signed in to change notification settings - Fork 0
Virtuoso OpenSource Edition
Patrick van Kleef edited this page Jan 9, 2019
·
3 revisions
Before calling the node-isql.js the docker-entrypoint.sh
script creates an environment variable
called ODBC_CONNECT_STRING
which concats the following key=value;key=value
pairs to
form the ODBC connect string.
key value
DRIVER /opt/virtuoso-opensource/lib/virtodbcu_r.so
HOST $VIRT_HOST
UID $VIRT_UID
PWD $VIRT_PWD
WideAsUTF16 1
CHARSET UTF-8
resulting in:
export ODBC_CONNECT_STRING="DRIVER=/opt/virtuoso-opensource/lib/virtodbcu_r.so;HOST=$VIRT_HOST;UID=$VIRT_UID;PWD=$VIRT_PWD;WideAsUTF16=1;CHARSET=UTF-8"
$ docker run -i -t -e VIRT_HOST=example.com:4321 openlink/node-isql localhost:1234 demo
which the docker-entrypoint.sh
script interprets as:
- environment variable VIRT_HOST is specified and set to
example.com:4321
- environment variable VIRT_UID is not set, so defaults to
dba
- environment variable VIRT_PWD is not set, so defaults to
dba
- argument 1 is supplied, so VIRT_HOST is set to
localhost:1234
- argument 2 is supplied, so VIRT_UID is set to
demo
- argument 3 is not supplied, so VIRT_PWD remains
dba
- VIRT_HOST is rewritten from
localhost:1234
tohost.docker.internal:1234
environment value
VIRT_HOST host.docker.internal:1234
VIRT_UID demo
VIRT_PWD dba
and the final connect string is:
export ODBC_CONNECT_STRING="DRIVER=/opt/virtuoso-opensource/lib/virtodbcu_r.so;HOST=host.docker.internal.1234;UID=demo;PWD=dba;WideAsUTF16=1;CHARSET=UTF-8"
Copyright (C) 1998-2024 OpenLink Software - Virtuoso OpenSource Edition