From 0bf00a732ff4ebba73d92b80851afcae93485349 Mon Sep 17 00:00:00 2001
From: Eric Schoville <eric.schoville@wisc.edu>
Date: Fri, 6 Nov 2020 18:12:13 +0000
Subject: [PATCH] Odbcinst update -INPLATFORM-298

---
 Dockerfile   | 5 ++---
 odbcinst.ini | 9 +++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index b38154b..bcf74ee 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -31,12 +31,11 @@ unzip \
 jq \
 sqlite3 \
 libsqliteodbc \
-unixodbc \
 wget
 
 # Snowflake ODBC
 RUN wget --no-directories --recursive --level=1 --no-parent --accept 'snowflake-odbc*.deb' https://sfc-repo.snowflakecomputing.com/odbc/linux/latest/index.html && \
-dpkg -i snowflake-odbc*.deb && \
+dpkg -i --ignore-depends=unixodbc snowflake-odbc*.deb && \
 rm snowflake-odbc*.deb
 
 # Set the locale, Locale defaults are necessary for agent to operate correctly
@@ -52,7 +51,7 @@ RUN mkdir /exports && chown $USER:$USER /exports
 USER $USER
 
 # Add the SQLite ODBC information.  The main odbcinst.ini is in INFA_HOME directory.
-ADD odbcinst.ini /home/agent/.odbcinst.ini
+COPY --chown=agent odbcinst.ini /home/agent/.odbcinst.ini
 
 # Create directories so that volume mounts pick up the correct users
 RUN mkdir -p ~/databases && \
diff --git a/odbcinst.ini b/odbcinst.ini
index f6c30c7..7fbb8b8 100644
--- a/odbcinst.ini
+++ b/odbcinst.ini
@@ -3,3 +3,12 @@ Description = SQLite3 ODBC Driver
 Driver = /usr/lib/x86_64-linux-gnu/odbc/libsqlite3odbc.so
 Setup = /usr/lib/x86_64-linux-gnu/odbc/libsqlite3odbc.so
 UsageCount = 1
+
+[SnowflakeDSIIDriver]
+APILevel=1
+ConnectFunctions=YYY
+Description=Snowflake DSII
+Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so
+DriverODBCVer=03.52
+SQLLevel=1
+UsageCount=1
-- 
GitLab